Re: [U-Boot] [PATCH] mx6sabreauto: Add the mx6dual-lite variant

2014-05-20 Thread Stefano Babic
On 19/05/2014 23:40, Fabio Estevam wrote:
 Hi Stefano,
 
 On Thu, May 8, 2014 at 2:25 PM, Fabio Estevam
 fabio.este...@freescale.com wrote:
 Tested by booting a mainline kernel via TFTP.

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 
 Any comments about this one?
 

Not on my side - I set it ready to be merged.

Regards,
Stefano

-- 
=
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


[U-Boot] [PATCH v4 1/4] bootm: make use of legacy image format configurable

2014-05-20 Thread Heiko Schocher
make the use of legacy image format configurable through
the config define CONFIG_IMAGE_FORMAT_LEGACY.

When relying on signed FIT images with required signature check
the legacy image format should be disabled. Therefore introduce
this new define and enable legacy image format if CONFIG_FIT_SIGNATURE
is not set. If CONFIG_FIT_SIGNATURE is set disable per default
the legacy image format.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Simon Glass s...@chromium.org
Cc: Lars Steubesand lars.steubes...@philips.com
Cc: Mike Pearce m...@kaew.be
Cc: Wolfgang Denk w...@denx.de
Cc: Tom Rini tr...@ti.com
Cc: Michal Simek mon...@monstr.eu

---
- changes for v2:
  - make the legacy image format configurable through
the define CONFIG_IMAGE_FORMAT_LEGACY.

Default:
if not CONFIG_FIT_SIGNATURE is defined it is enabled,
else disabled.

Disable it with CONFIG_DISABLE_IMAGE_LEGACY if
CONFIG_FIT_SIGNATURE is not defined.
- changes for v3:
  - enable legacy image format for zync as default, as Michak
suggested.

- changes for v4:
  move changes for default settings in include/config_defaults.h
  to include/config_fallbacks.h, so board settings are considered
  as Lars Steubesand suggested.
---
 README| 18 ++
 common/cmd_bootm.c| 14 ++
 common/cmd_disk.c |  4 
 common/cmd_fdc.c  |  4 
 common/cmd_fpga.c |  2 ++
 common/cmd_nand.c |  4 
 common/cmd_source.c   |  4 
 common/cmd_ximg.c |  7 ++-
 common/image-fdt.c| 10 --
 common/image.c| 23 ---
 doc/uImage.FIT/signature.txt  |  3 +++
 include/config_fallbacks.h|  8 
 include/configs/zynq-common.h |  1 +
 include/image.h   |  2 ++
 14 files changed, 94 insertions(+), 10 deletions(-)

diff --git a/README b/README
index ace7091..795486d 100644
--- a/README
+++ b/README
@@ -3157,6 +3157,19 @@ FIT uImage format:
  -150  common/cmd_nand.c   Incorrect FIT image format
   151  common/cmd_nand.c   FIT image format OK
 
+- legacy image format:
+   CONFIG_IMAGE_FORMAT_LEGACY
+   enables the legacy image format support in U-Boot.
+
+   Default:
+   enabled if CONFIG_FIT_SIGNATURE is not defined.
+
+   CONFIG_DISABLE_IMAGE_LEGACY
+   disable the legacy image format
+
+   This define is introduced, as the legacy image format is
+   enabled per default for backward compatibility.
+
 - FIT image support:
CONFIG_FIT
Enable support for the FIT uImage format.
@@ -3173,6 +3186,11 @@ FIT uImage format:
using a hash signed and verified using RSA. See
doc/uImage.FIT/signature.txt for more details.
 
+   WARNING: When relying on signed FIT images with required
+   signature check the legacy image format is default
+   disabled. If a board need legacy image format support
+   enable this through CONFIG_IMAGE_FORMAT_LEGACY
+
 - Standalone program support:
CONFIG_STANDALONE_LOAD_ADDR
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index e683af3..21d0234 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -233,6 +233,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int 
argc,
 
/* get image parameters */
switch (genimg_get_format(os_hdr)) {
+#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
case IMAGE_FORMAT_LEGACY:
images.os.type = image_get_type(os_hdr);
images.os.comp = image_get_comp(os_hdr);
@@ -241,6 +242,7 @@ static int bootm_find_os(cmd_tbl_t *cmdtp, int flag, int 
argc,
images.os.end = image_get_image_end(os_hdr);
images.os.load = image_get_load(os_hdr);
break;
+#endif
 #if defined(CONFIG_FIT)
case IMAGE_FORMAT_FIT:
if (fit_image_get_type(images.fit_hdr_os,
@@ -838,6 +840,7 @@ int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd)
return 0;
 }
 
+#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
 /**
  * image_get_kernel - verify legacy format kernel image
  * @img_addr: in RAM address of the legacy format image to be verified
@@ -888,6 +891,7 @@ static image_header_t *image_get_kernel(ulong img_addr, int 
verify)
}
return hdr;
 }
+#endif
 
 /**
  * boot_get_kernel - find kernel image
@@ -905,7 +909,9 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int 
flag, int argc,
char * const argv[], bootm_headers_t *images, ulong *os_data,
ulong *os_len)
 {
+#if defined(CONFIG_IMAGE_FORMAT_LEGACY)
image_header_t  *hdr;
+#endif
ulong   img_addr;
const void *buf;
 #if defined(CONFIG_FIT)
@@ -943,6 +949,7 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int 
flag, int argc,
*os_data 

[U-Boot] [PATCH v4 0/4] mpc8313: ids8313 board updates

2014-05-20 Thread Heiko Schocher
- introduce CONFIG_IMAGE_FORMAT_LEGACY for enabling
  booting legacy image format. Disable this per default if
  CONFIG_FIT_SIGNATURE is defined.
  As the ids8313 board needs legacy image format and uses
  CONFIG_FIT_SIGNATURE, enable legacy image format for the
  ids8313 board

- add CONFIG_SYS_GENERIC_BOARD to the ids8313 board,
  therefore fdtdec_get_int() is moved out of lib/fdtdec.c
  as lib/fdtdec.c is only compiled if CONFIG_OF_CONTROL
  is defined, but defining this for the ids8313 board
  leads in conjunction with CONFIG_SYS_GENERIC_BOARD
  in booting error:

No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or 
define CONFIG_OF_EMBED. For sandbox, use -d file.dtb

  So move the common used function fdtdec_get_int()
  out of lib/fdtdec.c into lib/fdtdec_common.c

Cc: Simon Glass s...@chromium.org
Cc: Kim Phillips kim.phill...@freescale.com
Cc: Wolfgang Denk w...@denx.de
Cc: Tom Rini tr...@ti.com
Cc: Michael Conrad michael.con...@ids.de

Tested this patchset on the ids8313 board, MAKEALL for powerpc
and arm adds no compiler errors/warnings.

While testing this patchset on the ids8313 board, I found, that
current U-Boot compiles fine with eldk 5.5, but if erasing the
sectors where U-Boot resists in the NOR flash, u-boot commands
are not longer working :-(

$ powerpc-linux-gcc -v
Using built-in specs.
COLLECT_GCC=powerpc-linux-gcc
COLLECT_LTO_WRAPPER=/opt/eldk-5.5/powerpc/sysroots/i686-eldk-linux/usr/libexec/powerpc-linux/gcc/powerpc-linux/4.8.1/lto-wrapper
Target: powerpc-linux
[...]
Thread model: posix
gcc version 4.8.1 (GCC) 
$

This problem does not pop up with eldk 5.4 or 5.3 !

Digged a little bit in it, and found that some (not all!) fmt
strings are loaded from flash addresses not from ram addresses ...

gdb shows:
Program received signal SIGTRAP, Trace/breakpoint trap.
printf (fmt=0xfff5ad34 '\377' repeats 200 times..., fmt@entry=0x7fdad34 
parse_stream, end_trigger=%d\n) at /home/hs/ids/u-boot/common/console.c:479
^^
addr in nor flash not in ram
479 {
(gdb) bt
#0  printf (fmt=0xfff5ad34 '\377' repeats 200 times..., fmt@entry=0x7fdad34 
parse_stream, end_trigger=%d\n) at /home/hs/ids/u-boot/common/console.c:479
#1  0x07f88c4c in parse_stream (end_trigger=10, input=0x775fe00, ctx=0x775fd60, 
dest=0x775fd7c) at /home/hs/ids/u-boot/common/hush.c:2942
 
this leads, if flash is erased, in a crash ... try to find out
more ...

This problem seems a toolchain problem, as I tried older
U-Boot versions with eldk 5.5 on this board, and all versions
break ... I have no other mpc83xx board handy ... can somebody
try this scenario on a mpc83xx based board? Kim?

Current U-Boot does work fine on a mpc52xx based board compiled
with eldk 5.5, so it seems a mpc83xx specific problem?

Heiko Schocher (4):
  bootm: make use of legacy image format configurable
  mpc8313, signed fit: enable legacy image format on ids8313 board
  lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c
  mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board

 README| 18 ++
 common/cmd_bootm.c| 14 ++
 common/cmd_disk.c |  4 
 common/cmd_fdc.c  |  4 
 common/cmd_fpga.c |  2 ++
 common/cmd_nand.c |  4 
 common/cmd_source.c   |  4 
 common/cmd_ximg.c |  7 ++-
 common/image-fdt.c| 10 --
 common/image.c| 23 ---
 doc/uImage.FIT/signature.txt  |  3 +++
 include/config_fallbacks.h|  8 
 include/configs/ids8313.h |  4 +++-
 include/configs/zynq-common.h |  1 +
 include/image.h   |  2 ++
 lib/Makefile  |  1 +
 lib/fdtdec.c  | 36 
 lib/fdtdec_common.c   | 33 +
 tools/fdtdec.c|  1 +
 19 files changed, 132 insertions(+), 47 deletions(-)
 create mode 100644 lib/fdtdec_common.c

-- 
1.8.3.1

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


[U-Boot] [PATCH v4 4/4] mpc8313: add CONFIG_SYS_GENERIC_BOARD to ids8313 board

2014-05-20 Thread Heiko Schocher
- add CONFIG_SYS_GENERIC_BOARD
- remove CONFIG_OF_CONTROL to boot again

Signed-off-by: Heiko Schocher h...@denx.de
Acked-by: Kim Phillips kim.phill...@freescale.com
Cc: Simon Glass s...@chromium.org

---
- changes for v2:
  - added acked-by from Kim
- changes for v3:
  none
- changes for v4:
  none
---
 include/configs/ids8313.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 1de5750..3e55247 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -19,6 +19,8 @@
 #define CONFIG_MPC8313
 #define CONFIG_IDS8313
 
+#define CONFIG_SYS_GENERIC_BOARD
+
 #define CONFIG_FSL_ELBC
 
 #define CONFIG_MISC_INIT_R
@@ -582,6 +584,5 @@
 #define CONFIG_RSA
 #define CONFIG_SHA1
 #define CONFIG_SHA256
-#define CONFIG_OF_CONTROL
 
 #endif /* __CONFIG_H */
-- 
1.8.3.1

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


[U-Boot] [PATCH v4 3/4] lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c

2014-05-20 Thread Heiko Schocher
move fdtdec_get_int() out of lib/fdtdec.c into lib/fdtdec_common.c
as this function is also used, if CONFIG_OF_CONTROL is not
used. Poped up on the ids8313 board using signed FIT images,
and activating CONFIG_SYS_GENERIC_BOARD. Without this patch
it shows on boot:

No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or 
define CONFIG_OF_EMBED. For sandbox, use -d file.dtb

With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
enabled.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Simon Glass s...@chromium.org
Cc: Tom Rini tr...@ti.com

---
- changes for v2:
  - remove fdtdec_get_int() in lib/fdtdec.c
  - only one fdtdec_get_int() implementation
 Tested on the ids8313 board (on host and target side)
- changes for v3:
  use fdt_getprop() instead fdt_getprop_w() so we avoid a cast
  as Simon suggested.
- changes for v4:
  none
---
 lib/Makefile|  1 +
 lib/fdtdec.c| 36 
 lib/fdtdec_common.c | 33 +
 tools/fdtdec.c  |  1 +
 4 files changed, 35 insertions(+), 36 deletions(-)
 create mode 100644 lib/fdtdec_common.c

diff --git a/lib/Makefile b/lib/Makefile
index a4999e2..d3135c9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -23,6 +23,7 @@ obj-$(CONFIG_USB_TTY) += circbuf.o
 obj-y += crc7.o
 obj-y += crc8.o
 obj-y += crc16.o
+obj-y += fdtdec_common.o
 obj-$(CONFIG_OF_CONTROL) += fdtdec.o
 obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
 obj-$(CONFIG_GZIP) += gunzip.o
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 8ecb80f..21d5e85 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -109,24 +109,6 @@ fdt_addr_t fdtdec_get_addr(const void *blob, int node,
return fdtdec_get_addr_size(blob, node, prop_name, NULL);
 }
 
-s32 fdtdec_get_int(const void *blob, int node, const char *prop_name,
-   s32 default_val)
-{
-   const s32 *cell;
-   int len;
-
-   debug(%s: %s: , __func__, prop_name);
-   cell = fdt_getprop(blob, node, prop_name, len);
-   if (cell  len = sizeof(s32)) {
-   s32 val = fdt32_to_cpu(cell[0]);
-
-   debug(%#x (%d)\n, val, val);
-   return val;
-   }
-   debug((not found)\n);
-   return default_val;
-}
-
 uint64_t fdtdec_get_uint64(const void *blob, int node, const char *prop_name,
uint64_t default_val)
 {
@@ -646,22 +628,4 @@ int fdtdec_read_fmap_entry(const void *blob, int node, 
const char *name,
 
return 0;
 }
-#else
-#include libfdt.h
-#include fdt_support.h
-
-int fdtdec_get_int(const void *blob, int node, const char *prop_name,
-   int default_val)
-{
-   const int *cell;
-   int len;
-
-   cell = fdt_getprop_w((void *)blob, node, prop_name, len);
-   if (cell  len = sizeof(int)) {
-   int val = fdt32_to_cpu(cell[0]);
-
-   return val;
-   }
-   return default_val;
-}
 #endif
diff --git a/lib/fdtdec_common.c b/lib/fdtdec_common.c
new file mode 100644
index 000..bca787b
--- /dev/null
+++ b/lib/fdtdec_common.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014
+ * Heiko Schocher, DENX Software Engineering, h...@denx.de.
+ *
+ * Based on lib/fdtdec.c:
+ * Copyright (c) 2011 The Chromium OS Authors.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef USE_HOSTCC
+#include common.h
+#include libfdt.h
+#include fdtdec.h
+#else
+#include libfdt.h
+#include fdt_support.h
+#endif
+
+int fdtdec_get_int(const void *blob, int node, const char *prop_name,
+   int default_val)
+{
+   const int *cell;
+   int len;
+
+   cell = fdt_getprop(blob, node, prop_name, len);
+   if (cell  len = sizeof(int)) {
+   int val = fdt32_to_cpu(cell[0]);
+
+   return val;
+   }
+   return default_val;
+}
diff --git a/tools/fdtdec.c b/tools/fdtdec.c
index f1c2256..9987f83 100644
--- a/tools/fdtdec.c
+++ b/tools/fdtdec.c
@@ -1 +1,2 @@
+#include ../lib/fdtdec_common.c
 #include ../lib/fdtdec.c
-- 
1.8.3.1

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


[U-Boot] [PATCH v4 2/4] mpc8313, signed fit: enable legacy image format on ids8313 board

2014-05-20 Thread Heiko Schocher
Enable legacy image format with CONFIG_IMAGE_FORMAT_LEGACY
on the ids8313 board, as it uses signed FIT images for booting
Linux and need the legacy image format.

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Simon Glass s...@chromium.org
Cc: Kim Phillips kim.phill...@freescale.com
Cc: Michael Conrad michael.con...@ids.de

---
- changes for v2:
  - enable (not disable) the legacy image format for this board
- changes for v3:
  none
- changes for v4:
  none
---
 include/configs/ids8313.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index c1b3b63..1de5750 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -576,6 +576,7 @@
 
 #define CONFIG_FIT
 #define CONFIG_FIT_SIGNATURE
+#define CONFIG_IMAGE_FORMAT_LEGACY
 #define CONFIG_CMD_FDT
 #define CONFIG_CMD_HASH
 #define CONFIG_RSA
-- 
1.8.3.1

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


Re: [U-Boot] [RFC] POWER framework v3 - wish list

2014-05-20 Thread Przemyslaw Marczak

Hello Marek,

On 05/15/2014 09:01 PM, Marek Vasut wrote:

On Friday, May 09, 2014 at 08:58:02 AM, Przemyslaw Marczak wrote:

Hello,


[...]


   struct power_ops_key_power {
int (*key_state) (int *state);
   };


This could be a key input device.


   struct power_ops_rtc {
int (*sec) (int set_get, int *val);
int (*min) (int set_get, int *val);
int (*hour) (int set_get, int *val);
int (*day) (int set_get, int *val);
int (*month) (int set_get, int *val);
int (*year) (int set_get, int *val);
   };


RTC device.


   struct power_ops_motor {
int (*configure) (void);
int (*enable) (int time, int gain);
   };

   struct power_ops_led_flash {
int (*configure) (void);
int (*enable) (void);
int (*disable) (void);
   };


LED device.


Yes, they are actually a various devices with separated options.

I looked into some Frescale and Maxim PMICs documentation. And those 
integrated devices usually provides various ops on one or two 
interfaces. So I think it would be nice to have one framework and e.g. 
register available devices options for each interface of each device.




It seems like you're trying to assemble a huge framework while avoiding the
already-present frameworks. No?



You're right - we have some frameworks at present and this framework 
could be an additional abstraction level between device and uboot commands.

Device could be presented as it was designed - is it bad idea?


Best regards,
Marek Vasut



Thanks
--
Przemyslaw Marczak
Samsung RD Institute Poland
Samsung Electronics
p.marc...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2014-05-20 Thread Albert ARIBAUD
Hello Tom,

The following changes since commit
d7782d06534fe4fa47a49fa7c106de5ba85a9687:

  Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx (2014-05-16
  18:30:33 -0400)

are available in the git repository at:


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

for you to fetch changes up to 05d134b084590684bcf4d832c0035952727b7cd9:

  Merge remote-tracking branch 'u-boot/master' (2014-05-20 10:05:42
  +0200)

Note: there still is a Zynq PR pending right now, but I wanted
to get re-synchronized with mainline first; a further PR with Zynq
and individual patches will arrive soon.



Akshay Saraswat (3):
  Exynos5: config: Enable FIT
  S5P: Exynos: Add GPIO pin numbering and rename definitions
  S5P: Exynos: Config: Enable GPIO CMD config

Albert ARIBAUD (12):
  arm1136: move cache code from start.S to cache.c
  arm: move reset_cpu from start.S into cpu.c
  arm: pxa: move SP check from start.S to cpuinfo.c
  arm: remove unused _end_vect and _vectors_end symbols
  arm: move exception handling out of start.S files
  Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
  Merge remote-tracking branch 'u-boot-sh/rmobile'
  boards.cfg: reformat
  Merge remote-tracking branch 'u-boot/master'

Ash Charles (1):
  am335x: pepper: Add Gumstix Pepper AM335x-based machine

Belisko Marek (1):
  mtd: nand: omap_gpmc: Fix update of read_ecc in oob

Christian Riesch (1):
  arm, davinci: Use CONFIG_SPL_PAD_TO for padding the SPL in an ais
image

Dmitry Lifshitz (3):
  ARM: OMAP5: add UART4 support
  ARM: OMAP5: Power: add LDO2 support for Palmas driver
  ARM: OMAP5: add CKO buffer control mask

Egli, Samuel (7):
  siemens: cosmetic: remove unused and rename defines
  siemens: update DDR3 parameters for dxr2
  siemens: add led cmd for flexible LED control
  siemens: change LED indication in DFU mode
  siemens: cosmetic: rename project_dir
  siemens:cosmetic, dxr2: rename dxr2 to draco
  siemens, draco: add new target

Eric Benard (8):
  imx-common: add board_video_skip
  nitrogen6x: use common board_video_skip
  mx6sabresd: use common board_video_skip
  RiOTboard and MarSBoard: add new boards support
  imx-common/video: add detect_hdmi
  nitrogen6x: use common detect_hdmi
  mx6sabresd: use common detect_hdmi
  embest/mx6boards: use common detect_hdmi

Eric Nelson (1):
  ARM: imx6: nitrogen6x: Enable CONFIG_SYS_GENERIC_BOARD

Fabio Estevam (11):
  wandboard: Convert to generic board
  mx53loco: Convert to generic board
  mx6sabre_common: Convert to generic board
  mx53ard: Convert to generic board
  mx53smd: Convert to generic board
  mx53evk: Convert to generic board
  udoo: Convert to generic board
  hummingboard: Convert to generic board
  mx6slevk: Add SPI NOR flash support
  nitrogen6x: Fix the PAD settings for the ECSPI chipselect
  iomux-v3: Add support for mx6sl LVE bit

Inha Song (1):
  samsung: misc: add env default option to lcd menu

Jaehoon Chung (1):
  ARM: exynos: remove the unused code

Khoronzhuk, Ivan (1):
  config: k2hk_evm: Add generic board support

Marek Vasut (1):
  arm: mxs: Enable CONFIG_SYS_GENERIC_BOARD

Mateusz Zalega (1):
  ARM: Samsung: s5p_goni: maintainer update

Nobuhiro Iwamatsu (22):
  arm: rmobile: Coordinate the common part of the header file of
r8a7790 and r8a7791 arm: rmobile: r8a779x: Fix L2 cache init and
latency setting arm: rmobile: koelsch: Change name of structure
  arm: rmobile: koelsch: Remove NOR-Flash support
  arm: rmobile: lager: Change name of the structure
  arm: rmobile: lager: Remove NOR-Flash support
  arm: rmobile: Merge functions to get the CPU information of
R8A7790 and R8A7791 arm: rmobile: Add 1 to value of the CPU revision in
rmobile_get_cpu_rev_integer() arm: rmobile: Add
rmobile_get_cpu_rev_fraction() for R-Car SoCs arm: rmobile: Add
prototype for function to get the CPU information to rmobile.h arm:
rmobile: Update print_cpuinfo function arm: rmobile: r8a7790: Add
support ES2 revision arm: rmobile: r8a7791: Add support ES2 revision
  arm: rmobile: keolsch: Add support ES2 revision of R8A7791
  arm: rmobile: lager: Update QoS initialization to version 0.955
  arm: rmobile: koelsch: Update QoS initialization
  arm: rmobile: koelsch: Update calculation of
CONFIG_SH_TMU_CLK_FREQ arm: rmobile: Add register infomation of PLL
regsiter arm: rmobile: koelsch: Change to maximum CPU frequency
  arm: rmobile: lager: Update calculation of CONFIG_SH_TMU_CLK_FREQ
  arm: rmobile: lager: Change to maximum CPU frequency
  arm: rmobile: lager: Remove MACH_TYPE_LAGER and 

[U-Boot] build u-boot tools for win32

2014-05-20 Thread Hannes Petermaier
Hi,

did anyone a successfull build of the u-boot tools for win32 ?

i try:
make HOSTCC=i686-w64-mingw32-gcc tools

and get:
scripts/basic/fixdep.c:108:22: fatal error: sys/mman.h: Datei oder
Verzeichnis nicht gefunden

Datei oder Verzeichnis nicht gefunden means 'file not found'

many thanks and best regards,
hannes


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


Re: [U-Boot] [RFC] POWER framework v3 - wish list

2014-05-20 Thread Przemyslaw Marczak

Hello Simon,

On 05/19/2014 08:37 PM, Simon Glass wrote:

Hi,

On 9 May 2014 03:25, Przemyslaw Marczak p.marc...@samsung.com wrote:

Hello,

Some time ago I had a pleasure to work on some kind of a simple
charger manager for u-boot. For checking battery charge level, cable
state, and some more info I made a common calls which were implemented in
board files, so actually it didn't base directly on PMIC framework. This
allowed making charger abstraction but it was a second power related
framework next to the PMIC.
 From my side I would like to introduce its next version according to the
doc/README.power-framework documents TO DO list and some more...

In this RFC any comments about next version of power management framework
are welcome.
What new PMIC framework should provide?
How to extend it?
What can be fixed?

So, what should be done (in my opinion):


Can I suggest we try to build this with driver model if possible? It
seems like you will otherwise end up duplicating much of the plumbing
of that. For example, see 'struct device'.

Regards,
Simon



Yes, I also would like to take it into account - but I am not sure that 
driver model is not too redundant for it?
If I well understand the current driver model - each driver can have 
only one uclass, right? If yes, then for each previous listed ops we 
need to register separate driver - isn't it too much for read one 
register or turn on the led in the same physically device?


So maybe better is to register one power driver in driver model? And 
the power uclass driver could init more then one class specific ops.


I just would like to keep it simply.

Thanks
--
Przemyslaw Marczak
Samsung RD Institute Poland
Samsung Electronics
p.marc...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: at91: remove AT91X40 macro since it is not use any more

2014-05-20 Thread Josh Wu
The at91x40.h is not exist. So we remove it.

Signed-off-by: Josh Wu josh...@atmel.com
---
 arch/arm/include/asm/arch-at91/hardware.h |2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-at91/hardware.h 
b/arch/arm/include/asm/arch-at91/hardware.h
index a63f974..d712a0d 100644
--- a/arch/arm/include/asm/arch-at91/hardware.h
+++ b/arch/arm/include/asm/arch-at91/hardware.h
@@ -25,8 +25,6 @@
 # include asm/arch/at91sam9x5.h
 #elif defined(CONFIG_AT91CAP9)
 # include asm/arch/at91cap9.h
-#elif defined(CONFIG_AT91X40)
-# include asm/arch/at91x40.h
 #elif defined(CONFIG_SAMA5D3)
 # include asm/arch/sama5d3.h
 #else
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 1/3] ARM: at91sam9x5: define the AT91FAMILY and ARM926EJS in SoC header

2014-05-20 Thread Josh Wu
Signed-off-by: Josh Wu josh...@atmel.com
---
v1 - v2:
  1. split the patch alone.
  2. add missed ARM926EJS macro.

 arch/arm/include/asm/arch-at91/at91sam9x5.h |3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/arch-at91/at91sam9x5.h 
b/arch/arm/include/asm/arch-at91/at91sam9x5.h
index a471038..d49c184 100644
--- a/arch/arm/include/asm/arch-at91/at91sam9x5.h
+++ b/arch/arm/include/asm/arch-at91/at91sam9x5.h
@@ -12,6 +12,9 @@
 #ifndef __AT91SAM9X5_H__
 #define __AT91SAM9X5_H__
 
+#define CONFIG_ARM926EJS   /* ARM926EJS Core */
+#define CONFIG_AT91FAMILY  /* it's a member of AT91 family */
+
 /*
  * Peripheral identifiers/interrupts.
  */
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 0/3] ARM: at91: add missed the AT91FAMILY and ARM926EJS in SoC header

2014-05-20 Thread Josh Wu
Add missed AT91FAMILY and ARM926EJS macro in at91sam9x5.h.

Now as all at91 SoC header defined AT91FAMILY and ARM926EJS, so we can
remove the redundant definitions in all at91 board config files.

v1 - v2:
  1. add ARM926EJS in at91sam9x5 SoC header.
  2. remove all redundant ARM926EJS in at91 board files.
  3. remove redundant AT91FAMILY in corvus, cpu9260, ethernut5 and vl_ma2sc 
boards.

Josh Wu (3):
  ARM: at91sam9x5: define the AT91FAMILY and ARM926EJS in SoC header
  at91: remove redundant AT91FAMILY definition in board config file
  ARM: at91: remove redundant ARM926EJS definition in board config files

 arch/arm/include/asm/arch-at91/at91sam9x5.h |3 +++
 include/configs/at91sam9m10g45ek.h  |1 -
 include/configs/at91sam9n12ek.h |3 ---
 include/configs/at91sam9x5ek.h  |1 -
 include/configs/corvus.h|2 --
 include/configs/cpu9260.h   |1 -
 include/configs/ethernut5.h |2 --
 include/configs/sama5d3_xplained.h  |1 -
 include/configs/sama5d3xek.h|1 -
 include/configs/vl_ma2sc.h  |2 --
 10 files changed, 3 insertions(+), 14 deletions(-)

-- 
1.7.9.5

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


[U-Boot] [PATCH v2 2/3] at91: remove redundant AT91FAMILY definition in board config file

2014-05-20 Thread Josh Wu
Now the AT91FAMILY is already defined in the at91 SoC header. The at91
board config file will include the SoC header file.

So we can remove the redundant AT91FAMILY definition in at91 board
config files.

Signed-off-by: Josh Wu josh...@atmel.com
---
v1 - v2:
  1. modified more files, inclulde corvus, cpu9260, ethernut5 and vl_ma2sc 
board.

 include/configs/at91sam9m10g45ek.h |1 -
 include/configs/at91sam9n12ek.h|1 -
 include/configs/at91sam9x5ek.h |1 -
 include/configs/corvus.h   |2 --
 include/configs/cpu9260.h  |1 -
 include/configs/ethernut5.h|1 -
 include/configs/sama5d3_xplained.h |1 -
 include/configs/sama5d3xek.h   |1 -
 include/configs/vl_ma2sc.h |1 -
 9 files changed, 10 deletions(-)

diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index ccfda71..af0415f 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -22,7 +22,6 @@
 #define CONFIG_SYS_AT91_MAIN_CLOCK  1200 /* from 12 MHz crystal */
 
 #define CONFIG_AT91SAM9M10G45EK
-#define CONFIG_AT91FAMILY
 
 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs  */
 #define CONFIG_SETUP_MEMORY_TAGS
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index e23549d..ebfc26e 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -19,7 +19,6 @@
 #define CONFIG_SYS_TEXT_BASE   0x26f0
 
 #define CONFIG_ARM926EJS
-#define CONFIG_AT91FAMILY
 
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768   /* slow clock xtal */
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index f0a6757..b2dd252 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -18,7 +18,6 @@
 #define CONFIG_SYS_AT91_MAIN_CLOCK 1200/* 12 MHz crystal */
 
 #define CONFIG_AT91SAM9X5EK
-#define CONFIG_AT91FAMILY
 
 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
 #define CONFIG_SETUP_MEMORY_TAGS
diff --git a/include/configs/corvus.h b/include/configs/corvus.h
index 959e188..2e118d7 100644
--- a/include/configs/corvus.h
+++ b/include/configs/corvus.h
@@ -34,8 +34,6 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK  32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK  1200 /* from 12 MHz crystal */
 
-#define CONFIG_AT91FAMILY
-
 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs  */
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG
diff --git a/include/configs/cpu9260.h b/include/configs/cpu9260.h
index 39f7062..1feaefd 100644
--- a/include/configs/cpu9260.h
+++ b/include/configs/cpu9260.h
@@ -32,7 +32,6 @@
 
 #include asm/arch/hardware.h
 
-#define CONFIG_AT91FAMILY
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 480d867..89d668b 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -24,7 +24,6 @@
 
 /* CPU information */
 #define CONFIG_ARM926EJS
-#define CONFIG_AT91FAMILY
 #define CONFIG_DISPLAY_CPUINFO /* Display at console. */
 #define CONFIG_ARCH_CPU_INIT
 
diff --git a/include/configs/sama5d3_xplained.h 
b/include/configs/sama5d3_xplained.h
index 41c946d..d7fb850 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -18,7 +18,6 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK  32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK  1200 /* from 12 MHz crystal */
 
-#define CONFIG_AT91FAMILY
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_BOARD_EARLY_INIT_F
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index 516be85..b563732 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -21,7 +21,6 @@
 #define CONFIG_SYS_AT91_SLOW_CLOCK  32768
 #define CONFIG_SYS_AT91_MAIN_CLOCK  1200 /* from 12 MHz crystal */
 
-#define CONFIG_AT91FAMILY
 #define CONFIG_ARCH_CPU_INIT
 
 #ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/vl_ma2sc.h b/include/configs/vl_ma2sc.h
index 14c6e67..8e58ade 100644
--- a/include/configs/vl_ma2sc.h
+++ b/include/configs/vl_ma2sc.h
@@ -14,7 +14,6 @@
 /*--*/
 
 #define CONFIG_ARM926EJS   /* This is an ARM926EJS Core*/
-#define CONFIG_AT91FAMILY
 #define CONFIG_AT91SAM9263 /* It's an Atmel AT91SAM9263 SoC*/
 #define CONFIG_VL_MA2SC/* on an VL_MA2SC Board */
 #define CONFIG_ARCH_CPU_INIT
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 3/3] ARM: at91: remove redundant ARM926EJS definition in board config files

2014-05-20 Thread Josh Wu
As at91 board config file will include the SoC header, so we can remove
the ARM926EJS definition in board config files.

Signed-off-by: Josh Wu josh...@atmel.com
---
 include/configs/at91sam9n12ek.h |2 --
 include/configs/ethernut5.h |1 -
 include/configs/vl_ma2sc.h  |1 -
 3 files changed, 4 deletions(-)

diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index ebfc26e..9b0e588 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -18,8 +18,6 @@
 
 #define CONFIG_SYS_TEXT_BASE   0x26f0
 
-#define CONFIG_ARM926EJS
-
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768   /* slow clock xtal */
 #define CONFIG_SYS_AT91_MAIN_CLOCK 1600/* main clock xtal */
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index 89d668b..c81fc44 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -23,7 +23,6 @@
 #define CONFIG_MACH_TYPE MACH_TYPE_ETHERNUT5
 
 /* CPU information */
-#define CONFIG_ARM926EJS
 #define CONFIG_DISPLAY_CPUINFO /* Display at console. */
 #define CONFIG_ARCH_CPU_INIT
 
diff --git a/include/configs/vl_ma2sc.h b/include/configs/vl_ma2sc.h
index 8e58ade..bef821f 100644
--- a/include/configs/vl_ma2sc.h
+++ b/include/configs/vl_ma2sc.h
@@ -13,7 +13,6 @@
 
 /*--*/
 
-#define CONFIG_ARM926EJS   /* This is an ARM926EJS Core*/
 #define CONFIG_AT91SAM9263 /* It's an Atmel AT91SAM9263 SoC*/
 #define CONFIG_VL_MA2SC/* on an VL_MA2SC Board */
 #define CONFIG_ARCH_CPU_INIT
-- 
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 v2 1/3] ARM: at91sam9x5: define the AT91FAMILY and ARM926EJS in SoC header

2014-05-20 Thread Bo Shen

Hi Josh,

On 05/20/2014 05:44 PM, Josh Wu wrote:

Signed-off-by: Josh Wu josh...@atmel.com


For the whole patch set.

Acked-by: Bo Shen voice.s...@atmel.com


---
v1 - v2:
   1. split the patch alone.
   2. add missed ARM926EJS macro.

  arch/arm/include/asm/arch-at91/at91sam9x5.h |3 +++
  1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/arch-at91/at91sam9x5.h 
b/arch/arm/include/asm/arch-at91/at91sam9x5.h
index a471038..d49c184 100644
--- a/arch/arm/include/asm/arch-at91/at91sam9x5.h
+++ b/arch/arm/include/asm/arch-at91/at91sam9x5.h
@@ -12,6 +12,9 @@
  #ifndef __AT91SAM9X5_H__
  #define __AT91SAM9X5_H__

+#define CONFIG_ARM926EJS   /* ARM926EJS Core */
+#define CONFIG_AT91FAMILY  /* it's a member of AT91 family */
+
  /*
   * Peripheral identifiers/interrupts.
   */



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


Re: [U-Boot] [PATCH] ARM: at91: remove AT91X40 macro since it is not use any more

2014-05-20 Thread Bo Shen

Hi Josh,

On 05/20/2014 05:27 PM, Josh Wu wrote:

The at91x40.h is not exist. So we remove it.

Signed-off-by: Josh Wu josh...@atmel.com


Acked-by: Bo Shen voice.s...@atmel.com


---
  arch/arm/include/asm/arch-at91/hardware.h |2 --
  1 file changed, 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-at91/hardware.h 
b/arch/arm/include/asm/arch-at91/hardware.h
index a63f974..d712a0d 100644
--- a/arch/arm/include/asm/arch-at91/hardware.h
+++ b/arch/arm/include/asm/arch-at91/hardware.h
@@ -25,8 +25,6 @@
  # include asm/arch/at91sam9x5.h
  #elif defined(CONFIG_AT91CAP9)
  # include asm/arch/at91cap9.h
-#elif defined(CONFIG_AT91X40)
-# include asm/arch/at91x40.h
  #elif defined(CONFIG_SAMA5D3)
  # include asm/arch/sama5d3.h
  #else



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


[U-Boot] [PATCH 2/2] ARM: at91sam9m10g45ek: add mmc environment configuration support

2014-05-20 Thread Josh Wu
In this configuration the environment will save in file: uboot.env of
mmc card.

Signed-off-by: Josh Wu josh...@atmel.com
---
 boards.cfg |1 +
 include/configs/at91sam9m10g45ek.h |   20 
 2 files changed, 21 insertions(+)

diff --git a/boards.cfg b/boards.cfg
index 3a59686..9f7cfd8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -102,6 +102,7 @@ Active  arm arm926ejs  at91atmel
   at91sam9263ek
 Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflash
at91sam9263ek:AT91SAM9263,SYS_USE_NORFLASH  
  Stelian Pop 
stel...@popies.net
 Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflash_boot   
at91sam9263ek:AT91SAM9263,SYS_USE_BOOT_NORFLASH 
  Stelian Pop 
stel...@popies.net
 Active  arm arm926ejs  at91atmel   
at91sam9m10g45ekat91sam9m10g45ek_nandflash
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH   
  Bo Shenvoice.s...@atmel.com
+Active  arm arm926ejs  at91atmel   
at91sam9m10g45ekat91sam9m10g45ek_mmc  
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_MMC 
  Bo Shenvoice.s...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_mmc at91sam9n12ek:AT91SAM9N12,SYS_USE_MMC 

Josh Wu josh...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_nandflash   
at91sam9n12ek:AT91SAM9N12,SYS_USE_NANDFLASH 
  Josh Wu josh...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_spiflash
at91sam9n12ek:AT91SAM9N12,SYS_USE_SPIFLASH  
  Josh Wu josh...@atmel.com
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index df277e7..07b2188 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -147,6 +147,7 @@
 #define CONFIG_SYS_MEMTEST_START   CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END 0x23e0
 
+#ifdef CONFIG_SYS_USE_NANDFLASH
 /* bootstrap + u-boot + env in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET  0xc
@@ -162,6 +163,25 @@
256k(env),256k(env_redundant),256k(spare),\
512k(dtb),6M(kernel)ro,-(rootfs)  \
root=/dev/mtdblock7 rw rootfstype=jffs2
+#elif CONFIG_SYS_USE_MMC
+/* bootstrap + u-boot + env + linux in mmc */
+#define FAT_ENV_INTERFACE  mmc
+#define FAT_ENV_DEVICE 0
+#define FAT_ENV_PART   1
+#define FAT_ENV_FILE   uboot.env
+#define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_ENV_SIZE0x4000
+
+#define CONFIG_BOOTARGSmem=128M console=ttyS0,115200  \
+   mtdparts=atmel_nand: \
+   8M(bootstrap/uboot/kernel)ro,-(rootfs)  \
+   root=/dev/mmcblk0p2  \
+   rw rootfstype=ext4 rootwait
+#define CONFIG_BOOTCOMMAND fatload mmc 0:1 0x7100 dtb;  \
+   fatload mmc 0:1 0x7200 uImage;  \
+   bootm 0x7200 - 0x7100
+#endif
 
 #define CONFIG_BAUDRATE115200
 
-- 
1.7.9.5

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


[U-Boot] [PATCH 1/2] ARM: at91sam9m10g45ek: enable mci0 support

2014-05-20 Thread Josh Wu
Enable mci0 support. And enable the mmc command in configuration file.

As both CONFIG_CMD_MMC and CONFIG_CMD_USB use the CONFIG_DOS_PARTITION,
so remove the redundant CONFIG_DOS_PARTITION definition.

Signed-off-by: Josh Wu josh...@atmel.com
---
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   28 +++
 include/configs/at91sam9m10g45ek.h  |   15 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c 
b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index b7e2efd..fd6860b 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -15,7 +15,9 @@
 #include asm/arch/gpio.h
 #include asm/arch/clk.h
 #include lcd.h
+#include mmc.h
 #include atmel_lcdc.h
+#include atmel_mci.h
 #if defined(CONFIG_RESET_PHY_R)  defined(CONFIG_MACB)
 #include net.h
 #endif
@@ -217,6 +219,29 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91sam9m10g45ek_mci_hw_init(void)
+{
+   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+   at91_set_a_periph(AT91_PIO_PORTA, 0, 0);/* MCI0 CLK */
+   at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* MCI0 CDA */
+   at91_set_a_periph(AT91_PIO_PORTA, 2, 0);/* MCI0 DB0 */
+   at91_set_a_periph(AT91_PIO_PORTA, 3, 0);/* MCI0 DB1 */
+   at91_set_a_periph(AT91_PIO_PORTA, 4, 0);/* MCI0 DB2 */
+   at91_set_a_periph(AT91_PIO_PORTA, 5, 0);/* MCI0 DB3 */
+
+   /* Enable clock */
+   writel(1  ATMEL_ID_MCI0, pmc-pcer);
+}
+
+int board_mmc_init(bd_t *bis)
+{
+   at91_set_pio_input(AT91_PIO_PORTD, 10, 0);  /* MCI0 CD */
+   return atmel_mci_init((void *)ATMEL_BASE_MCI0);
+}
+#endif
+
 int board_early_init_f(void)
 {
at91_seriald_hw_init();
@@ -247,6 +272,9 @@ int board_init(void)
 #ifdef CONFIG_ATMEL_SPI
at91_spi0_hw_init(1  4);
 #endif
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+   at91sam9m10g45ek_mci_hw_init();
+#endif
 #ifdef CONFIG_MACB
at91sam9m10g45ek_macb_hw_init();
 #endif
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index ccfda71..df277e7 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -115,6 +115,20 @@
 
 #endif
 
+/* MMC */
+#define CONFIG_CMD_MMC
+
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_GENERIC_ATMEL_MCI
+#endif
+
+#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
 /* Ethernet */
 #define CONFIG_MACB
 #define CONFIG_RMII
@@ -126,7 +140,6 @@
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
-#define CONFIG_DOS_PARTITION
 #define CONFIG_USB_STORAGE
 
 #define CONFIG_SYS_LOAD_ADDR   0x2200  /* load address */
-- 
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 v2 04/12] power: Add support for TPS65090 PMU chip.

2014-05-20 Thread Simon Glass
Hi Minkyu,

On 15 May 2014 00:52, Minkyu Kang mk7.k...@samsung.com wrote:
 On 03/04/14 08:24, Simon Glass wrote:
 From: Tom Wai-Hong Tam waih...@chromium.org

 This adds driver support for the TPS65090 PMU. Support includes
 hooking into the pmic infrastructure  so that the pmic commands
 can be used on the console. The TPS65090 supports the following
 functionality:

 - fet enable/disable/querying
 - getting and setting of charge state

 Even though it is connected to the pmic infrastructure it does
 not hook into the pmic charging charging infrastructure.

 The device tree binding is from Linux, but only a small subset of
 functionality is supported.

 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Katie Roberts-Hoffman kati...@chromium.org
 Signed-off-by: Rong Chang rongch...@chromium.org
 Signed-off-by: Sean Paul seanp...@chromium.org
 Signed-off-by: Vincent Palatin vpala...@chromium.org
 Signed-off-by: Aaron Durbin adur...@chromium.org
 Signed-off-by: Simon Glass s...@chromium.org
 ---

 Changes in v2:
 - Removed non-device-tree operation
 - Use errno.h for error return codes everywhere
 - Plumb into pmic charging framework
 - Fix style nit
 - Use correct license header
 - Use new Linux device tree bindings
 - Add partial battery charging support

  doc/device-tree-bindings/power/tps65090.txt |  17 ++
  doc/device-tree-bindings/regulator/tps65090.txt | 122 +
  drivers/power/pmic/Makefile |   1 +
  drivers/power/pmic/pmic_tps65090.c  | 312 
 
  include/fdtdec.h|   1 +
  include/power/tps65090_pmic.h   |  73 ++
  lib/fdtdec.c|   1 +
  7 files changed, 527 insertions(+)
  create mode 100644 doc/device-tree-bindings/power/tps65090.txt
  create mode 100644 doc/device-tree-bindings/regulator/tps65090.txt
  create mode 100644 drivers/power/pmic/pmic_tps65090.c
  create mode 100644 include/power/tps65090_pmic.h


[snip]

 diff --git a/drivers/power/pmic/pmic_tps65090.c 
 b/drivers/power/pmic/pmic_tps65090.c
 new file mode 100644
 index 000..8558b43
 --- /dev/null
 +++ b/drivers/power/pmic/pmic_tps65090.c
 @@ -0,0 +1,312 @@
 +/*
 + * Copyright (c) 2012 The Chromium OS Authors.
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#include common.h
 +#include errno.h
 +#include fdtdec.h
 +#include i2c.h
 +#include power/pmic.h
 +#include power/tps65090_pmic.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#define TPS65090_NAME TPS65090_PMIC
 +
 +/* TPS65090 register addresses */
 +enum {
 + REG_IRQ1 = 0,
 + REG_CG_CTRL0 = 4,
 + REG_CG_STATUS1 = 0xa,
 + REG_FET1_CTRL = 0x0f,
 + REG_FET2_CTRL,
 + REG_FET3_CTRL,
 + REG_FET4_CTRL,
 + REG_FET5_CTRL,
 + REG_FET6_CTRL,
 + REG_FET7_CTRL,
 + TPS65090_NUM_REGS,
 +};
 +
 +enum {
 + IRQ1_VBATG = 1  3,
 + CG_CTRL0_ENC_MASK   = 0x01,
 +
 + MAX_FET_NUM = 7,
 + MAX_CTRL_READ_TRIES = 5,
 +
 + /* TPS65090 FET_CTRL register values */
 + FET_CTRL_TOFET  = 1  7,  /* Timeout, startup, overload */
 + FET_CTRL_PGFET  = 1  4,  /* Power good for FET status */
 + FET_CTRL_WAIT   = 3  2,  /* Overcurrent timeout max */
 + FET_CTRL_ADENFET= 1  1,  /* Enable output auto discharge */
 + FET_CTRL_ENFET  = 1  0,  /* Enable FET */
 +};

 Are there any special reason to use enum?

Yes it provides symbols for debugging and avoids needing brackets for
expressions.


 +
 +/**
 + * Checks for a valid FET number
 + *
 + * @param fet_id FET number to check
 + * @return 0 if ok, -EINVAL if FET value is out of range
 + */
 +static int tps65090_check_fet(unsigned int fet_id)
 +{
 + if (fet_id == 0 || fet_id  MAX_FET_NUM) {
 + debug(parameter fet_id is out of range, %u not in 1 ~ %u\n,
 +   fet_id, MAX_FET_NUM);
 + return -EINVAL;
 + }
 +
 + return 0;
 +}
 +
 +/**
 + * Set the power state for a FET
 + *
 + * @param pmic   pmic structure for the tps65090
 + * @param fet_id Fet number to set (1..MAX_FET_NUM)
 + * @param set1 to power on FET, 0 to power off
 + * @return -EIO if we got a comms error, -EAGAIN if the FET failed to
 + * change state. If all is ok, returns 0.
 + */
 +static int tps65090_fet_set(struct pmic *pmic, int fet_id, bool set)
 +{
 + int retry;
 + u32 reg, value;
 +
 + value = FET_CTRL_ADENFET | FET_CTRL_WAIT;
 + if (set)
 + value |= FET_CTRL_ENFET;
 +
 + if (pmic_reg_write(pmic, REG_FET1_CTRL + fet_id - 1, value))
 + return -EIO;
 +
 + /* Try reading until we get a result */
 + for (retry = 0; retry  MAX_CTRL_READ_TRIES; retry++) {
 + if (pmic_reg_read(pmic, REG_FET1_CTRL + fet_id - 1, reg))
 + return -EIO;
 +
 + /* Check that the fet went into the expected state 

Re: [U-Boot] [PATCH v2 07/12] exynos5: support tps65090 pmic

2014-05-20 Thread Simon Glass
Hi Minkyu,

On 15 May 2014 00:51, Minkyu Kang mk7.k...@samsung.com wrote:
 On 03/04/14 08:24, Simon Glass wrote:
 From: Aaron Durbin adur...@chromium.org

 The TSP65090 is a PMIC on some exynos5 boards. The init function is
 called for the TPS65090 pmic. If that device is not a part of the device
 tree (returns -ENODEV) then continue. Otherwise return a failure.

 Signed-off-by: Aaron Durbin adur...@chromium.org
 Signed-off-by: Simon Glass s...@chromium.org
 Reviewed-by: Simon Glass s...@chromium.org
 ---

 Changes in v2:
 - Move code to exynos5-dt.c
 - Fix comment style
 - Add #ifdef around tps65090 code

  board/samsung/smdk5250/exynos5-dt.c | 13 +
  1 file changed, 13 insertions(+)

 diff --git a/board/samsung/smdk5250/exynos5-dt.c 
 b/board/samsung/smdk5250/exynos5-dt.c
 index 1a64b9b..2c1cf8a 100644
 --- a/board/samsung/smdk5250/exynos5-dt.c
 +++ b/board/samsung/smdk5250/exynos5-dt.c
 @@ -20,6 +20,7 @@
  #include asm/arch/sromc.h
  #include power/pmic.h
  #include power/max77686_pmic.h
 +#include power/tps65090_pmic.h
  #include tmu.h

  DECLARE_GLOBAL_DATA_PTR;
 @@ -164,7 +165,19 @@ int exynos_power_init(void)

  #ifdef CONFIG_POWER_MAX77686
   ret = max77686_init();
 + if (ret)
 + return ret;
  #endif
 +#ifdef CONFIG_POWER_TPS65090
 + /*
 +  * The TPS65090 may not be in the device tree. If so, it is not
 +  * an error.

 Then, how we can initialise the tps65090?

It is initialised if a suitable node is found in the device tree. If
the device tree does not have it, then the hardware is assumed to not
have this chip.


 +  */
 + ret = tps65090_init();
 + if (ret == 0 || ret == -ENODEV)
 + return 0;
 +#endif
 +
   return ret;
  }
  #endif   /* CONFIG_POWER */


 Thanks,
 Minkyu Kang.

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


Re: [U-Boot] [PATCH v2 11/12] exynos: Enable the LCD backlight for snow

2014-05-20 Thread Simon Glass
Hi Minkyu,

On 15 May 2014 00:51, Minkyu Kang mk7.k...@samsung.com wrote:
 On 03/04/14 08:24, Simon Glass wrote:
 The backlight uses FETs on the TPS65090. Enable this so that the display
 is visible.

 Signed-off-by: Simon Glass s...@chromium.org
 Reviewed-by: Lukasz Majewski l.majew...@samsung.com
 ---

 Changes in v2:
 - Only set up the EDP bridge for snow
 - Add a device tree compatibility string for the EDP bridge
 - Check for EDP failure and print an error in that case
 - Return immediately in exynos_backlight_on() if needed

  board/samsung/smdk5250/exynos5-dt.c | 103 
 
  include/fdtdec.h|   1 +
  lib/fdtdec.c|   1 +
  3 files changed, 105 insertions(+)

 diff --git a/board/samsung/smdk5250/exynos5-dt.c 
 b/board/samsung/smdk5250/exynos5-dt.c
 index 2c1cf8a..73c9a35 100644
 --- a/board/samsung/smdk5250/exynos5-dt.c
 +++ b/board/samsung/smdk5250/exynos5-dt.c
 @@ -183,6 +183,61 @@ int exynos_power_init(void)
  #endif   /* CONFIG_POWER */

  #ifdef CONFIG_LCD
 +static int board_dp_bridge_setup(void)
 +{
 + struct exynos5_gpio_part1 *gpio1 =
 + (struct exynos5_gpio_part1 *)samsung_get_base_gpio_part1();
 + const int MAX_TRIES = 10;

 please don't use upper case at local variable.
 If need, please define it.

Done


 + int num_tries, node;
 +
 + /*
 +  * TODO(sjg): Use device tree for GPIOs when exynos GPIO
 +  * numbering patch is in mainline.
 +  */
 + debug(%s\n, __func__);
 + node = fdtdec_next_compatible(gd-fdt_blob, 0, COMPAT_NXP_PTN3460);
 + if (node  0) {
 + debug(%s: No node for DP bridge in device tree\n, __func__);
 + return -ENODEV;
 + }
 +
 + /* Setup the GPIOs */
 +
 + /* PD is ACTIVE_LOW, and initially de-asserted */
 + s5p_gpio_set_pull(gpio1-y2, 5, GPIO_PULL_NONE);
 + s5p_gpio_direction_output(gpio1-y2, 5, 1);
 +
 + /* Reset is ACTIVE_LOW */
 + s5p_gpio_set_pull(gpio1-x1, 5, GPIO_PULL_NONE);
 + s5p_gpio_direction_output(gpio1-x1, 5, 0);
 +
 + udelay(10);
 + s5p_gpio_set_value(gpio1-x1, 5, 1);
 +
 + s5p_gpio_direction_input(gpio1-x0, 7);

 seems to need rebase this patch.

Done


 +
 + /*
 +  * We need to wait for 90ms after bringing up the bridge since there
 +  * is a phantom high on the HPD chip during its bootup.  The phantom
 +  * high comes within 7ms of de-asserting PD and persists for at least
 +  * 15ms.  The real high comes roughly 50ms after PD is de-asserted. The
 +  * phantom high makes it hard for us to know when the NXP chip is up.
 +  */
 + mdelay(90);
 +
 + for (num_tries = 0; num_tries  MAX_TRIES; num_tries++) {
 + /* Check HPD.  If it's high, we're all good. */
 + if (s5p_gpio_get_value(gpio1-x0, 7))
 + return 0;
 +
 + debug(%s: eDP bridge failed to come up; try %d of %d\n,
 +   __func__, num_tries, MAX_TRIES);
 + }
 +
 + /* Immediately go into bridge reset if the hp line is not high */
 + return -ENODEV;
 +}
 +
  void exynos_cfg_lcd_gpio(void)
  {
   struct exynos5_gpio_part1 *gpio1 =
 @@ -204,4 +259,52 @@ void exynos_set_dp_phy(unsigned int onoff)
  {
   set_dp_phy_ctrl(onoff);
  }
 +
 +void exynos_backlight_on(unsigned int onoff)

 onoff, then value is 1. is it on or off?
 How about rename it to on?

Done


 +{
 + debug(%s(%u)\n, __func__, onoff);
 +
 + if (!onoff)
 + return;
 +
 +#ifdef CONFIG_POWER_TPS65090
 + struct exynos5_gpio_part1 *gpio1 =
 + (struct exynos5_gpio_part1 *)
 + samsung_get_base_gpio_part1();
 + int ret;
 +
 + ret = tps65090_fet_enable(1); /* Enable FET1, backlight */
 + if (ret)
 + return;
 +
 + /* T5 in the LCD timing spec (defined as  10ms) */
 + mdelay(10);
 +
 + /* board_dp_backlight_pwm */
 + s5p_gpio_direction_output(gpio1-b2, 0, 1);
 +
 + /* T6 in the LCD timing spec (defined as  10ms) */
 + mdelay(10);
 +
 + /* board_dp_backlight_en */
 + s5p_gpio_direction_output(gpio1-x3, 0, 1);
 +#endif
 +}
 +
 +void exynos_lcd_power_on(void)
 +{
 + int ret;
 +
 + debug(%s\n, __func__);
 +
 +#ifdef CONFIG_POWER_TPS65090
 + /* board_dp_lcd_vdd */
 + tps65090_fet_enable(6); /* Enable FET6, lcd panel */
 +#endif
 +
 + ret = board_dp_bridge_setup();
 + if (ret  ret != -ENODEV)
 + printf(LCD bridge failed to enable: %d\n, ret);
 +}
 +
  #endif
 diff --git a/include/fdtdec.h b/include/fdtdec.h
 index 669ab90..ea50d75 100644
 --- a/include/fdtdec.h
 +++ b/include/fdtdec.h
 @@ -93,6 +93,7 @@ enum fdt_compat_id {
   COMPAT_SANDBOX_HOST_EMULATION,  /* Sandbox emulation of a function */
   COMPAT_SANDBOX_LCD_SDL, /* Sandbox LCD emulation with SDL */
   COMPAT_TI_TPS65090, /* Texas Instrument TPS65090 */
 + COMPAT_NXP_PTN3460, /* 

Re: [U-Boot] [PATCH v2 09/12] exynos: dts: Disable cros_ec interrupts due to broken GPIOs

2014-05-20 Thread Simon Glass
Hi Minkyu,

On 19 May 2014 18:53, Minkyu Kang mk7.k...@samsung.com wrote:
 On 20/05/14 06:27, Simon Glass wrote:
 Hi Minkyu,

 On 15 May 2014 00:51, Minkyu Kang mk7.k...@samsung.com wrote:
 On 03/04/14 08:24, Simon Glass wrote:
 At present the GPIO numbering patch has not been applied, so exynos GPIO
 numbering is inconsistent (there are large gaps). Disable interrupts to
 avoid a crash on boot.

 now, gpio patch is merged to u-boot-samsung.

 I don't see it in mainline yet, and there are conflicts. But I'll see
 if I can send a new series.


 please find this commit (f6ae1ca05839f92b103aaa0743d1d0012ba9773d)

OK thanks, I think I have something that can be applied.

I can correct the GPIO numbers now, so will replace this patch.

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


Re: [U-Boot] [PATCH v2 10/12] exynos: dts: Enable LCD for snow

2014-05-20 Thread Simon Glass
Hi Minkyu,

On 15 May 2014 00:51, Minkyu Kang mk7.k...@samsung.com wrote:
 On 03/04/14 08:24, Simon Glass wrote:
 Enable LCD for snow. This is a 1366 x 768 panel.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

 Changes in v2:
 - Add a device tree node for the snow EDP bridge chip

  arch/arm/dts/exynos5250-snow.dts | 57 
 
  1 file changed, 57 insertions(+)

 diff --git a/arch/arm/dts/exynos5250-snow.dts 
 b/arch/arm/dts/exynos5250-snow.dts
 index 42a687b..2a6bc78 100644
 --- a/arch/arm/dts/exynos5250-snow.dts
 +++ b/arch/arm/dts/exynos5250-snow.dts
 @@ -88,6 +88,19 @@
   reg = 0x22;
   compatible = maxim,max98095-codec;
   };
 +
 + ptn3460-bridge@20 {
 + compatible = nxp,ptn3460;
 + reg = 0x20;
 + /*
 +  * TODO(s...@chromium.org): Exynos GPIOs broken
 +  * powerdown-gpio = gpy2 5 0;
 +  * reset-gpio = gpx1 5 0;
 +  * edid-emulation = 5;
 +  * pinctrl-names = default;
 +  * pinctrl-0 = ptn3460_gpios;
 +  */

 Now you can use GPIOs.

Yes it is a big help. However, I would like to make this change in a
follow-on series. It involves changing the code to stop hard-coding
the GPIOs. But there are many GPIOs involved, not just this bridge
chip, and not just the LCD. So I think we need a separate series after
this one to move the GPIOs to the device tree.

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


[U-Boot] [PATCH v3 06/12] exynos5: Enable tps65090 on exynos5-dt

2014-05-20 Thread Simon Glass
From: Aaron Durbin adur...@chromium.org

The TPS65090 pmic chip can be on exynos5250 boards. Therefore,
select the appropriate config option for TPS65090 devices.

This commit should really use exynos5-dt.c, when it is available.

Signed-off-by: Simon Glass s...@chromium.org
Reviewed-by: Simon Glass s...@chromium.org
---

Changes in v3: None
Changes in v2:
- Update patch name to exynos5-dt instead of smdk5250

 include/configs/exynos5-dt.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/exynos5-dt.h b/include/configs/exynos5-dt.h
index 5a9b1b4..b830495 100644
--- a/include/configs/exynos5-dt.h
+++ b/include/configs/exynos5-dt.h
@@ -259,6 +259,7 @@
 /* PMIC */
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
+#define CONFIG_POWER_TPS65090
 
 /* Ethernet Controllor Driver */
 #ifdef CONFIG_CMD_NET
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 07/12] power: Explicitly select pmic device's bus

2014-05-20 Thread Simon Glass
From: Aaron Durbin adur...@chromium.org

The current pmic i2c code assumes the current i2c bus is
the same as the pmic device's bus. There is nothing ensuring
that to be true. Therefore, select the proper bus before performing
a transaction.

Signed-off-by: Aaron Durbin adur...@chromium.org
Signed-off-by: Simon Glass s...@chromium.org
Acked-by: Heiko Schocher h...@denx.de
Reviewed-by: Simon Glass s...@chromium.org
---

Changes in v3: None
Changes in v2: None

 drivers/power/power_i2c.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index ac76870..594cd11 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -23,6 +23,8 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
if (check_reg(p, reg))
return -1;
 
+   I2C_SET_BUS(p-bus);
+
switch (pmic_i2c_tx_num) {
case 3:
if (p-sensor_byte_order == PMIC_SENSOR_BYTE_ORDER_BIG) {
@@ -66,6 +68,8 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
if (check_reg(p, reg))
return -1;
 
+   I2C_SET_BUS(p-bus);
+
if (i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num))
return -1;
 
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 10/12] exynos: dts: Enable LCD for snow

2014-05-20 Thread Simon Glass
Enable LCD for snow. This is a 1366 x 768 panel.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Change the ptn3460 comment to indicate a TODO for device tree GPIOs

Changes in v2:
- Add a device tree node for the snow EDP bridge chip

 arch/arm/dts/exynos5250-snow.dts | 57 
 1 file changed, 57 insertions(+)

diff --git a/arch/arm/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts
index c584172..ab4f2f8 100644
--- a/arch/arm/dts/exynos5250-snow.dts
+++ b/arch/arm/dts/exynos5250-snow.dts
@@ -80,6 +80,19 @@
reg = 0x22;
compatible = maxim,max98095-codec;
};
+
+   ptn3460-bridge@20 {
+   compatible = nxp,ptn3460;
+   reg = 0x20;
+   /*
+* TODO(s...@chromium.org): Use GPIOs here
+* powerdown-gpio = gpy2 5 0;
+* reset-gpio = gpx1 5 0;
+* edid-emulation = 5;
+* pinctrl-names = default;
+* pinctrl-0 = ptn3460_gpios;
+*/
+   };
};
 
i2c@12c6 {
@@ -184,4 +197,48 @@
/* UP  LEFT*/
0x070b0067 0x070c0069;
};
+
+   fimd@1440 {
+   samsung,vl-freq = 60;
+   samsung,vl-col = 1366;
+   samsung,vl-row = 768;
+   samsung,vl-width = 1366;
+   samsung,vl-height = 768;
+
+   samsung,vl-clkp;
+   samsung,vl-dp;
+   samsung,vl-hsp;
+   samsung,vl-vsp;
+
+   samsung,vl-bpix = 4;
+
+   samsung,vl-hspw = 32;
+   samsung,vl-hbpd = 80;
+   samsung,vl-hfpd = 48;
+   samsung,vl-vspw = 5;
+   samsung,vl-vbpd = 14;
+   samsung,vl-vfpd = 3;
+   samsung,vl-cmd-allow-len = 0xf;
+
+   samsung,winid = 0;
+   samsung,interface-mode = 1;
+   samsung,dp-enabled = 1;
+   samsung,dual-lcd-enabled = 0;
+   };
+
+   dp@145b {
+   samsung,lt-status = 0;
+
+   samsung,master-mode = 0;
+   samsung,bist-mode = 0;
+   samsung,bist-pattern = 0;
+   samsung,h-sync-polarity = 0;
+   samsung,v-sync-polarity = 0;
+   samsung,interlaced = 0;
+   samsung,color-space = 0;
+   samsung,dynamic-range = 0;
+   samsung,ycbcr-coeff = 0;
+   samsung,color-depth = 1;
+   };
+
 };
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 05/12] power: Add support for TPS65090 PMU chip.

2014-05-20 Thread Simon Glass
From: Tom Wai-Hong Tam waih...@chromium.org

This adds driver support for the TPS65090 PMU. Support includes
hooking into the pmic infrastructure  so that the pmic commands
can be used on the console. The TPS65090 supports the following
functionality:

- fet enable/disable/querying
- getting and setting of charge state

Even though it is connected to the pmic infrastructure it does
not hook into the pmic charging charging infrastructure.

The device tree binding is from Linux, but only a small subset of
functionality is supported.

Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
Signed-off-by: Hatim Ali hatim...@samsung.com
Signed-off-by: Katie Roberts-Hoffman kati...@chromium.org
Signed-off-by: Rong Chang rongch...@chromium.org
Signed-off-by: Sean Paul seanp...@chromium.org
Signed-off-by: Vincent Palatin vpala...@chromium.org
Signed-off-by: Aaron Durbin adur...@chromium.org
Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Remove extra blank lines in two places
- Use !! style instead ternary operator

Changes in v2:
- Removed non-device-tree operation
- Use errno.h for error return codes everywhere
- Plumb into pmic charging framework
- Fix style nit
- Use correct license header
- Use new Linux device tree bindings
- Add partial battery charging support

 doc/device-tree-bindings/power/tps65090.txt |  17 ++
 doc/device-tree-bindings/regulator/tps65090.txt | 122 ++
 drivers/power/pmic/Makefile |   1 +
 drivers/power/pmic/pmic_tps65090.c  | 310 
 include/fdtdec.h|   1 +
 include/power/tps65090_pmic.h   |  73 ++
 lib/fdtdec.c|   1 +
 7 files changed, 525 insertions(+)
 create mode 100644 doc/device-tree-bindings/power/tps65090.txt
 create mode 100644 doc/device-tree-bindings/regulator/tps65090.txt
 create mode 100644 drivers/power/pmic/pmic_tps65090.c
 create mode 100644 include/power/tps65090_pmic.h

diff --git a/doc/device-tree-bindings/power/tps65090.txt 
b/doc/device-tree-bindings/power/tps65090.txt
new file mode 100644
index 000..8e5e0d3
--- /dev/null
+++ b/doc/device-tree-bindings/power/tps65090.txt
@@ -0,0 +1,17 @@
+TPS65090 Frontend PMU with Switchmode Charger
+
+Required Properties:
+-compatible: ti,tps65090-charger
+
+Optional Properties:
+-ti,enable-low-current-chrg: Enables charging when a low current is detected
+ while the default logic is to stop charging.
+
+This node is a subnode of the tps65090 PMIC.
+
+Example:
+
+   tps65090-charger {
+   compatible = ti,tps65090-charger;
+   ti,enable-low-current-chrg;
+   };
diff --git a/doc/device-tree-bindings/regulator/tps65090.txt 
b/doc/device-tree-bindings/regulator/tps65090.txt
new file mode 100644
index 000..313a60b
--- /dev/null
+++ b/doc/device-tree-bindings/regulator/tps65090.txt
@@ -0,0 +1,122 @@
+TPS65090 regulators
+
+Required properties:
+- compatible: ti,tps65090
+- reg: I2C slave address
+- interrupts: the interrupt outputs of the controller
+- regulators: A node that houses a sub-node for each regulator within the
+  device. Each sub-node is identified using the node's name, with valid
+  values listed below. The content of each sub-node is defined by the
+  standard binding for regulators; see regulator.txt.
+  dcdc[1-3], fet[1-7] and ldo[1-2] respectively.
+- vsys[1-3]-supply: The input supply for DCDC[1-3] respectively.
+- infet[1-7]-supply: The input supply for FET[1-7] respectively.
+- vsys-l[1-2]-supply: The input supply for LDO[1-2] respectively.
+
+Optional properties:
+- ti,enable-ext-control: This is applicable for DCDC1, DCDC2 and DCDC3.
+  If DCDCs are externally controlled then this property should be there.
+- dcdc-ext-control-gpios: This is applicable for DCDC1, DCDC2 and DCDC3.
+  If DCDCs are externally controlled and if it is from GPIO then GPIO
+  number should be provided. If it is externally controlled and no GPIO
+  entry then driver will just configure this rails as external control
+  and will not provide any enable/disable APIs.
+
+Each regulator is defined using the standard binding for regulators.
+
+Example:
+
+   tps65090@48 {
+   compatible = ti,tps65090;
+   reg = 0x48;
+   interrupts = 0 88 0x4;
+
+   vsys1-supply = some_reg;
+   vsys2-supply = some_reg;
+   vsys3-supply = some_reg;
+   infet1-supply = some_reg;
+   infet2-supply = some_reg;
+   infet3-supply = some_reg;
+   infet4-supply = some_reg;
+   infet5-supply = some_reg;
+   infet6-supply = some_reg;
+   infet7-supply = some_reg;
+   vsys_l1-supply = some_reg;
+   vsys_l2-supply = some_reg;
+
+   regulators {
+   dcdc1 {
+   regulator-name = dcdc1;
+   

[U-Boot] [PATCH v3 08/12] exynos5: support tps65090 pmic

2014-05-20 Thread Simon Glass
From: Aaron Durbin adur...@chromium.org

The TSP65090 is a PMIC on some exynos5 boards. The init function is
called for the TPS65090 pmic. If that device is not a part of the device
tree (returns -ENODEV) then continue. Otherwise return a failure.

Signed-off-by: Aaron Durbin adur...@chromium.org
Signed-off-by: Simon Glass s...@chromium.org
Reviewed-by: Simon Glass s...@chromium.org
---

Changes in v3: None
Changes in v2:
- Move code to exynos5-dt.c
- Fix comment style
- Add #ifdef around tps65090 code

 board/samsung/smdk5250/exynos5-dt.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/board/samsung/smdk5250/exynos5-dt.c 
b/board/samsung/smdk5250/exynos5-dt.c
index fbf5850..bce7583 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -20,6 +20,7 @@
 #include asm/arch/sromc.h
 #include power/pmic.h
 #include power/max77686_pmic.h
+#include power/tps65090_pmic.h
 #include tmu.h
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -161,7 +162,19 @@ int exynos_power_init(void)
 
 #ifdef CONFIG_POWER_MAX77686
ret = max77686_init();
+   if (ret)
+   return ret;
 #endif
+#ifdef CONFIG_POWER_TPS65090
+   /*
+* The TPS65090 may not be in the device tree. If so, it is not
+* an error.
+*/
+   ret = tps65090_init();
+   if (ret == 0 || ret == -ENODEV)
+   return 0;
+#endif
+
return ret;
 }
 #endif /* CONFIG_POWER */
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 04/12] power: Add PMIC_ prefix to CHARGER_EN/DISABLE

2014-05-20 Thread Simon Glass
This enum should be common across all PMICs rather than having it
independently defined with the same name in multiple places.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3: None
Changes in v2:
- Add new patch to rename CHARGER_EN/DISABLE

 drivers/power/battery/bat_trats.c  | 4 ++--
 drivers/power/battery/bat_trats2.c | 2 +-
 drivers/power/mfd/pmic_max77693.c  | 2 +-
 drivers/power/pmic/pmic_max8997.c  | 2 +-
 include/power/max77693_pmic.h  | 2 --
 include/power/max8997_pmic.h   | 1 -
 include/power/pmic.h   | 5 +
 7 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/power/battery/bat_trats.c 
b/drivers/power/battery/bat_trats.c
index 41b179f..bfde692 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -19,7 +19,7 @@ static int power_battery_charge(struct pmic *bat)
struct battery *battery = p_bat-bat;
int k;
 
-   if (bat-chrg-chrg_state(p_bat-chrg, CHARGER_ENABLE, 450))
+   if (bat-chrg-chrg_state(p_bat-chrg, PMIC_CHARGER_ENABLE, 450))
return -1;
 
for (k = 0; bat-chrg-chrg_bat_present(p_bat-chrg) 
@@ -42,7 +42,7 @@ static int power_battery_charge(struct pmic *bat)
}
}
  exit:
-   bat-chrg-chrg_state(p_bat-chrg, CHARGER_DISABLE, 0);
+   bat-chrg-chrg_state(p_bat-chrg, PMIC_CHARGER_DISABLE, 0);
 
return 0;
 }
diff --git a/drivers/power/battery/bat_trats2.c 
b/drivers/power/battery/bat_trats2.c
index 94015aa..57221ad 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -17,7 +17,7 @@ static int power_battery_charge(struct pmic *bat)
 {
struct power_battery *p_bat = bat-pbat;
 
-   if (bat-chrg-chrg_state(p_bat-chrg, CHARGER_ENABLE, 450))
+   if (bat-chrg-chrg_state(p_bat-chrg, PMIC_CHARGER_ENABLE, 450))
return -1;
 
return 0;
diff --git a/drivers/power/mfd/pmic_max77693.c 
b/drivers/power/mfd/pmic_max77693.c
index 1a4416b..6b28e28 100644
--- a/drivers/power/mfd/pmic_max77693.c
+++ b/drivers/power/mfd/pmic_max77693.c
@@ -22,7 +22,7 @@ static int max77693_charger_state(struct pmic *p, int state, 
int current)
val = MAX77693_CHG_UNLOCK;
pmic_reg_write(p, MAX77693_CHG_CNFG_06, val);
 
-   if (state == CHARGER_DISABLE) {
+   if (state == PMIC_CHARGER_DISABLE) {
puts(Disable the charger.\n);
pmic_reg_read(p, MAX77693_CHG_CNFG_00, val);
val = ~0x01;
diff --git a/drivers/power/pmic/pmic_max8997.c 
b/drivers/power/pmic/pmic_max8997.c
index ba01692..a36a9a0 100644
--- a/drivers/power/pmic/pmic_max8997.c
+++ b/drivers/power/pmic/pmic_max8997.c
@@ -35,7 +35,7 @@ static int pmic_charger_state(struct pmic *p, int state, int 
current)
if (pmic_probe(p))
return -1;
 
-   if (state == CHARGER_DISABLE) {
+   if (state == PMIC_CHARGER_DISABLE) {
puts(Disable the charger.\n);
pmic_reg_read(p, MAX8997_REG_MBCCTRL2, val);
val = ~(MBCHOSTEN | VCHGR_FC);
diff --git a/include/power/max77693_pmic.h b/include/power/max77693_pmic.h
index 616d051..3d59e59 100644
--- a/include/power/max77693_pmic.h
+++ b/include/power/max77693_pmic.h
@@ -10,8 +10,6 @@
 
 #include power/power_chrg.h
 
-enum {CHARGER_ENABLE, CHARGER_DISABLE};
-
 #define CHARGER_MIN_CURRENT 200
 #define CHARGER_MAX_CURRENT 2000
 
diff --git a/include/power/max8997_pmic.h b/include/power/max8997_pmic.h
index 74c5d54..728d60a 100644
--- a/include/power/max8997_pmic.h
+++ b/include/power/max8997_pmic.h
@@ -170,7 +170,6 @@ enum {
 #define SAFEOUT_3_30V 0x03
 
 /* Charger */
-enum {CHARGER_ENABLE, CHARGER_DISABLE};
 #define DETBAT  (1  2)
 #define MBCICHFCSET (1  4)
 #define MBCHOSTEN   (1  6)
diff --git a/include/power/pmic.h b/include/power/pmic.h
index 8f282dd..a62e6c9 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -17,6 +17,11 @@ enum { I2C_PMIC, I2C_NUM, };
 enum { PMIC_READ, PMIC_WRITE, };
 enum { PMIC_SENSOR_BYTE_ORDER_LITTLE, PMIC_SENSOR_BYTE_ORDER_BIG, };
 
+enum {
+   PMIC_CHARGER_DISABLE,
+   PMIC_CHARGER_ENABLE,
+};
+
 struct p_i2c {
unsigned char addr;
unsigned char *buf;
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 11/12] exynos: Enable the LCD backlight for snow

2014-05-20 Thread Simon Glass
The backlight uses FETs on the TPS65090. Enable this so that the display
is visible.

Signed-off-by: Simon Glass s...@chromium.org
Reviewed-by: Lukasz Majewski l.majew...@samsung.com
---

Changes in v3:
- Rename MAX_TRIES to lower case
- Rename onoff to on
- Use generic GPIO API

Changes in v2:
- Only set up the EDP bridge for snow
- Add a device tree compatibility string for the EDP bridge
- Check for EDP failure and print an error in that case
- Return immediately in exynos_backlight_on() if needed

 board/samsung/smdk5250/exynos5-dt.c | 100 +++-
 include/fdtdec.h|   1 +
 lib/fdtdec.c|   1 +
 3 files changed, 101 insertions(+), 1 deletion(-)

diff --git a/board/samsung/smdk5250/exynos5-dt.c 
b/board/samsung/smdk5250/exynos5-dt.c
index bce7583..d6ce133 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -11,9 +11,9 @@
 #include i2c.h
 #include netdev.h
 #include spi.h
+#include asm/gpio.h
 #include asm/arch/cpu.h
 #include asm/arch/dwmmc.h
-#include asm/arch/gpio.h
 #include asm/arch/mmc.h
 #include asm/arch/pinmux.h
 #include asm/arch/power.h
@@ -180,6 +180,59 @@ int exynos_power_init(void)
 #endif /* CONFIG_POWER */
 
 #ifdef CONFIG_LCD
+static int board_dp_bridge_setup(void)
+{
+   const int max_tries = 10;
+   int num_tries, node;
+
+   /*
+* TODO(sjg): Use device tree for GPIOs when exynos GPIO
+* numbering patch is in mainline.
+*/
+   debug(%s\n, __func__);
+   node = fdtdec_next_compatible(gd-fdt_blob, 0, COMPAT_NXP_PTN3460);
+   if (node  0) {
+   debug(%s: No node for DP bridge in device tree\n, __func__);
+   return -ENODEV;
+   }
+
+   /* Setup the GPIOs */
+
+   /* PD is ACTIVE_LOW, and initially de-asserted */
+   gpio_set_pull(EXYNOS5_GPIO_Y25, S5P_GPIO_PULL_NONE);
+   gpio_direction_output(EXYNOS5_GPIO_Y25, 1);
+
+   /* Reset is ACTIVE_LOW */
+   gpio_set_pull(EXYNOS5_GPIO_X15, S5P_GPIO_PULL_NONE);
+   gpio_direction_output(EXYNOS5_GPIO_X15, 0);
+
+   udelay(10);
+   gpio_set_value(EXYNOS5_GPIO_X15, 1);
+
+   gpio_direction_input(EXYNOS5_GPIO_X07);
+
+   /*
+* We need to wait for 90ms after bringing up the bridge since there
+* is a phantom high on the HPD chip during its bootup.  The phantom
+* high comes within 7ms of de-asserting PD and persists for at least
+* 15ms.  The real high comes roughly 50ms after PD is de-asserted. The
+* phantom high makes it hard for us to know when the NXP chip is up.
+*/
+   mdelay(90);
+
+   for (num_tries = 0; num_tries  max_tries; num_tries++) {
+   /* Check HPD.  If it's high, we're all good. */
+   if (gpio_get_value(EXYNOS5_GPIO_X07))
+   return 0;
+
+   debug(%s: eDP bridge failed to come up; try %d of %d\n,
+ __func__, num_tries, max_tries);
+   }
+
+   /* Immediately go into bridge reset if the hp line is not high */
+   return -ENODEV;
+}
+
 void exynos_cfg_lcd_gpio(void)
 {
/* For Backlight */
@@ -198,4 +251,49 @@ void exynos_set_dp_phy(unsigned int onoff)
 {
set_dp_phy_ctrl(onoff);
 }
+
+void exynos_backlight_on(unsigned int on)
+{
+   debug(%s(%u)\n, __func__, on);
+
+   if (!on)
+   return;
+
+#ifdef CONFIG_POWER_TPS65090
+   int ret;
+
+   ret = tps65090_fet_enable(1); /* Enable FET1, backlight */
+   if (ret)
+   return;
+
+   /* T5 in the LCD timing spec (defined as  10ms) */
+   mdelay(10);
+
+   /* board_dp_backlight_pwm */
+   gpio_direction_output(EXYNOS5_GPIO_B20, 1);
+
+   /* T6 in the LCD timing spec (defined as  10ms) */
+   mdelay(10);
+
+   /* board_dp_backlight_en */
+   gpio_direction_output(EXYNOS5_GPIO_X30, 1);
+#endif
+}
+
+void exynos_lcd_power_on(void)
+{
+   int ret;
+
+   debug(%s\n, __func__);
+
+#ifdef CONFIG_POWER_TPS65090
+   /* board_dp_lcd_vdd */
+   tps65090_fet_enable(6); /* Enable FET6, lcd panel */
+#endif
+
+   ret = board_dp_bridge_setup();
+   if (ret  ret != -ENODEV)
+   printf(LCD bridge failed to enable: %d\n, ret);
+}
+
 #endif
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 669ab90..ea50d75 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -93,6 +93,7 @@ enum fdt_compat_id {
COMPAT_SANDBOX_HOST_EMULATION,  /* Sandbox emulation of a function */
COMPAT_SANDBOX_LCD_SDL, /* Sandbox LCD emulation with SDL */
COMPAT_TI_TPS65090, /* Texas Instrument TPS65090 */
+   COMPAT_NXP_PTN3460, /* NXP PTN3460 DP/LVDS bridge */
 
COMPAT_COUNT,
 };
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index b389d4e..fbab678 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -67,6 +67,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
 

[U-Boot] [PATCH v3 03/12] power: Rename CONFIG_PMIC_... to CONFIG_POWER_...

2014-05-20 Thread Simon Glass
Commit be3b51aa did this mostly, but several have been added since. Do the
job again.

Signed-off-by: Simon Glass s...@chromium.org
Acked-by: Lukasz Majewski l.majew...@samsung.com
---

Changes in v3: None
Changes in v2: None

 drivers/power/power_fsl.c | 6 +++---
 include/configs/arndale.h | 4 ++--
 include/configs/exynos5250-dt.h   | 2 +-
 include/configs/mx25pdk.h | 2 +-
 include/configs/mx35pdk.h | 2 +-
 include/configs/mx53evk.h | 2 +-
 include/configs/mx53loco.h| 2 +-
 include/configs/woodburn_common.h | 2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index ac0b541..a64161b 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -11,9 +11,9 @@
 #include fsl_pmic.h
 #include errno.h
 
-#if defined(CONFIG_PMIC_FSL_MC13892)
+#if defined(CONFIG_POWER_FSL_MC13892)
 #define FSL_PMIC_I2C_LENGTH3
-#elif defined(CONFIG_PMIC_FSL_MC34704)
+#elif defined(CONFIG_POWER_FSL_MC34704)
 #define FSL_PMIC_I2C_LENGTH1
 #endif
 
@@ -51,7 +51,7 @@ int pmic_init(unsigned char bus)
p-hw.i2c.addr = CONFIG_SYS_FSL_PMIC_I2C_ADDR;
p-hw.i2c.tx_num = FSL_PMIC_I2C_LENGTH;
 #else
-#error You must select CONFIG_POWER_SPI or CONFIG_PMIC_I2C
+#error You must select CONFIG_POWER_SPI or CONFIG_POWER_I2C
 #endif
 
return 0;
diff --git a/include/configs/arndale.h b/include/configs/arndale.h
index 515facf..30ecd45 100644
--- a/include/configs/arndale.h
+++ b/include/configs/arndale.h
@@ -224,8 +224,8 @@
 
 /* PMIC */
 #define CONFIG_PMIC
-#define CONFIG_PMIC_I2C
-#define CONFIG_PMIC_MAX77686
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_MAX77686
 
 #define CONFIG_DEFAULT_DEVICE_TREE exynos5250-arndale
 
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index b7ff472..9d1d56a 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -45,7 +45,7 @@
 #define CONFIG_SYS_INIT_SP_ADDRCONFIG_IRAM_STACK
 
 /* PMIC */
-#define CONFIG_PMIC_MAX77686
+#define CONFIG_POWER_MAX77686
 
 /* Sound */
 #define CONFIG_CMD_SOUND
diff --git a/include/configs/mx25pdk.h b/include/configs/mx25pdk.h
index aff2419..d464ad9 100644
--- a/include/configs/mx25pdk.h
+++ b/include/configs/mx25pdk.h
@@ -107,7 +107,7 @@
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_FSL
-#define CONFIG_PMIC_FSL_MC34704
+#define CONFIG_POWER_FSL_MC34704
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR   0x54
 
 #define CONFIG_DOS_PARTITION
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 0a46f4c..ab48144 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -52,7 +52,7 @@
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_FSL
-#define CONFIG_PMIC_FSL_MC13892
+#define CONFIG_POWER_FSL_MC13892
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR   0x08
 #define CONFIG_RTC_MC13XXX
 
diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h
index 3f0d80a..042cdd0 100644
--- a/include/configs/mx53evk.h
+++ b/include/configs/mx53evk.h
@@ -45,7 +45,7 @@
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_FSL
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR8
-#define CONFIG_PMIC_FSL_MC13892
+#define CONFIG_POWER_FSL_MC13892
 #define CONFIG_RTC_MC13XXX
 
 /* MMC Configs */
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 5859f36..c7f54d4 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -80,7 +80,7 @@
 #define CONFIG_POWER_I2C
 #define CONFIG_DIALOG_POWER
 #define CONFIG_POWER_FSL
-#define CONFIG_PMIC_FSL_MC13892
+#define CONFIG_POWER_FSL_MC13892
 #define CONFIG_SYS_DIALOG_PMIC_I2C_ADDR0x48
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR   0x8
 
diff --git a/include/configs/woodburn_common.h 
b/include/configs/woodburn_common.h
index 695bc23..259205e 100644
--- a/include/configs/woodburn_common.h
+++ b/include/configs/woodburn_common.h
@@ -55,7 +55,7 @@
 #define CONFIG_POWER
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_FSL
-#define CONFIG_PMIC_FSL_MC13892
+#define CONFIG_POWER_FSL_MC13892
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR   0x8
 #define CONFIG_RTC_MC13XXX
 
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 01/12] exynos: dts: Correct EC interrupt GPIO

2014-05-20 Thread Simon Glass
Now that the GPIO numbering series has been applied, we can use the correct
GPIO for the EC interrupt.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Add new patch to correct EC interrupt GPIO

Changes in v2: None

 arch/arm/dts/exynos5250-snow.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts
index 9b48a0c..c584172 100644
--- a/arch/arm/dts/exynos5250-snow.dts
+++ b/arch/arm/dts/exynos5250-snow.dts
@@ -44,7 +44,7 @@
reg = 0x1e;
compatible = google,cros-ec;
i2c-max-frequency = 10;
-   ec-interrupt = gpio 782 1;
+   ec-interrupt = gpio 182 1;
};
 
power-regulator@48 {
@@ -60,7 +60,7 @@
reg = 0;
compatible = google,cros-ec;
spi-max-frequency = 500;
-   ec-interrupt = gpio 782 1;
+   ec-interrupt = gpio 182 1;
optimise-flash-write;
status = disabled;
};
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 12/12] initcall: Improve debugging support

2014-05-20 Thread Simon Glass
Add the ability to display the code offset of an initcall even after it
is relocated. This makes it much easier to relate initcalls back to the
U-Boot System.map file.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Drop patch exynos: dts: Disable cros_ec interrupts due to broken GPIOs

Changes in v2:
- Rebase to samsung/master

 include/initcall.h |  2 +-
 lib/initcall.c | 17 -
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/include/initcall.h b/include/initcall.h
index 2378077..65f67dc 100644
--- a/include/initcall.h
+++ b/include/initcall.h
@@ -6,4 +6,4 @@
 
 typedef int (*init_fnc_t)(void);
 
-int initcall_run_list(init_fnc_t init_sequence[]);
+int initcall_run_list(const init_fnc_t init_sequence[]);
diff --git a/lib/initcall.c b/lib/initcall.c
index fa76dd7..7597bad 100644
--- a/lib/initcall.c
+++ b/lib/initcall.c
@@ -7,15 +7,22 @@
 #include common.h
 #include initcall.h
 
-int initcall_run_list(init_fnc_t init_sequence[])
+DECLARE_GLOBAL_DATA_PTR;
+
+int initcall_run_list(const init_fnc_t init_sequence[])
 {
-   init_fnc_t *init_fnc_ptr;
+   const init_fnc_t *init_fnc_ptr;
 
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
-   debug(initcall: %p\n, *init_fnc_ptr);
+   unsigned long reloc_ofs = 0;
+
+   if (gd-flags  GD_FLG_RELOC)
+   reloc_ofs = gd-reloc_off;
+   debug(initcall: %p\n, (char *)*init_fnc_ptr - reloc_ofs);
if ((*init_fnc_ptr)()) {
-   debug(initcall sequence %p failed at call %p\n,
- init_sequence, *init_fnc_ptr);
+   printf(initcall sequence %p failed at call %p\n,
+  init_sequence,
+  (char *)*init_fnc_ptr - reloc_ofs);
return -1;
}
}
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 09/12] exynos: Enable PSHOLD in SPL

2014-05-20 Thread Simon Glass
There is quite a tight deadline in enabling PSHOLD, less than a second.
In some cases (e.g. with USB download), U-Boot takes longer than that
to load, so the board powers off before U-Boot starts.

Add a call in SPL to enable PSHOLD.

Signed-off-by: Simon Glass s...@chromium.org
Reviewed-by: Lukasz Majewski l.majew...@samsung.com
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv7/exynos/lowlevel_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv7/exynos/lowlevel_init.c 
b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
index 11fe5b8..48b5511 100644
--- a/arch/arm/cpu/armv7/exynos/lowlevel_init.c
+++ b/arch/arm/cpu/armv7/exynos/lowlevel_init.c
@@ -48,6 +48,8 @@ int do_lowlevel_init(void)
 
arch_cpu_init();
 
+   set_ps_hold_ctrl();
+
reset_status = get_reset_status();
 
switch (reset_status) {
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 0/12] Enable LCD display on snow

2014-05-20 Thread Simon Glass
This series adds a driver for TPS65090 and plumbs it in to get the LCD
working correctly on snow.

The display driver is already present, but needs information about the
display to be provided in the device tree.

The backlight also needs to be enabled - it is controlled by a FET on
the TPS65090. Note that the TPS65090 is controlled by the device tree
so will only be present if the board's device tree file specifies it.
At present this is only the case for snow, but other exynos5 boards will
use it (e.g. pit).

Note: the TPS65090 driver was sent to the list around the middle of last
year but was never applied.

Changes in v3:
- Add new patch to correct EC interrupt GPIO
- Rebase on samsung/master
- Remove extra blank lines in two places
- Use !! style instead ternary operator
- Change the ptn3460 comment to indicate a TODO for device tree GPIOs
- Rename MAX_TRIES to lower case
- Rename onoff to on
- Use generic GPIO API
- Drop patch exynos: dts: Disable cros_ec interrupts due to broken GPIOs

Changes in v2:
- Add new patch to drop smdk5250.c file
- Add new patch to rename CHARGER_EN/DISABLE
- Removed non-device-tree operation
- Use errno.h for error return codes everywhere
- Plumb into pmic charging framework
- Fix style nit
- Use correct license header
- Use new Linux device tree bindings
- Add partial battery charging support
- Update patch name to exynos5-dt instead of smdk5250
- Move code to exynos5-dt.c
- Fix comment style
- Add #ifdef around tps65090 code
- Add a device tree node for the snow EDP bridge chip
- Only set up the EDP bridge for snow
- Add a device tree compatibility string for the EDP bridge
- Check for EDP failure and print an error in that case
- Return immediately in exynos_backlight_on() if needed
- Rebase to samsung/master

Aaron Durbin (3):
  exynos5: Enable tps65090 on exynos5-dt
  power: Explicitly select pmic device's bus
  exynos5: support tps65090 pmic

Simon Glass (8):
  exynos: dts: Correct EC interrupt GPIO
  exynos: Drop old smdk5250.c file
  power: Rename CONFIG_PMIC_... to CONFIG_POWER_...
  power: Add PMIC_ prefix to CHARGER_EN/DISABLE
  exynos: Enable PSHOLD in SPL
  exynos: dts: Enable LCD for snow
  exynos: Enable the LCD backlight for snow
  initcall: Improve debugging support

Tom Wai-Hong Tam (1):
  power: Add support for TPS65090 PMU chip.

 arch/arm/cpu/armv7/exynos/lowlevel_init.c   |   2 +
 arch/arm/dts/exynos5250-snow.dts|  61 +++-
 board/samsung/smdk5250/Makefile |   4 -
 board/samsung/smdk5250/exynos5-dt.c | 238 +++-
 board/samsung/smdk5250/smdk5250.c   | 363 
 doc/device-tree-bindings/power/tps65090.txt |  17 ++
 doc/device-tree-bindings/regulator/tps65090.txt | 122 
 drivers/power/battery/bat_trats.c   |   4 +-
 drivers/power/battery/bat_trats2.c  |   2 +-
 drivers/power/mfd/pmic_max77693.c   |   2 +-
 drivers/power/pmic/Makefile |   1 +
 drivers/power/pmic/pmic_max8997.c   |   2 +-
 drivers/power/pmic/pmic_tps65090.c  | 310 
 drivers/power/power_fsl.c   |   6 +-
 drivers/power/power_i2c.c   |   4 +
 include/configs/arndale.h   |   4 +-
 include/configs/exynos5-dt.h|   1 +
 include/configs/exynos5250-dt.h |   2 +-
 include/configs/mx25pdk.h   |   2 +-
 include/configs/mx35pdk.h   |   2 +-
 include/configs/mx53evk.h   |   2 +-
 include/configs/mx53loco.h  |   2 +-
 include/configs/woodburn_common.h   |   2 +-
 include/fdtdec.h|   2 +
 include/initcall.h  |   2 +-
 include/power/max77693_pmic.h   |   2 -
 include/power/max8997_pmic.h|   1 -
 include/power/pmic.h|   5 +
 include/power/tps65090_pmic.h   |  73 +
 lib/fdtdec.c|   2 +
 lib/initcall.c  |  17 +-
 31 files changed, 864 insertions(+), 395 deletions(-)
 delete mode 100644 board/samsung/smdk5250/smdk5250.c
 create mode 100644 doc/device-tree-bindings/power/tps65090.txt
 create mode 100644 doc/device-tree-bindings/regulator/tps65090.txt
 create mode 100644 drivers/power/pmic/pmic_tps65090.c
 create mode 100644 include/power/tps65090_pmic.h

-- 
1.9.1.423.g4596e3a

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


[U-Boot] [PATCH v3 02/12] exynos: Drop old smdk5250.c file

2014-05-20 Thread Simon Glass
This is not used by any boards now. Drop it to avoid confusion.

Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Rebase on samsung/master

Changes in v2:
- Add new patch to drop smdk5250.c file

 board/samsung/smdk5250/Makefile |   4 -
 board/samsung/smdk5250/exynos5-dt.c | 125 +
 board/samsung/smdk5250/smdk5250.c   | 363 
 3 files changed, 125 insertions(+), 367 deletions(-)
 delete mode 100644 board/samsung/smdk5250/smdk5250.c

diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
index 6a58655..3d96b07 100644
--- a/board/samsung/smdk5250/Makefile
+++ b/board/samsung/smdk5250/Makefile
@@ -7,9 +7,5 @@
 obj-y  += smdk5250_spl.o
 
 ifndef CONFIG_SPL_BUILD
-ifdef CONFIG_OF_CONTROL
 obj-y  += exynos5-dt.o
-else
-obj-y  += smdk5250.o
-endif
 endif
diff --git a/board/samsung/smdk5250/exynos5-dt.c 
b/board/samsung/smdk5250/exynos5-dt.c
index 58821c4..fbf5850 100644
--- a/board/samsung/smdk5250/exynos5-dt.c
+++ b/board/samsung/smdk5250/exynos5-dt.c
@@ -41,6 +41,131 @@ int exynos_init(void)
return 0;
 }
 
+#if defined(CONFIG_POWER)
+#ifdef CONFIG_POWER_MAX77686
+static int pmic_reg_update(struct pmic *p, int reg, uint regval)
+{
+   u32 val;
+   int ret = 0;
+
+   ret = pmic_reg_read(p, reg, val);
+   if (ret) {
+   debug(%s: PMIC %d register read failed\n, __func__, reg);
+   return -1;
+   }
+   val |= regval;
+   ret = pmic_reg_write(p, reg, val);
+   if (ret) {
+   debug(%s: PMIC %d register write failed\n, __func__, reg);
+   return -1;
+   }
+   return 0;
+}
+
+static int max77686_init(void)
+{
+   struct pmic *p;
+
+   if (pmic_init(I2C_PMIC))
+   return -1;
+
+   p = pmic_get(MAX77686_PMIC);
+   if (!p)
+   return -ENODEV;
+
+   if (pmic_probe(p))
+   return -1;
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_32KHZ, MAX77686_32KHCP_EN))
+   return -1;
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_BBAT,
+   MAX77686_BBCHOSTEN | MAX77686_BBCVS_3_5V))
+   return -1;
+
+   /* VDD_MIF */
+   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK1OUT,
+  MAX77686_BUCK1OUT_1V)) {
+   debug(%s: PMIC %d register write failed\n, __func__,
+ MAX77686_REG_PMIC_BUCK1OUT);
+   return -1;
+   }
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK1CRTL,
+   MAX77686_BUCK1CTRL_EN))
+   return -1;
+
+   /* VDD_ARM */
+   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK2DVS1,
+  MAX77686_BUCK2DVS1_1_3V)) {
+   debug(%s: PMIC %d register write failed\n, __func__,
+ MAX77686_REG_PMIC_BUCK2DVS1);
+   return -1;
+   }
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK2CTRL1,
+   MAX77686_BUCK2CTRL_ON))
+   return -1;
+
+   /* VDD_INT */
+   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK3DVS1,
+  MAX77686_BUCK3DVS1_1_0125V)) {
+   debug(%s: PMIC %d register write failed\n, __func__,
+ MAX77686_REG_PMIC_BUCK3DVS1);
+   return -1;
+   }
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK3CTRL,
+   MAX77686_BUCK3CTRL_ON))
+   return -1;
+
+   /* VDD_G3D */
+   if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK4DVS1,
+  MAX77686_BUCK4DVS1_1_2V)) {
+   debug(%s: PMIC %d register write failed\n, __func__,
+ MAX77686_REG_PMIC_BUCK4DVS1);
+   return -1;
+   }
+
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_BUCK4CTRL1,
+   MAX77686_BUCK3CTRL_ON))
+   return -1;
+
+   /* VDD_LDO2 */
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO2CTRL1,
+   MAX77686_LD02CTRL1_1_5V | EN_LDO))
+   return -1;
+
+   /* VDD_LDO3 */
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO3CTRL1,
+   MAX77686_LD03CTRL1_1_8V | EN_LDO))
+   return -1;
+
+   /* VDD_LDO5 */
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO5CTRL1,
+   MAX77686_LD05CTRL1_1_8V | EN_LDO))
+   return -1;
+
+   /* VDD_LDO10 */
+   if (pmic_reg_update(p, MAX77686_REG_PMIC_LDO10CTRL1,
+   MAX77686_LD10CTRL1_1_8V | EN_LDO))
+   return -1;
+
+   return 0;
+}
+#endif /* CONFIG_POWER_MAX77686 */
+
+int exynos_power_init(void)
+{
+   int ret = 0;
+
+#ifdef CONFIG_POWER_MAX77686
+   ret = max77686_init();
+#endif
+   return ret;
+}
+#endif /* CONFIG_POWER */
+
 #ifdef CONFIG_LCD
 void exynos_cfg_lcd_gpio(void)
 {
diff --git a/board/samsung/smdk5250/smdk5250.c 

[U-Boot] [GIT PULL] Zynq patches v2

2014-05-20 Thread Michal Simek
Hi Albert,

based on your pull request to Tom here
http://lists.denx.de/pipermail/u-boot/2014-May/179841.html
and our IRC last week I am sending updated pull request
where I have added 5 more patches from Masahiro which
are bug fixes.
Please pull them to your tree when you do merge with Tom's tree.

Thanks,
Michal

[u-boot]$ ./tools/buildman/buildman -b zynq zynq -sSed
Summary of 26 commits for 6 boards (4 threads, 1 job per thread)
01: Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
02: ARM: zynq: Fix sparse warnings in slcr.c
03: ARM: zynq: Fix sparse warning in ddrc.c
04: ARM: zynq: Remove sparse warnings
   arm: (for 6/6 boards)  data -168.0  rodata +168.0
zynq_zc770_xm010:  data -168  rodata +168
zynq_zc770_xm013:  data -168  rodata +168
zynq_zc770_xm012:  data -168  rodata +168
zynq_zed   :  data -168  rodata +168
zynq_zc70x :  data -168  rodata +168
zynq_microzed  :  data -168  rodata +168
05: ARM: zynq: Added efuse status register base address
06: ARM: zynq: Do not use half memory size for ECC case
   arm: (for 6/6 boards)  all -32.0  text -32.0
zynq_zc770_xm010:  all -32  text -32
zynq_zc770_xm013:  all -32  text -32
zynq_zc770_xm012:  all -32  text -32
zynq_zed   :  all -32  text -32
zynq_zc70x :  all -32  text -32
zynq_microzed  :  all -32  text -32
07: ARM: zynq: Call zynq board_init() in SPL
   arm: (for 6/6 boards)  spl/u-boot-spl:all +16.0  spl/u-boot-spl:text 
+16.0
zynq_zc770_xm010:  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
zynq_zc770_xm013:  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
zynq_zc770_xm012:  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
zynq_zed   :  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
zynq_zc70x :  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
zynq_microzed  :  spl/u-boot-spl:all +16  spl/u-boot-spl:text +16
08: ARM: zynq: slcr: Fix incorrect commentary
09: ARM: zynq: Setup correct slcr_lock value
   arm: (for 6/6 boards)  all +102.0  bss +2.7  data +4.0  
spl/u-boot-spl:all +72.0  spl/u-boot-spl:data +4.0  spl/u-boot-spl:text +68.0  
text +95.3
zynq_zc770_xm010:  all +112  bss +12  data +4  spl/u-boot-spl:all 
+72  spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +96
zynq_zed   :  all +112  bss +12  data +4  spl/u-boot-spl:all 
+72  spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +96
zynq_microzed  :  all +112  bss +12  data +4  spl/u-boot-spl:all 
+72  spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +96
zynq_zc770_xm013:  all +100  data +4  spl/u-boot-spl:all +72  
spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +96
zynq_zc770_xm012:  all +96  data +4  spl/u-boot-spl:all +72  
spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +92
zynq_zc70x :  all +80  bss -20  data +4  spl/u-boot-spl:all +72 
 spl/u-boot-spl:data +4  spl/u-boot-spl:text +68  text +96
10: ARM: zynq: Fix bootmode mask
11: ARM: zynq: Fix building SPL without FPGA support
12: ARM: zynq: Extend kernel image size to 60MB
13: ARM: zynq: Add MIO detection code
14: ARM: zynq: ehci: Added USB host driver support
   arm: (for 6/6 boards)  all +9.3  bss -0.7  rodata +10.0  
spl/u-boot-spl:all +10.0  spl/u-boot-spl:rodata +10.0
zynq_zc70x :  all +34  bss +24  rodata +10  spl/u-boot-spl:all 
+10  spl/u-boot-spl:rodata +10
zynq_zc770_xm013:  all +10  rodata +10  spl/u-boot-spl:all +10  
spl/u-boot-spl:rodata +10
zynq_zc770_xm012:  all +10  rodata +10  spl/u-boot-spl:all +10  
spl/u-boot-spl:rodata +10
zynq_zc770_xm010:  all +2  bss -8  rodata +10  spl/u-boot-spl:all 
+10  spl/u-boot-spl:rodata +10
zynq_microzed  :  all +2  bss -8  rodata +10  spl/u-boot-spl:all 
+10  spl/u-boot-spl:rodata +10
zynq_zed   :  all -2  bss -12  rodata +10  spl/u-boot-spl:all 
+10  spl/u-boot-spl:rodata +10
15: ARM: zynq: Added USB host support for zynq boards
   arm: (for 6/6 boards)  all +36453.7  bss +26203.3  data +38.7  rodata 
+2047.7  spl/u-boot-spl:all +1.3  spl/u-boot-spl:rodata +1.3  text +8164.0
zynq_zed   :  all +109121  bss +78632  data +116  rodata +5881  
spl/u-boot-spl:all +4  spl/u-boot-spl:rodata +4  text +24492
zynq_zc70x :  all +109085  bss +78596  data +116  rodata +5881  
spl/u-boot-spl:all +4  spl/u-boot-spl:rodata +4  text +24492
zynq_zc770_xm013:  all +131  rodata +131
zynq_zc770_xm012:  all +131  rodata +131
zynq_zc770_xm010:  all +127  bss -4  rodata +131
zynq_microzed  :  all +127  bss -4  rodata +131
16: ARM: zynq: Enable the FAT write capability
   arm: (for 6/6 boards)  all +4133.3  bss -2.0  data +18.7  rodata +386.0  
text +3730.7

[U-Boot] [GIT PULL] Fpga changes - next round

2014-05-20 Thread Michal Simek
Hi Tom,

here is the next round of fpga patches.
Please pull them to your tree.

Thanks,
Michal


[u-boot]$ ./tools/buildman/buildman -b fpga zynq x600 omap3_mvblx mt_ventoux 
iocon grsim grsim_leon2 coreboot balloon3 astro_mcf5373l alpr MVSMR MVBLM7 
MVBC_P GEN860T matrix_vision -sSed
Summary of 8 commits for 22 boards (4 threads, 1 job per thread)
01: Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
  m68k: +   astro_mcf5373l
   powerpc: +   alpr iocon
+/mnt/disk/fpga/.bm-work/00/arch/m68k/cpu/mcf532x/cpu_init.c: In function 
'cpu_init_f':
+/mnt/disk/fpga/.bm-work/00/arch/m68k/cpu/mcf532x/cpu_init.c:211:10: warning: 
unused variable 'wdog' [-Wunused-variable]
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c: In function 'do_bootm_linux':
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c:53:8: warning: unused 
variable 'rd_len' [-Wunused-variable]
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c:99:12: warning: 
'initrd_start' may be used uninitialized in this function [-Wuninitialized]
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c:99:12: warning: 'initrd_end' 
may be used uninitialized in this function [-Wuninitialized]
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c:99:12: warning: 'cmd_start' 
may be used uninitialized in this function [-Wuninitialized]
+/mnt/disk/fpga/.bm-work/00/arch/m68k/lib/bootm.c:99:12: warning: 'cmd_end' may 
be used uninitialized in this function [-Wuninitialized]
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/mcf5373l.c: In function 
'initdram':
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/mcf5373l.c:83:5: warning: 
pointer targets in passing argument 1 of 'get_ram_size' differ in signedness 
[-Wpointer-sign]
+/mnt/disk/fpga/.bm-work/00/include/common.h:470:6: note: expected 'long int *' 
but argument is of type 'long unsigned int *'
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/fpga.c:168:2: warning: 
initialization from incompatible pointer type [enabled by default]
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/fpga.c:168:2: warning: (near 
initialization for 'altera_fns.write') [enabled by default]
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/fpga.c: In function 
'astro5373l_altera_load':
+/mnt/disk/fpga/.bm-work/00/board/astro/mcf5373l/fpga.c:196:20: warning: 
assignment from incompatible pointer type [enabled by default]
+powerpc-unknown-linux-gnu-ld: section .bootpg [f000 - f27f] overlaps 
section .reloc [c600 - f02b]
+powerpc-unknown-linux-gnu-ld: u-boot: section .text vma 0xfffc overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x14b8 overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .reloc vma 0xc600 overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .bootpg vma 0xf000 overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .data vma 0xf02c overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .resetvec vma 0xfffc 
overlaps previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section `.text' can't be allocated in 
segment 0
+LOAD: .u_boot_list .text .rodata .reloc .bootpg .data .resetvec
+powerpc-unknown-linux-gnu-ld: final link failed: Bad value
+make[1]: *** [u-boot] Error 1
+make: *** [sub-make] Error 2
+powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x6ed0 overlaps 
previous sections
+LOAD: .reloc .data .u_boot_list .text .rodata .resetvec
02: configs: iocom: Fix typo on CMD_FPGA command
-powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x6ed0 overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x6dac overlaps 
previous sections
03: fpga: Guard the LOADMK functionality with CMD_FPGA_LOADMK
   powerpc: (for 6/8 boards)  all -94.7  data -5.3  text -89.3
MERGERBOX  :  all -568  data -32  text -536
04: fpga: Define bitstream type based on command selection
-powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x14b8 overlaps 
previous sections
+powerpc-unknown-linux-gnu-ld: u-boot: section .rodata vma 0x14c0 overlaps 
previous sections
   powerpc: (for 6/8 boards)  all +21.3  text +21.3
MVSMR  :  all +32  text +32
GEN860T:  all +32  text +32
GEN860T_SC :  all +32  text +32
MVBC_P :  all +16  text +16
MVBLM7 :  all +16  text +16
  m68k: (for 1/1 boards)  all +40.0  text +40.0
astro_mcf5373l :  all +40  text +40
   arm: (for 10/10 boards)  all +33.2  bss +0.8  text +32.4
mt_ventoux :  all +68  bss +32  text +36
zynq_microzed  :  all +64  bss +28  text +36
zynq_zc770_xm013:  all +36  text +36
zynq_zc770_xm012:  all +36  text +36
zynq_zc770_xm010:  all +32  bss -4  text +36
x600   :  all +32  text +32
zynq_zed   :  all +32  bss -4  text +36

[U-Boot] [PATCH] Prevent a stack overflow in fit_check_sign

2014-05-20 Thread Michael van der Westhuizen
It is trivial to crash fit_check_sign by invoking with an
absolute path in a deeply nested directory.  This is exposed
by vboot_test.sh.

Signed-off-by: Michael van der Westhuizen mich...@smart-africa.com
---
 tools/fit_check_sign.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/fit_check_sign.c b/tools/fit_check_sign.c
index d6d9340..817773d 100644
--- a/tools/fit_check_sign.c
+++ b/tools/fit_check_sign.c
@@ -42,12 +42,13 @@ int main(int argc, char **argv)
  void *fit_blob;
  char *fdtfile = NULL;
  char *keyfile = NULL;
- char cmdname[50];
+ char cmdname[256];
  int ret;
  void *key_blob;
  int c;

- strcpy(cmdname, *argv);
+ strncpy(cmdname, *argv, sizeof(cmdname) - 1);
+ cmdname[sizeof(cmdname) - 1] = '\0';
  while ((c = getopt(argc, argv, f:k:)) != -1)
  switch (c) {
  case 'f':
-- 
2.0.0.rc0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Prevent a buffer overflow in mkimage when signing with SHA256

2014-05-20 Thread Michael van der Westhuizen
Due to the FIT_MAX_HASH_LEN constant not having been updated
to support SHA256 signatures one will always see a buffer
overflow in fit_image_process_hash when signing images that
use this larger hash.  This is exposed by vboot_test.sh.

Signed-off-by: Michael van der Westhuizen mich...@smart-africa.com
---
 include/image.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/image.h b/include/image.h
index b278778..fdaab5e 100644
--- a/include/image.h
+++ b/include/image.h
@@ -702,7 +702,8 @@ int bootz_setup(ulong image, ulong *start, ulong *end);
 #define FIT_FDT_PROP fdt
 #define FIT_DEFAULT_PROP default

-#define FIT_MAX_HASH_LEN 20 /* max(crc32_len(4), sha1_len(20)) */
+/* max(crc32_len(4), sha1_len(20), sha256_len(32)) */
+#define FIT_MAX_HASH_LEN 32

 /* cmdline argument format parsing */
 int fit_parse_conf(const char *spec, ulong addr_curr,
-- 
2.0.0.rc0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net: phy/vitesse: Add support for VSC8664 phy module

2014-05-20 Thread York Sun
On 04/16/2014 01:40 AM, Chunhe Lan wrote:
 This patch adds support for VSC8664 PHY module which can
 be found on Freescale's T4240RDB boards.
 
 Signed-off-by: Chunhe Lan chunhe@freescale.com
 ---

Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] powerpc/t104xrdb: Toggle deep sleep management signals after resume

2014-05-20 Thread York Sun
On 05/06/2014 07:25 PM, Tang Yuantian wrote:
 From: Tang Yuantian yuantian.t...@freescale.com
 
 T104xrdb has several sleep management signals that are used for deep
 sleep. They are enabled by OS to enter deep sleep and should be
 disabled by u-boot when cores wake up.
 
 Signed-off-by: Tang Yuantian yuantian.t...@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] board/freescale: Move CRC32 offset in NXID v1 data format

2014-05-20 Thread York Sun
On 04/25/2014 04:38 PM, Ebony Zhu wrote:
 According to AN3638, CRC of NXID v1 is at the end of the
 256-byte I2C memory. The wrong CRC32 offset prevents Uboot
 from reading system information from EEPROM. No NXID v0 is
 being used on Freescale boards.
 
 Signed-off-by: Ebony Zhu b45...@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH v3] fsl/pci: Add workaround for erratum A-005434

2014-05-20 Thread York Sun
On 05/06/2014 07:50 PM, Chunhe Lan wrote:
 By default, all PEX inbound windows PEX_PEXIWARn[TRGT] are
 mapped to 0xF, which is local memory. But for BSC9132, 0xF
 is CCSR, 0x0 is local memory.
 
 Signed-off-by: Minghuan Lian minghuan.l...@freescale.com
 Signed-off-by: Chunhe Lan chunhe@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] powerpc/85xx: Add T4160RDB board support

2014-05-20 Thread York Sun
On 05/06/2014 07:56 PM, Chunhe Lan wrote:
 T4160RDB shares the same platform as T4240RDB. T4160 is
 a low power version of T4240, with the eight e6500 cores,
 two DDR3 controllers, and same peripheral bus interfaces.
 
 Signed-off-by: Chunhe Lan chunhe@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: Added B4460 support

2014-05-20 Thread York Sun
On 05/07/2014 02:13 AM, Shaveta Leekha wrote:
 B4460 differs from B4860 only in number of CPU cores,
 hence used existing support for B4860.
 B4460 has 2 PPC cores whereas B4860 has 4 PPC cores.
 
 Signed-off-by: Shaveta Leekha shav...@freescale.com
 Signed-off-by: Sandeep Singh sand...@freescale.com
 Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH][v2] drivers/usb : Define usb control register mask for w1c bits

2014-05-20 Thread York Sun
On 05/08/2014 04:35 AM, Nikhil Badola wrote:
 Define and use CONTROL_REGISTER_W1C_MASK to make sure that
 w1c bits of usb control register do not get reset while
 writing any other bit
 
 Signed-off-by: Nikhil Badola nikhil.bad...@freescale.com
 Signed-off-by: Ramneek Mehresh ramneek.mehr...@freescale.com
 ---
 Changes for v2:
   - Using clrsetbits_be32() instead of new API
 


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] 85xx/p1020:Define no. of usb controllers used on P1020RDB-PD platform

2014-05-20 Thread York Sun
On 05/13/2014 03:06 AM, Ramneek Mehresh wrote:
 Define number of USB controllers used on P1020RDB-PD platform.
 This platform has P1020 SoC which has two USB controllers, but
 only first one is used on the platform
 
 Signed-off-by: Ramneek Mehresh ramneek.mehr...@freescale.com
 ---


Applied to u-boot-mpc85xx/master with minor change to subject line.

York


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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT- corrected CSPR settings for BSC9132QDS NAND

2014-05-20 Thread York Sun
On 05/13/2014 11:15 PM, Aneesh Bansal wrote:
 In case of secure boot from NAND, CSPR and FTIM settings are
 same as non-secure NAND boot. CSPR0 is configured as NAND and
 CSPR1 is configured as NOR.
 
 Signed-off-by: Aneesh Bansal aneesh.ban...@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH][v2] board/p1_p2_rdb:Enable p1_p2_rdb boot from NAND/SD/SPI in SPL

2014-05-20 Thread York Sun
On 05/15/2014 04:13 AM, Prabhakar Kushwaha wrote:
 In the earlier patches, the SPL/TPL fraamework was introduced.
 For SD/SPI flash booting way, we introduce the SPL to enable a loader stub. 
 The
 SPL was loaded by the code from the internal on-chip ROM. The SPL initializes
 the DDR according to the SPD and loads the final uboot image into DDR, then
 jump to the DDR to begin execution.
 
 For NAND booting way, the nand SPL has size limitation on some board(e.g.
 P1010RDB), it can not be more than 4KB, we can call it minimal SPL, So the
 dynamic DDR driver doesn't fit into this minimum SPL. We added the TPL that is
 loaded by the the minimal SPL. The TPL initializes the DDR according to the 
 SPD
 and loads the final uboot image into DDR,then jump to the DDR to begin 
 execution.
 
 This patch enabled SPL/TPL for P1_P2_RDB to support starting from NAND/SD/SPI
 flash with SPL framework and initializing the DDR according to SPD in the 
 SPL/TPL.
 Because the minimal SPL load the TPL to L2 SRAM and the jump to the L2 SRAM to
 execute, so the section .resetvec is no longer needed.
 
 Signed-off-by: Prabhakar Kushwaha prabha...@freescale.com
 ---
  Changes for v2: Incroporated York' comments


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] mpc85xx: configs: remove c=ffe from default environment

2014-05-20 Thread York Sun
On 05/14/2014 05:33 PM, Kim Phillips wrote:
 AFAICT, c=ffe does nothing and was a typo from the original commit
 d17123696c6180ac8b74fbd318bf14652623e982 powerpc/p4080: Add support
 for the P4080DS board and just kept on getting duplicated
 in subsequently added board config files.
 
 Signed-off-by: Kim Phillips kim.phill...@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCH] powerpc/srio-pcie-boot: Adjust addresses for SRIO/PCIE boot

2014-05-20 Thread York Sun
On 05/14/2014 11:30 PM, Liu Gang wrote:
 The new 768KB u-boot image size requires changes for
 SRIO/PCIE boot. These addresses need to be updated to
 appropriate locations.
 
 The updated addresses are used to configure the SRIO/PCIE
 inbound windows for the boot, and they must be aligned
 with the window size based on the SRIO/PCIE modules requirement.
 So for the 768KB u-boot image, the inbound window cannot be set
 with 0xfff4 base address and 0xc size, it should be
 extended to 1MB size and the base address can be aligned with
 the size.
 
 Signed-off-by: Liu Gang gang@freescale.com
 ---


Applied to u-boot-mpc85xx/master.

York


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


Re: [U-Boot] [PATCHv5 09/14] mmc: support the DDR mode for eMMC

2014-05-20 Thread Hector Palacios

Hi,

On 05/16/2014 06:59 AM, Jaehoon Chung wrote:

Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com
Tested-by: Lukasz Majewski l.majew...@samsung.com
Acked-by: Lukasz Majewski l.majew...@samsung.com


What platforms did you test DDR mode on?
I tried this on an Freescale i.MX6 based platform but the driver returned error code 
COM_ERR (-18) when trying to switch to any of the DDR modes. I guess the fsl_esdhc.c 
driver needs some adaptation for DDR to work.


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


[U-Boot] [PATCH V2] cmd_mmc.c: check mmc_init() during mmc dev

2014-05-20 Thread Stephen Warren
From: Bryan Wu coolo...@gmail.com

mmc dev ${devnum} will return 0 as success even if there is no card
inserted. Booting script like tegra-common-post.h will call mmc dev
${devnum} to check the mmc device status, it always return 0 even if
mmc_init() fails.

Check mmc_init() return value let mmc dev command return failure
when mmc_init() fails.

Signed-off-by: Bryan Wu pe...@nvidia.com
[swarren: Always return 1 on error; hush doesn't appear to support
arbitrary return values. Fixed compilation error due to multiple
declaration of ret variable.]
Tested-by: Stephen Warren swar...@nvidia.com
Signed-off-by: Stephen Warren swar...@nvidia.com
---
v2:
* Always return 1 on error; hush doesn't appear to support
  arbitrary return values.
* Fixed compilation error due to multiple declaration of ret variable.
---
 common/cmd_mmc.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 572aa895fa1c..2e564572f74d 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -217,7 +217,10 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
return 1;
}
 
-   mmc_init(mmc);
+   ret = mmc_init(mmc);
+   if (ret)
+   return 1;
+
if (part != -1) {
ret = mmc_select_hwpart(dev, part);
printf(switch to partitions #%d, %s\n,
-- 
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] cmd_mmc.c: check mmc_init() during mmc dev

2014-05-20 Thread Stephen Warren
On 05/19/2014 06:17 PM, Bryan Wu wrote:
 mmc dev ${devnum} will return 0 as success even if there is no card
 inserted. Booting script like tegra-common-post.h will call mmc dev
 ${devnum} to check the mmc device status, it always return 0 even if
 mmc_init() fails.
 
 Check mmc_init() return value let mmc dev command return failure
 when mmc_init() fails.

You probably want to Cc the MMC maintainer.

 diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c

 @@ -195,6 +195,7 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
 argc, char * const argv[])
   } else if (strcmp(argv[1], dev) == 0) {
   int dev, part = -1;
   struct mmc *mmc;
 + int ret;

The latest u-boot.git master branch already declares ret a couple lines
above. Hence, this patch doesn't compile.

 - mmc_init(mmc);
 + ret = mmc_init(mmc);
 + if (ret)
 + return ret;

I know that I said off-list to return ret here, but it actually looks
like U-Boot commands must not return arbitrary values, but rather must
return 0, 1, or CMD_RET_USAGE. The current code prints the following on
failure:

Tegra124 (Jetson TK1) # mmc dev 1
MMC: no card present
exit not allowed from main input shell.

I'll send a V2 patch with these fixed.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC] POWER framework v3 - wish list

2014-05-20 Thread Simon Glass
Hi Przemyslaw,

On 20 May 2014 03:16, Przemyslaw Marczak p.marc...@samsung.com wrote:
 Hello Simon,


 On 05/19/2014 08:37 PM, Simon Glass wrote:

 Hi,

 On 9 May 2014 03:25, Przemyslaw Marczak p.marc...@samsung.com wrote:

 Hello,

 Some time ago I had a pleasure to work on some kind of a simple
 charger manager for u-boot. For checking battery charge level, cable
 state, and some more info I made a common calls which were implemented in
 board files, so actually it didn't base directly on PMIC framework. This
 allowed making charger abstraction but it was a second power related
 framework next to the PMIC.
  From my side I would like to introduce its next version according to the
 doc/README.power-framework documents TO DO list and some more...

 In this RFC any comments about next version of power management framework
 are welcome.
 What new PMIC framework should provide?
 How to extend it?
 What can be fixed?

 So, what should be done (in my opinion):


 Can I suggest we try to build this with driver model if possible? It
 seems like you will otherwise end up duplicating much of the plumbing
 of that. For example, see 'struct device'.

 Regards,
 Simon


 Yes, I also would like to take it into account - but I am not sure that
 driver model is not too redundant for it?
 If I well understand the current driver model - each driver can have only
 one uclass, right? If yes, then for each previous listed ops we need to
 register separate driver - isn't it too much for read one register or turn
 on the led in the same physically device?

 So maybe better is to register one power driver in driver model? And the
 power uclass driver could init more then one class specific ops.

 I just would like to keep it simply.

Well the intent is for all drivers to fit within the driver model
framework somehow. To answer your questions:

Each device can only have one uclass, but it is possible to create
multiple child devices associated with a driver, and each of those can
be associated with a different uclass. For example a PMIC chip might
have a GPIO driver, a battery driver and a regulator driver. You can
have a top-level mfd device perhaps, which provides access to the
rest. Note there is no mfd uclass as yet, but it would be pretty easy
to add something that supports basic enumeration of its children. This
is how it works in linux and that model works well enough in practice.

On the other hand it doesn't make sense to conflate one function with
another. Clearly the interface you need to access GPIOs is quite
different from that used for setting up power supply voltages. It
actually makes more sense to split up these functions into separate
devices than to try to invent a new semi-merged API for this strange
new franken-device.

Also, I'm not sure what the top level 'power' device would actually
do? Wouldn't you need to grub around inside it and find out its
capabilities (regulators, GPIO, ADC, etc.)? If so, that
grubbing-around layer might as well just be driver model IMO.

A bigger challenge is that almost no drivers support driver model yet,
so definitely there will be a bit of trail-blazing. I'm in there
looking at GPIOs at the moment so can help if questions come up.

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


Re: [U-Boot] [PATCH 8/8] [omap3][overo] Allow overo to boot with device tree

2014-05-20 Thread Stefan Herbrechtsmeier

Am 30.04.2014 01:15, schrieb Ash Charles:

Update the board configuration for Gumstix Overo. In particular,
add support for zImage and DTB files on boot.

Signed-off-by: Ash Charles ashchar...@gmail.com
---
  include/configs/omap3_overo.h | 57 ---
  1 file changed, 37 insertions(+), 20 deletions(-)

diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 1e4dfcf..71ec437 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -193,16 +199,20 @@
omapdss.def_disp=${defaultdisplay}  \
root=${nandroot}  \
rootfstype=${nandrootfstype}\0 \
-   loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0 \
-   bootscript=echo Running bootscript from mmc ...;  \
+   loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0 \
+   bootscript=echo Running boot script from mmc ...;  \
source ${loadaddr}\0 \
-   loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0 \
-   importbootenv=echo Importing environment from mmc${mmcdev} ...;  \
+   loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0 \
+   importbootenv=echo Importing environment from mmc ...;  \
env import -t ${loadaddr} ${filesize}\0 \
-   loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0 \
-   mmcboot=echo Booting from mmc ...;  \
+   loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0 \
+   mmcboot=echo Booting from mmc...;  \
run mmcargs;  \
bootm ${loadaddr}\0 \
+   loadzimage=load mmc ${mmcdev}:2 ${loadaddr} ${bootdir}/${bootfile}\0 \
+   loadfdt=load mmc ${mmcdev}:2 ${dtbaddr} ${bootdir}/${dtbfile}\0 \
+   mmcbootfdt=echo Booting with DT from mmc ...;  \
+   bootz ${loadaddr} - ${dtbaddr}\0 \

A run of mmcargs is missing.

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


Re: [U-Boot] armv8 relocation questions

2014-05-20 Thread Jeroen Hofstee
Hello Wolfgang,

On ma, 2014-05-19 at 23:05 +0200, Wolfgang Denk wrote:
 Dear Jeroen,
 
 In message 1400532143.1985.57.camel@yellow you wrote:
  
   I have no idea how the tool chain was configured here, and what the
   linker script might look like.
  
  for what it is worth:
  aarch64-linux-gnu-gcc (Ubuntu/Linaro 4.8.1-10ubuntu7) 4.8.1
  with its default linker script.
 
 OK, now I know where it's coming from; did you look into this?
 

peeked, but didn't see anything special about it.

   Maybe.  This is with some (unknown here) specific set of compiler
   options and linker statements.  This does not mean that the same or
   silimar code will be generated for U-Boot, 
  
  Could be, but the vexpress_aemv8a shows the same pattern. It has around
  1688 of adrp instructions.
 
 Probably with the same / similar compiler options?
 
  I wondered about that. I could not find such a flag, nor did David think
  it exists.. [1]
 
 You mean this statement:
 
   We can not make gcc-aarch64 do not use adrp instruction when
   constructing address of label.
 
 ?

Yes, I _think_ the architecture _could_ use the full pc, it is just
bigger and slower, and I seems like the compiler folks just did not
implemented it at all.

  
  Perhaps eventually. But for now it seems that also U-boot is forced to
  keep the relocation offset a multiple of 4k.
 
 For aarch64, you mean?  Because the tool chain and/or our current
 understanding how it generates code requires it, right?
 

Right, only for aarch64 and current tools (but my guess it that it will
stay around). ARM32 does not have such a requirement, since it uses the
complete pc. Don't know about other architectures.

That said, _if_ placing start at a not 4k align / page aligned is
acceptable for u-boot it might be smarter to always align the relocation
offset instead of aligning the destination address itself, since
alignment is always preserved in that case as long as it is smaller then
4k (and down, instead of up as in the original patch).

Regards,
Jeroen








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


Re: [U-Boot] [PATCH v3] dfu: Introduction of the dfu_hash_algo env variable for checksum method setting

2014-05-20 Thread Lukasz Majewski
Hi Heiko,

 
 Hello Lukasz,
 
 Am 16.05.2014 10:58, schrieb Lukasz Majewski:
  Hi Wolfgang, Tom,
 
  Hi Wolfgang,
 
  Dear Lukasz,
 
  In message20140515090904.32f1d13d@amdc2363  you wrote:
 
  What I complained about is the change in behaviour.  I asked
  to make the existing behaviour the default, so unaware users
  will not be affected. Only if you intentionally want some
  other behaviour you can then enable this by setting the env
  variable.
 
  Well, looking at mainline usage of DFU, Lukasz is speaking for
  about half of the users / implementors.  Since Denx is working
  with the other half, can you shed some light on actual use vs
  theoretical possibilities?
 
  I don't want to urge anybody on making any conclusion here :-),
  but I would be very grateful if we could come up with an
  agreement.
 
  As I've stated previously, my opinion is similar to the one
  presented by Tom in this message.
 
  For me it would be best to not calculate any checksum on default
  and only enable it when needed.
 
  I asked Heiko to run some actual tests on the boards where he has
  to maintain DFU for.  For a 288 MiB image he did not measure any
  difference - with your patch applied, both with and without CRC
  enabled, we would get the same (slow) 1:54 minutes download time.
 
  As I've spoken with Heiko, am33xx uses NAND memory. I deal with
  eMMC. Moreover, the size of chunks are different - 1 MiB and 32
  MiB.
 
  I must double check for the rationale for chunk size of 32 MiB at
  Trats/Trats2 boards. I suspect, that eMMC write performance depend
  on that.
 
  I will perform some performance tests with 1 MiB chunk size and
  share the result.
 
  Unfortunately the 32 MiB is fixed for our platform. since lthor
  uses it by default.
 
 
 
  This reinforces my speculation that you are actually addressing
  the wrong problem.  Instead of adding new code and environment
  variables and making the system even more complex, we should just
  leave everything as is,
 
  During working on this patch I've replaced the crc32() method with
  the call to hash_method(), which IMHO is welcome.
 
  I also don't personally like the crc32, hence I like the choice
  which this patch gives me to use other algorithm (for which I've
  got HW support on my platform - e.g. MD5).
 
  and you should try to find out why the CRC
  calculation is so low for you.  Checking if caches are enabled is
  probably among the things that should be done first.
 
  L1 is enabled. L2 has been disabled on purpose (power consumption
  reduction).
 
  Regarding L2 - our platform requires SMC calls to enable and manage
  L2 cache. In my opinion support for this in u-boot is an overkill.
 
 
  Can we conclude this whole discussion? The main point was if we
  should keep calculating and displaying crc32 as default for DFU
  transfers.
 
  I'm for the option to NOT display and calculate it by default (PATCH
  v3).
 
 I talked with the siemens board customer, they also do not check/use
 the displayed value from U-Boot ...
 
 So, for me it is OK to not display this value ...

Ok, so we now have a consensus here.

 but we should add
 to DFU such a check ... or?

Yes, we should add a way to send the CRC32/MD5/SHA1 to our boards.

Unfortunately I'm out of office now, so it is hard for me to develop
something.

However, the rough idea would be to send the CRC32 (or any other
checksum) to a separate alt setting.
 
 bye,
 Heiko



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


Re: [U-Boot] Building under Cygwin - -ansi flag?

2014-05-20 Thread Jeroen Hofstee
Dear Vasili,

On ma, 2014-05-19 at 12:45 +0300, Vasili Galka wrote:
[...]

 2. I see a reoccurring pattern of some headers being used from the host,
causing mismatches and arising build errors. Then some way is sought
to include headers from U-Boot tree prior to them which solves the
problem. This happens for both Linux and Cygwin. 

you can add FreeBSD to the list as well, see [1]

This pattern is a
result of the original decision from 2004 to prioritize the host
include paths over the paths from U-Boot tree. 

any reference?

 I see this happening
again and again with different headers in the future. So here comes
the question, is it really the right thing prioritize the include
paths this way? Why do host paths MUST come first?
I'll try reverting this locally and looking what breaks and what
alternative solutions exist.

I have no idea why it is the way it is, but keep in mind that e.g. stdio
headers in u-boot is quite something different then stdio for the target
userland.

Regards,
Jeroen

[1] http://lists.denx.de/pipermail/u-boot/2014-May/179301.html



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


Re: [U-Boot] [PATCH] cmd_mmc.c: check mmc_init() during mmc dev

2014-05-20 Thread Bryan Wu
On Tue, May 20, 2014 at 9:55 AM, Stephen Warren swar...@wwwdotorg.org wrote:
 On 05/19/2014 06:17 PM, Bryan Wu wrote:
 mmc dev ${devnum} will return 0 as success even if there is no card
 inserted. Booting script like tegra-common-post.h will call mmc dev
 ${devnum} to check the mmc device status, it always return 0 even if
 mmc_init() fails.

 Check mmc_init() return value let mmc dev command return failure
 when mmc_init() fails.

 You probably want to Cc the MMC maintainer.

 diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c

 @@ -195,6 +195,7 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
 argc, char * const argv[])
   } else if (strcmp(argv[1], dev) == 0) {
   int dev, part = -1;
   struct mmc *mmc;
 + int ret;

 The latest u-boot.git master branch already declares ret a couple lines
 above. Hence, this patch doesn't compile.

 - mmc_init(mmc);
 + ret = mmc_init(mmc);
 + if (ret)
 + return ret;

 I know that I said off-list to return ret here, but it actually looks
 like U-Boot commands must not return arbitrary values, but rather must
 return 0, 1, or CMD_RET_USAGE. The current code prints the following on
 failure:

 Tegra124 (Jetson TK1) # mmc dev 1
 MMC: no card present
 exit not allowed from main input shell.

 I'll send a V2 patch with these fixed.


Thanks for pushing this. I will update downstream version.

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


Re: [U-Boot] [U-boot] Does u-boot support being compiled by clang compiler?

2014-05-20 Thread Jeroen Hofstee
Hello Tiger,

On di, 2014-05-20 at 10:04 +0800, tiger...@via-alliance.com wrote:
 Hi, experts:
 
 Does u-boot support being compiled by clang compiler?

short answer, no..

slightly longer answer, host tools build fine in general but might warn.

Most of arm targets will build, but only with patches not in mainline.
(big-endian will fail, some board fail having a too huge text)

Regards,
Jeroen

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


Re: [U-Boot] [GIT PULL] Zynq patches v2

2014-05-20 Thread Albert ARIBAUD
Hi Michal,

On Tue, 20 May 2014 15:21:55 +0200, Michal Simek mon...@monstr.eu
wrote:

 Hi Albert,
 
 based on your pull request to Tom here
 http://lists.denx.de/pipermail/u-boot/2014-May/179841.html
 and our IRC last week I am sending updated pull request
 where I have added 5 more patches from Masahiro which
 are bug fixes.
 Please pull them to your tree when you do merge with Tom's tree.

Will do.

 Thanks,
 Michal

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


Re: [U-Boot] [PATCH] patman: Don't request full names from get_maintainer

2014-05-20 Thread Doug Anderson
Simon,

On Tue, May 13, 2014 at 11:17 AM, Simon Glass s...@chromium.org wrote:
 Hi Doug,

 On 18 April 2014 15:32, Doug Anderson diand...@chromium.org wrote:
 Simon,

 On Fri, Apr 18, 2014 at 1:43 PM, Simon Glass s...@chromium.org wrote:
 Hi Doug,

 On 17 April 2014 12:47, Doug Anderson diand...@chromium.org wrote:

 The Linux get_maintainer.pl can often produce a whole lot of results.
 As a result you'll sometimes blow your CC field over 1024 characters
 and that can cause listservs to reject your message.

 As a stopgap, call get_maintainer.pl with --non so it doesn't
 include real names.  This will dramatically reduce the number of
 characters.

 Signed-off-by: Doug Anderson diand...@chromium.org
 ---

  tools/patman/get_maintainer.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/tools/patman/get_maintainer.py 
 b/tools/patman/get_maintainer.py
 index 00b4939..a5160bc 100644
 --- a/tools/patman/get_maintainer.py
 +++ b/tools/patman/get_maintainer.py
 @@ -43,5 +43,5 @@ def GetMaintainer(fname, verbose=False):
  print WARNING: Couldn't find get_maintainer.pl
  return []

 -stdout = command.Output(get_maintainer, '--norolestats', fname)
 +stdout = command.Output(get_maintainer, '--norolestats', '--non', 
 fname)
  return stdout.splitlines()
 --
 1.9.1.423.g4596e3a


 Good to avoid this problem, but I wonder if we should check the size
 and re-run the command if too long? That way we can keep names on the
 thread when it is possible.

 Also, why is there a limit on CC - is that a limitation described in
 the RFC, or just certain mailers? Can we get around it by specifying
 multiple Cc tags?

 I believe that we're actually fighting a heuristic that the mailing
 list servers have to avoid spammers.  In the past I've seen my mail
 get through to list servers that weren't run by kernel.org but _not_
 the the ones at kernel.org.  Kind of like how if you want to write
 code that's for generic exynos 5 hardware you need to use exynos_5yyy
 and _not_ replace the y with x (because that would be adult content!)

 We could possibly only run the heuristic if the CC list was  800
 characters?  I'd hesitate to getting too close to 1024 since I think
 there are instances where git will itself add a CC and that might blow
 us out.

 Yes that seems reasonable - that way we get the names most of the time.


 ...another option is to just forget this patch and force people to add
 this to .get_maintainer.conf

 I think the previous option is better.

I started coding this up and then realized one corner case that
wouldn't be handled: the cover letter case.  This is the most likely
message to go over the limit, even if individual patches are not over
the limit.  That's because we add all addresses to the cover letter in
(3118725 patman: Add all CC addresses to the cover letter).

If we want to try to handle this dynamically, we probably need to
handle it at a higher level and manually strip off the full names
right before passing it off to git.

What do you think?

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


[U-Boot] Pull request: u-boot-sh/rmobile into u-boot-arm/master

2014-05-20 Thread Nobuhiro Iwamatsu
Dear Albert Aribaud,

Please pull u-boot-sh/rmobile into u-boot-arm/master.

The following changes since commit 05d134b084590684bcf4d832c0035952727b7cd9:

  Merge remote-tracking branch 'u-boot/master' (2014-05-20 10:05:42 +0200)

are available in the git repository at:


  git://git.denx.de/u-boot-sh.git rmobile

for you to fetch changes up to 358d6ef32ebddb58f074e1cb2042b910a5738b92:

  arm: rmobile: lager: Enable CONFIG_SYS_GENERIC_BOARD (2014-05-21
10:10:06 +0900)


Nobuhiro Iwamatsu (20):
  arm: rmobile: Add define of SCIF register for R8A7790 and R8A7791
  arm: rmobile: koelsch: Remove define of SCIF register
  arm: rmobile: koelsch: Remove CONFIG_USE_ARCH_MEMSET and MEMCPY
  arm: rmobile: koelsch: Enable optimization of thumb
  arm: rmobile: lager: Remove define of SCIF register
  arm: rmobile: lager: Remove CONFIG_USE_ARCH_MEMSET and MEMCPY
  arm: rmobile: lager: Enable optimization of thumb
  gpio: r8a7791-gpio: Fix typo in macro
  gpio: r8a7790-gpio: Fix typo in macro
  arm: rmobile: koelsch: Add support USB controller
  arm: rmobile: koelsch: Add support command and filesystems of VFAT
  arm: rmobile: lager: Add support USB controller
  arm: rmobile: lager: Add support command and filesystems of VFAT
  arm: rmobile: lager: Add support ext4/fat write command
  arm: rmobile: koelsch: Add support ext4/fat write command
  arm: rmobile: r8a7791: Fix MOD_SEL3 function table about FN_SEL_IEB
  arm: rmobile: koelsch: Fix QoS revision 0.240 and 0.320
  arm: rmobile: armadillo800eva: Enable CONFIG_SYS_GENERIC_BOARD
  arm: rmobile: koelsch: Enable CONFIG_SYS_GENERIC_BOARD
  arm: rmobile: lager: Enable CONFIG_SYS_GENERIC_BOARD

 arch/arm/cpu/armv7/rmobile/pfc-r8a7791.c |  2 +-
 arch/arm/include/asm/arch-rmobile/r8a7790-gpio.h |  6 +++---
 arch/arm/include/asm/arch-rmobile/r8a7791-gpio.h |  6 +++---
 arch/arm/include/asm/arch-rmobile/r8a7791.h  |  1 +
 arch/arm/include/asm/arch-rmobile/rcar-base.h|  8 
 board/renesas/koelsch/qos.c  |  1 +
 include/configs/armadillo-800eva.h   |  1 +
 include/configs/koelsch.h| 23 +++
 include/configs/lager.h  | 22 ++
 9 files changed, 55 insertions(+), 15 deletions(-)

--
Nobuhiro Iwamatsu
   iwamatsu at {nigauri.org / debian.org}
   GPG ID: 40AD1FA6
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] ARM: at91sam9m10g45ek: enable mci0 support

2014-05-20 Thread Bo Shen

Hi Josh,

On 05/20/2014 06:38 PM, Josh Wu wrote:

Enable mci0 support. And enable the mmc command in configuration file.

As both CONFIG_CMD_MMC and CONFIG_CMD_USB use the CONFIG_DOS_PARTITION,
so remove the redundant CONFIG_DOS_PARTITION definition.

Signed-off-by: Josh Wu josh...@atmel.com
---
  board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   28 +++
  include/configs/at91sam9m10g45ek.h  |   15 +++-
  2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c 
b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index b7e2efd..fd6860b 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -15,7 +15,9 @@
  #include asm/arch/gpio.h
  #include asm/arch/clk.h
  #include lcd.h
+#include mmc.h
  #include atmel_lcdc.h
+#include atmel_mci.h
  #if defined(CONFIG_RESET_PHY_R)  defined(CONFIG_MACB)
  #include net.h
  #endif
@@ -217,6 +219,29 @@ void lcd_show_board_info(void)
  #endif /* CONFIG_LCD_INFO */
  #endif

+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91sam9m10g45ek_mci_hw_init(void)
+{
+   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+   at91_set_a_periph(AT91_PIO_PORTA, 0, 0);/* MCI0 CLK */
+   at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* MCI0 CDA */
+   at91_set_a_periph(AT91_PIO_PORTA, 2, 0);/* MCI0 DB0 */
+   at91_set_a_periph(AT91_PIO_PORTA, 3, 0);/* MCI0 DB1 */
+   at91_set_a_periph(AT91_PIO_PORTA, 4, 0);/* MCI0 DB2 */
+   at91_set_a_periph(AT91_PIO_PORTA, 5, 0);/* MCI0 DB3 */


The comments for pin should be DAx while not DBx.


+
+   /* Enable clock */
+   writel(1  ATMEL_ID_MCI0, pmc-pcer);
+}
+
+int board_mmc_init(bd_t *bis)
+{
+   at91_set_pio_input(AT91_PIO_PORTD, 10, 0);  /* MCI0 CD */


As we won't use it, so I think we should remove it.


+   return atmel_mci_init((void *)ATMEL_BASE_MCI0);
+}
+#endif
+
  int board_early_init_f(void)
  {
at91_seriald_hw_init();
@@ -247,6 +272,9 @@ int board_init(void)
  #ifdef CONFIG_ATMEL_SPI
at91_spi0_hw_init(1  4);
  #endif
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+   at91sam9m10g45ek_mci_hw_init();
+#endif
  #ifdef CONFIG_MACB
at91sam9m10g45ek_macb_hw_init();
  #endif
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index ccfda71..df277e7 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -115,6 +115,20 @@

  #endif

+/* MMC */
+#define CONFIG_CMD_MMC
+
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_GENERIC_ATMEL_MCI
+#endif
+
+#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
  /* Ethernet */
  #define CONFIG_MACB
  #define CONFIG_RMII
@@ -126,7 +140,6 @@
  #define CONFIG_USB_EHCI
  #define CONFIG_USB_EHCI_ATMEL
  #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS2
-#define CONFIG_DOS_PARTITION
  #define CONFIG_USB_STORAGE

  #define CONFIG_SYS_LOAD_ADDR  0x2200  /* load address */



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


Re: [U-Boot] [PATCH 2/2] ARM: at91sam9m10g45ek: add mmc environment configuration support

2014-05-20 Thread Bo Shen

Hi Josh,

On 05/20/2014 06:38 PM, Josh Wu wrote:

In this configuration the environment will save in file: uboot.env of
mmc card.

Signed-off-by: Josh Wu josh...@atmel.com
---
  boards.cfg |1 +
  include/configs/at91sam9m10g45ek.h |   20 
  2 files changed, 21 insertions(+)

diff --git a/boards.cfg b/boards.cfg
index 3a59686..9f7cfd8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -102,6 +102,7 @@ Active  arm arm926ejs  at91atmel
   at91sam9263ek
  Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflashat91sam9263ek:AT91SAM9263,SYS_USE_NORFLASH  
  
Stelian Pop stel...@popies.net
  Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflash_boot   at91sam9263ek:AT91SAM9263,SYS_USE_BOOT_NORFLASH 
  
Stelian Pop stel...@popies.net
  Active  arm arm926ejs  at91atmel   at91sam9m10g45ek
at91sam9m10g45ek_nandflash
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH 
Bo Shenvoice.s...@atmel.com
+Active  arm arm926ejs  at91atmel   at91sam9m10g45ek
at91sam9m10g45ek_mmc  at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_MMC 
  Bo 
Shenvoice.s...@atmel.com
  Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_mmc at91sam9n12ek:AT91SAM9N12,SYS_USE_MMC   
  
Josh Wu josh...@atmel.com
  Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_nandflash   at91sam9n12ek:AT91SAM9N12,SYS_USE_NANDFLASH 
  
Josh Wu josh...@atmel.com
  Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_spiflashat91sam9n12ek:AT91SAM9N12,SYS_USE_SPIFLASH  
  
Josh Wu josh...@atmel.com
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index df277e7..07b2188 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -147,6 +147,7 @@
  #define CONFIG_SYS_MEMTEST_START  CONFIG_SYS_SDRAM_BASE
  #define CONFIG_SYS_MEMTEST_END0x23e0

+#ifdef CONFIG_SYS_USE_NANDFLASH
  /* bootstrap + u-boot + env in nandflash */
  #define CONFIG_ENV_IS_IN_NAND
  #define CONFIG_ENV_OFFSET 0xc
@@ -162,6 +163,25 @@
256k(env),256k(env_redundant),256k(spare),  \
512k(dtb),6M(kernel)ro,-(rootfs)\
root=/dev/mtdblock7 rw rootfstype=jffs2
+#elif CONFIG_SYS_USE_MMC
+/* bootstrap + u-boot + env + linux in mmc */
+#define FAT_ENV_INTERFACE  mmc
+#define FAT_ENV_DEVICE 0
+#define FAT_ENV_PART   1
+#define FAT_ENV_FILE   uboot.env
+#define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_ENV_SIZE0x4000
+
+#define CONFIG_BOOTARGSmem=128M console=ttyS0,115200  \


I think we should remove mem=128M as we use device tree.


+   mtdparts=atmel_nand: \
+   8M(bootstrap/uboot/kernel)ro,-(rootfs)  \
+   root=/dev/mmcblk0p2  \
+   rw rootfstype=ext4 rootwait


Can we remove rootfstype, so it can compatible with ext2, ext3 and ext4.


+#define CONFIG_BOOTCOMMAND fatload mmc 0:1 0x7100 dtb;  \
+   fatload mmc 0:1 0x7200 uImage;  \
+   bootm 0x7200 - 0x7100


Can we switch to zImage? As we try to support multi-platform with single 
image in kernel.



+#endif

  #define CONFIG_BAUDRATE   115200




Best Regards,
Bo Shen

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


Re: [U-Boot] [PATCHv5 09/14] mmc: support the DDR mode for eMMC

2014-05-20 Thread Jaehoon Chung
Hi, Hector.

On 05/21/2014 01:37 AM, Hector Palacios wrote:
 Hi,
 
 On 05/16/2014 06:59 AM, Jaehoon Chung wrote:
 Signed-off-by: Jaehoon Chung jh80.ch...@samsung.com
 Tested-by: Lukasz Majewski l.majew...@samsung.com
 Acked-by: Lukasz Majewski l.majew...@samsung.com
 
 What platforms did you test DDR mode on?

I have tested DDR mode with exynos board.

 I tried this on an Freescale i.MX6 based platform but the driver returned 
 error code COM_ERR (-18) when trying to switch to any of the DDR modes. I 
 guess the fsl_esdhc.c driver needs some adaptation for DDR to work.

I didn't know how work DDR mode at fsl_esdhc.c.(If you share the host 
controller TRM, it's helpful to me.)
Host controller also need to change the DDR mode.

I wonder your board didn't work not to enable the DDR mode?

Best Regards,
Jaehoon Chung

 
 Best regards,
 -- 
 Hector Palacios
 

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


Re: [U-Boot] [PATCH 2/2] ARM: at91sam9m10g45ek: add mmc environment configuration support

2014-05-20 Thread Josh Wu

Hi, Bo

On 5/21/2014 9:32 AM, Bo Shen wrote:

Hi Josh,

On 05/20/2014 06:38 PM, Josh Wu wrote:

In this configuration the environment will save in file: uboot.env of
mmc card.

Signed-off-by: Josh Wu josh...@atmel.com
---
  boards.cfg |1 +
  include/configs/at91sam9m10g45ek.h |   20 
  2 files changed, 21 insertions(+)

diff --git a/boards.cfg b/boards.cfg
index 3a59686..9f7cfd8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -102,6 +102,7 @@ Active  arm arm926ejs at91
atmel   at91sam9263ek
  Active  arm arm926ejs  at91atmel 
at91sam9263ek   at91sam9263ek_norflash 
at91sam9263ek:AT91SAM9263,SYS_USE_NORFLASH Stelian Pop 
stel...@popies.net
  Active  arm arm926ejs  at91atmel 
at91sam9263ek   at91sam9263ek_norflash_boot 
at91sam9263ek:AT91SAM9263,SYS_USE_BOOT_NORFLASH Stelian Pop 
stel...@popies.net
  Active  arm arm926ejs  at91atmel 
at91sam9m10g45ekat91sam9m10g45ek_nandflash 
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH Bo 
Shenvoice.s...@atmel.com
+Active  arm arm926ejs  at91atmel 
at91sam9m10g45ekat91sam9m10g45ek_mmc 
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_MMC Bo 
Shenvoice.s...@atmel.com
  Active  arm arm926ejs  at91atmel 
at91sam9n12ek   at91sam9n12ek_mmc 
at91sam9n12ek:AT91SAM9N12,SYS_USE_MMC Josh Wu josh...@atmel.com
  Active  arm arm926ejs  at91atmel 
at91sam9n12ek   at91sam9n12ek_nandflash 
at91sam9n12ek:AT91SAM9N12,SYS_USE_NANDFLASH Josh Wu josh...@atmel.com
  Active  arm arm926ejs  at91atmel 
at91sam9n12ek   at91sam9n12ek_spiflash 
at91sam9n12ek:AT91SAM9N12,SYS_USE_SPIFLASH Josh Wu josh...@atmel.com
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h

index df277e7..07b2188 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -147,6 +147,7 @@
  #define CONFIG_SYS_MEMTEST_STARTCONFIG_SYS_SDRAM_BASE
  #define CONFIG_SYS_MEMTEST_END0x23e0

+#ifdef CONFIG_SYS_USE_NANDFLASH
  /* bootstrap + u-boot + env in nandflash */
  #define CONFIG_ENV_IS_IN_NAND
  #define CONFIG_ENV_OFFSET0xc
@@ -162,6 +163,25 @@
  256k(env),256k(env_redundant),256k(spare),\
  512k(dtb),6M(kernel)ro,-(rootfs) \
  root=/dev/mtdblock7 rw rootfstype=jffs2
+#elif CONFIG_SYS_USE_MMC
+/* bootstrap + u-boot + env + linux in mmc */
+#define FAT_ENV_INTERFACEmmc
+#define FAT_ENV_DEVICE0
+#define FAT_ENV_PART1
+#define FAT_ENV_FILEuboot.env
+#define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_ENV_SIZE0x4000
+
+#define CONFIG_BOOTARGSmem=128M console=ttyS0,115200  \


I think we should remove mem=128M as we use device tree.


+mtdparts=atmel_nand: \
+8M(bootstrap/uboot/kernel)ro,-(rootfs)  \
+root=/dev/mmcblk0p2  \
+rw rootfstype=ext4 rootwait


Can we remove rootfstype, so it can compatible with ext2, ext3 and ext4.


+#define CONFIG_BOOTCOMMANDfatload mmc 0:1 0x7100 dtb;  \
+fatload mmc 0:1 0x7200 uImage;  \
+bootm 0x7200 - 0x7100


Can we switch to zImage? As we try to support multi-platform with 
single image in kernel.



+#endif

  #define CONFIG_BAUDRATE115200






I will update to v2 according to your advise. Thanks.

Best Regards,
Josh Wu


Best Regards,
Bo Shen



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


Re: [U-Boot] [PATCH 1/2] ARM: at91sam9m10g45ek: enable mci0 support

2014-05-20 Thread Josh Wu

Hi, Bo

On 5/21/2014 9:27 AM, Bo Shen wrote:

Hi Josh,

On 05/20/2014 06:38 PM, Josh Wu wrote:

Enable mci0 support. And enable the mmc command in configuration file.

As both CONFIG_CMD_MMC and CONFIG_CMD_USB use the CONFIG_DOS_PARTITION,
so remove the redundant CONFIG_DOS_PARTITION definition.

Signed-off-by: Josh Wu josh...@atmel.com
---
  board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c |   28 
+++

  include/configs/at91sam9m10g45ek.h  |   15 +++-
  2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c 
b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c

index b7e2efd..fd6860b 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -15,7 +15,9 @@
  #include asm/arch/gpio.h
  #include asm/arch/clk.h
  #include lcd.h
+#include mmc.h
  #include atmel_lcdc.h
+#include atmel_mci.h
  #if defined(CONFIG_RESET_PHY_R)  defined(CONFIG_MACB)
  #include net.h
  #endif
@@ -217,6 +219,29 @@ void lcd_show_board_info(void)
  #endif /* CONFIG_LCD_INFO */
  #endif

+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91sam9m10g45ek_mci_hw_init(void)
+{
+struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+at91_set_a_periph(AT91_PIO_PORTA, 0, 0);/* MCI0 CLK */
+at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* MCI0 CDA */
+at91_set_a_periph(AT91_PIO_PORTA, 2, 0);/* MCI0 DB0 */
+at91_set_a_periph(AT91_PIO_PORTA, 3, 0);/* MCI0 DB1 */
+at91_set_a_periph(AT91_PIO_PORTA, 4, 0);/* MCI0 DB2 */
+at91_set_a_periph(AT91_PIO_PORTA, 5, 0);/* MCI0 DB3 */


The comments for pin should be DAx while not DBx.


I'll fix it in v2.




+
+/* Enable clock */
+writel(1  ATMEL_ID_MCI0, pmc-pcer);
+}
+
+int board_mmc_init(bd_t *bis)
+{
+at91_set_pio_input(AT91_PIO_PORTD, 10, 0);/* MCI0 CD */


As we won't use it, so I think we should remove it.


Okay. Thanks.

Best Regards,
Josh Wu




+return atmel_mci_init((void *)ATMEL_BASE_MCI0);
+}
+#endif
+
  int board_early_init_f(void)
  {
  at91_seriald_hw_init();
@@ -247,6 +272,9 @@ int board_init(void)
  #ifdef CONFIG_ATMEL_SPI
  at91_spi0_hw_init(1  4);
  #endif
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+at91sam9m10g45ek_mci_hw_init();
+#endif
  #ifdef CONFIG_MACB
  at91sam9m10g45ek_macb_hw_init();
  #endif
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h

index ccfda71..df277e7 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -115,6 +115,20 @@

  #endif

+/* MMC */
+#define CONFIG_CMD_MMC
+
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_GENERIC_ATMEL_MCI
+#endif
+
+#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
  /* Ethernet */
  #define CONFIG_MACB
  #define CONFIG_RMII
@@ -126,7 +140,6 @@
  #define CONFIG_USB_EHCI
  #define CONFIG_USB_EHCI_ATMEL
  #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS2
-#define CONFIG_DOS_PARTITION
  #define CONFIG_USB_STORAGE

  #define CONFIG_SYS_LOAD_ADDR0x2200/* load address */



Best Regards,
Bo Shen


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


[U-Boot] [PATCH v2 1/2] ARM: at91sam9m10g45ek: enable mci0 support

2014-05-20 Thread Josh Wu
Also we enable the mmc command in configuration file.

As both CONFIG_CMD_MMC and CONFIG_CMD_USB use the CONFIG_DOS_PARTITION,
so remove the redundant CONFIG_DOS_PARTITION definition.

Signed-off-by: Josh Wu josh...@atmel.com
---
v1 - v2:
  1. refined the comment for the pins.
  2. remove detected pin initialization.
  3. move the mci initialization code to devices.c
  4. remove useless header file: mmc.h

 .../cpu/arm926ejs/at91/at91sam9m10g45_devices.c|   17 +
 board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c|   10 ++
 include/configs/at91sam9m10g45ek.h |   15 ++-
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9m10g45_devices.c 
b/arch/arm/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
index 7d7725c..0e6c0da 100644
--- a/arch/arm/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+++ b/arch/arm/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
@@ -165,3 +165,20 @@ void at91_macb_hw_init(void)
 #endif
 }
 #endif
+
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+void at91_mci_hw_init(void)
+{
+   struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+   at91_set_a_periph(AT91_PIO_PORTA, 0, 0);/* MCI0 CLK */
+   at91_set_a_periph(AT91_PIO_PORTA, 1, 0);/* MCI0 CDA */
+   at91_set_a_periph(AT91_PIO_PORTA, 2, 0);/* MCI0 DA0 */
+   at91_set_a_periph(AT91_PIO_PORTA, 3, 0);/* MCI0 DA1 */
+   at91_set_a_periph(AT91_PIO_PORTA, 4, 0);/* MCI0 DA2 */
+   at91_set_a_periph(AT91_PIO_PORTA, 5, 0);/* MCI0 DA3 */
+
+   /* Enable clock */
+   writel(1  ATMEL_ID_MCI0, pmc-pcer);
+}
+#endif
diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c 
b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
index b7e2efd..5788116 100644
--- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
+++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c
@@ -16,6 +16,7 @@
 #include asm/arch/clk.h
 #include lcd.h
 #include atmel_lcdc.h
+#include atmel_mci.h
 #if defined(CONFIG_RESET_PHY_R)  defined(CONFIG_MACB)
 #include net.h
 #endif
@@ -217,6 +218,15 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
+#ifdef CONFIG_GENERIC_ATMEL_MCI
+int board_mmc_init(bd_t *bis)
+{
+   at91_mci_hw_init();
+
+   return atmel_mci_init((void *)ATMEL_BASE_MCI0);
+}
+#endif
+
 int board_early_init_f(void)
 {
at91_seriald_hw_init();
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index ccfda71..df277e7 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -115,6 +115,20 @@
 
 #endif
 
+/* MMC */
+#define CONFIG_CMD_MMC
+
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_GENERIC_ATMEL_MCI
+#endif
+
+#if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
 /* Ethernet */
 #define CONFIG_MACB
 #define CONFIG_RMII
@@ -126,7 +140,6 @@
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_ATMEL
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
-#define CONFIG_DOS_PARTITION
 #define CONFIG_USB_STORAGE
 
 #define CONFIG_SYS_LOAD_ADDR   0x2200  /* load address */
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 2/2] ARM: at91sam9m10g45ek: add mmc environment configuration support

2014-05-20 Thread Josh Wu
In this configuration the environment will save in file: uboot.env of
mmc card.

Signed-off-by: Josh Wu josh...@atmel.com
---
v1 - v2:
  1. remove mem=128m and roottype in bootargs.
  2. default boot command use zImage instead of uImage.

 boards.cfg |1 +
 include/configs/at91sam9m10g45ek.h |   19 +++
 2 files changed, 20 insertions(+)

diff --git a/boards.cfg b/boards.cfg
index 3a59686..9f7cfd8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -102,6 +102,7 @@ Active  arm arm926ejs  at91atmel
   at91sam9263ek
 Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflash
at91sam9263ek:AT91SAM9263,SYS_USE_NORFLASH  
  Stelian Pop 
stel...@popies.net
 Active  arm arm926ejs  at91atmel   at91sam9263ek   
at91sam9263ek_norflash_boot   
at91sam9263ek:AT91SAM9263,SYS_USE_BOOT_NORFLASH 
  Stelian Pop 
stel...@popies.net
 Active  arm arm926ejs  at91atmel   
at91sam9m10g45ekat91sam9m10g45ek_nandflash
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH   
  Bo Shenvoice.s...@atmel.com
+Active  arm arm926ejs  at91atmel   
at91sam9m10g45ekat91sam9m10g45ek_mmc  
at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_MMC 
  Bo Shenvoice.s...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_mmc at91sam9n12ek:AT91SAM9N12,SYS_USE_MMC 

Josh Wu josh...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_nandflash   
at91sam9n12ek:AT91SAM9N12,SYS_USE_NANDFLASH 
  Josh Wu josh...@atmel.com
 Active  arm arm926ejs  at91atmel   at91sam9n12ek   
at91sam9n12ek_spiflash
at91sam9n12ek:AT91SAM9N12,SYS_USE_SPIFLASH  
  Josh Wu josh...@atmel.com
diff --git a/include/configs/at91sam9m10g45ek.h 
b/include/configs/at91sam9m10g45ek.h
index df277e7..cab3bb5 100644
--- a/include/configs/at91sam9m10g45ek.h
+++ b/include/configs/at91sam9m10g45ek.h
@@ -147,6 +147,7 @@
 #define CONFIG_SYS_MEMTEST_START   CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END 0x23e0
 
+#ifdef CONFIG_SYS_USE_NANDFLASH
 /* bootstrap + u-boot + env in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET  0xc
@@ -162,6 +163,24 @@
256k(env),256k(env_redundant),256k(spare),\
512k(dtb),6M(kernel)ro,-(rootfs)  \
root=/dev/mtdblock7 rw rootfstype=jffs2
+#elif CONFIG_SYS_USE_MMC
+/* bootstrap + u-boot + env + linux in mmc */
+#define FAT_ENV_INTERFACE  mmc
+#define FAT_ENV_DEVICE 0
+#define FAT_ENV_PART   1
+#define FAT_ENV_FILE   uboot.env
+#define CONFIG_ENV_IS_IN_FAT
+#define CONFIG_FAT_WRITE
+#define CONFIG_ENV_SIZE0x4000
+
+#define CONFIG_BOOTARGSconsole=ttyS0,115200  \
+   mtdparts=atmel_nand: \
+   8M(bootstrap/uboot/kernel)ro,-(rootfs)  \
+   root=/dev/mmcblk0p2 rw rootwait
+#define CONFIG_BOOTCOMMAND fatload mmc 0:1 0x7100 dtb;  \
+   fatload mmc 0:1 0x7200 zImage;  \
+   bootz 0x7200 - 0x7100
+#endif
 
 #define CONFIG_BAUDRATE115200
 
-- 
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 V2] cmd_mmc.c: check mmc_init() during mmc dev

2014-05-20 Thread Jaehoon Chung
Hi, Stephen.

i didn't apply your patch. Which repository do you use?
Well, if you want to check, can be used if (mmc_init(mmc)).

And i'm not sure whether this code is really need or not.

Best Regards,
Jaehoon Chung

On 05/21/2014 01:57 AM, Stephen Warren wrote:
 From: Bryan Wu coolo...@gmail.com
 
 mmc dev ${devnum} will return 0 as success even if there is no card
 inserted. Booting script like tegra-common-post.h will call mmc dev
 ${devnum} to check the mmc device status, it always return 0 even if
 mmc_init() fails.
 
 Check mmc_init() return value let mmc dev command return failure
 when mmc_init() fails.
 
 Signed-off-by: Bryan Wu pe...@nvidia.com
 [swarren: Always return 1 on error; hush doesn't appear to support
 arbitrary return values. Fixed compilation error due to multiple
 declaration of ret variable.]
 Tested-by: Stephen Warren swar...@nvidia.com
 Signed-off-by: Stephen Warren swar...@nvidia.com
 ---
 v2:
 * Always return 1 on error; hush doesn't appear to support
   arbitrary return values.
 * Fixed compilation error due to multiple declaration of ret variable.
 ---
  common/cmd_mmc.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
 index 572aa895fa1c..2e564572f74d 100644
 --- a/common/cmd_mmc.c
 +++ b/common/cmd_mmc.c
 @@ -217,7 +217,10 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int 
 argc, char * const argv[])
   return 1;
   }
  
 - mmc_init(mmc);
 + ret = mmc_init(mmc);
 + if (ret)
 + return 1;
 +
   if (part != -1) {
   ret = mmc_select_hwpart(dev, part);
   printf(switch to partitions #%d, %s\n,
 

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