Re: [U-Boot] [U-boot] Uboot's plan for ARMv8

2014-01-10 Thread bhupesh.sha...@freescale.com
 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
 On Behalf Of bhupesh.sha...@freescale.com
 Sent: Friday, January 10, 2014 12:59 PM
 To: 'tiger...@viatech.com.cn'; 'u-boot@lists.denx.de'
 Subject: Re: [U-Boot] [U-boot] Uboot's plan for ARMv8
 
  -Original Message-
  From: tiger...@viatech.com.cn [mailto:tiger...@viatech.com.cn]
  Sent: Friday, January 10, 2014 12:25 PM
  To: Sharma Bhupesh-B45370; u-boot@lists.denx.de
  Cc: feng...@phytium.com.cn
  Subject: Re: [U-boot] Uboot's plan for ARMv8
 
  Hi, sharma:
  Thanks for your answer!
  How to get u-boot source code which includes arch/arm/cpu/armv8 dir?
  I used git clone git://www.denx.de/git/u-boot.git to download source
  code.
  But not find arm64 patch code in the downloaded source code.
 
 
 Hi Tiger,
 
 David's patches have still not made it into the DENX u-boot tree.
 If you are using a thunderbird email client to get email messages from
 DENX's u-boot list, go to MARC mailing list for u-boot (see [1]) and
 download all patches as '[Download message RAW]'
 and apply them over the top of your git-tree in correct patch order with
 'git am -3'
 
 1. http://marc.info/?l=u-bootm=138699294830148w=2
 

Sorry for the typo, I meant:

a. If you are using a thunderbird email client to get email messages from 
DENX's u-boot list,
you can directly download David's v16 ARM patches from there (as RAW patches), 
or

b. Go to MARC mailing list for u-boot (see [1]) and download all patches as 
'[Download message RAW]'
and apply them over the top of your git-tree in correct patch order with 'git 
am -3'

1. http://marc.info/?l=u-bootm=138699294830148w=2

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

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


[U-Boot] [PATCH] spi: oc_tiny_spi: Refactor to simplify spi_xfer implementation

2014-01-10 Thread Axel Lin
Currently we have similar code for (txp  rxp), (txp  !rxp), (!rxp  txp),
and (!txp  !rxp) cases. This patch refactors the code a bit to avoid
duplicate similar code.

Signed-off-by: Axel Lin axel@ingics.com
---
Hi Thomas,
This path is similar to the patch I sent for spi-oc-tiny.c linux driver.
I'd appreciate if you can review and test this patch.
Regards,
Axel
 drivers/spi/oc_tiny_spi.c | 85 ++-
 1 file changed, 11 insertions(+), 74 deletions(-)

diff --git a/drivers/spi/oc_tiny_spi.c b/drivers/spi/oc_tiny_spi.c
index 4de5d00..a8c1dfd 100644
--- a/drivers/spi/oc_tiny_spi.c
+++ b/drivers/spi/oc_tiny_spi.c
@@ -158,85 +158,22 @@ int spi_xfer(struct spi_slave *slave, unsigned int 
bitlen, const void *dout,
spi_cs_activate(slave);
 
/* we need to tighten the transfer loop */
-   if (txp  rxp) {
-   writeb(*txp++, regs-txdata);
-   if (bytes  1) {
-   writeb(*txp++, regs-txdata);
-   for (i = 2; i  bytes; i++) {
-   u8 rx, tx = *txp++;
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
+   writeb(txp ? *txp++ : CONFIG_TINY_SPI_IDLE_VAL, regs-txdata);
+   for (i = 1; i  bytes; i++) {
+   writeb(txp ? *txp++ : CONFIG_TINY_SPI_IDLE_VAL, regs-txdata);
+
+   if (rxp || (i != bytes - 1)) {
+   while (!(readb(regs-status)  TINY_SPI_STATUS_TXR))
;
-   rx = readb(regs-txdata);
-   writeb(tx, regs-txdata);
-   *rxp++ = rx;
-   }
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
-   ;
-   *rxp++ = readb(regs-txdata);
}
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXE))
-   ;
-   *rxp++ = readb(regs-rxdata);
-   } else if (rxp) {
-   writeb(CONFIG_TINY_SPI_IDLE_VAL, regs-txdata);
-   if (bytes  1) {
-   writeb(CONFIG_TINY_SPI_IDLE_VAL,
-  regs-txdata);
-   for (i = 2; i  bytes; i++) {
-   u8 rx;
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
-   ;
-   rx = readb(regs-txdata);
-   writeb(CONFIG_TINY_SPI_IDLE_VAL,
-  regs-txdata);
-   *rxp++ = rx;
-   }
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
-   ;
+
+   if (rxp)
*rxp++ = readb(regs-txdata);
-   }
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXE))
+   }
+   while (!(readb(regs-status)  TINY_SPI_STATUS_TXE))
;
+   if (rxp)
*rxp++ = readb(regs-rxdata);
-   } else if (txp) {
-   writeb(*txp++, regs-txdata);
-   if (bytes  1) {
-   writeb(*txp++, regs-txdata);
-   for (i = 2; i  bytes; i++) {
-   u8 tx = *txp++;
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
-   ;
-   writeb(tx, regs-txdata);
-   }
-   }
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXE))
-   ;
-   } else {
-   writeb(CONFIG_TINY_SPI_IDLE_VAL, regs-txdata);
-   if (bytes  1) {
-   writeb(CONFIG_TINY_SPI_IDLE_VAL,
-  regs-txdata);
-   for (i = 2; i  bytes; i++) {
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXR))
-   ;
-   writeb(CONFIG_TINY_SPI_IDLE_VAL,
-  regs-txdata);
-   }
-   }
-   while (!(readb(regs-status) 
-TINY_SPI_STATUS_TXE))
-   ;
-   }
-
  done:
if (flags  SPI_XFER_END)
spi_cs_deactivate(slave);
-- 
1.8.1.2



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


Re: [U-Boot] [PATCH 9/9] USB: gadget: added a saner gadget downloader registration API

2014-01-10 Thread Lukasz Majewski
Hi Heiko,

 Preprocessor definitions and hardcoded implementation selection in
 g_dnl core were replaced by a linker list made of {usb_function_name,
 bind_callback) pairs.

Could you test those g_dnl related patches?

You would probably need to apply the whole series for testing.

Thanks in advance.

Regards,
Lukasz

 
 Change-Id: I4e0515e7fd61ff19793e9ac9a6c48b07c616c9dc
 Signed-off-by: Mateusz Zalega m.zal...@samsung.com
 Cc: Lukasz Majewski l.majew...@samsung.com
 Cc: Kyungmin Park kyungmin.p...@samsung.com
 ---
  common/cmd_dfu.c|  3 +-
  common/cmd_thordown.c   |  3 +-
  common/cmd_usb_mass_storage.c   |  2 +-
  drivers/usb/gadget/f_dfu.c  | 11 --
  drivers/usb/gadget/f_mass_storage.c |  6 +++
  drivers/usb/gadget/f_thor.c |  5 +++
  drivers/usb/gadget/g_dnl.c  | 74
 +
 include/dfu.h   |  7 
 include/g_dnl.h | 11 ++
 include/thor.h  |  8 
 include/usb_mass_storage.h  |  8  11 files changed, 66
 insertions(+), 72 deletions(-)
 
 diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c
 index 5547678..a03538d 100644
 --- a/common/cmd_dfu.c
 +++ b/common/cmd_dfu.c
 @@ -22,7 +22,6 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[]) char *interface = argv[2];
   char *devstring = argv[3];
  
 - char *s = dfu;
   int ret, i = 0;
  
   ret = dfu_init_env_entities(interface,
 simple_strtoul(devstring, @@ -38,7 +37,7 @@ static int
 do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int
 controller_index = simple_strtoul(usb_controller, NULL, 0);
 board_usb_init(controller_index, USB_INIT_DEVICE); 
 - g_dnl_register(s);
 + g_dnl_register(usb_dnl_dfu);
   while (1) {
   if (dfu_reset())
   /*
 diff --git a/common/cmd_thordown.c b/common/cmd_thordown.c
 index c4b3511..2dd7509 100644
 --- a/common/cmd_thordown.c
 +++ b/common/cmd_thordown.c
 @@ -22,7 +22,6 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[]) char *interface = argv[2];
   char *devstring = argv[3];
  
 - const char *s = thor;
   int ret;
  
   puts(TIZEN \THOR\ Downloader\n);
 @@ -40,7 +39,7 @@ int do_thor_down(cmd_tbl_t *cmdtp, int flag, int
 argc, char * const argv[]) goto exit;
   }
  
 - g_dnl_register(s);
 + g_dnl_register(usb_dnl_thor);
  
   ret = thor_init();
   if (ret) {
 diff --git a/common/cmd_usb_mass_storage.c
 b/common/cmd_usb_mass_storage.c index 99487f4..c8e152c 100644
 --- a/common/cmd_usb_mass_storage.c
 +++ b/common/cmd_usb_mass_storage.c
 @@ -40,7 +40,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
   return CMD_RET_FAILURE;
   }
  
 - g_dnl_register(ums);
 + g_dnl_register(usb_dnl_ums);
  
   while (1) {
   usb_gadget_handle_interrupts();
 diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
 index a045864..cde1895 100644
 --- a/drivers/usb/gadget/f_dfu.c
 +++ b/drivers/usb/gadget/f_dfu.c
 @@ -18,12 +18,14 @@
  #include errno.h
  #include common.h
  #include malloc.h
 +#include linker_lists.h
  
  #include linux/usb/ch9.h
  #include linux/usb/gadget.h
  #include linux/usb/composite.h
  
  #include dfu.h
 +#include g_dnl.h
  #include f_dfu.h
  
  struct f_dfu {
 @@ -768,9 +770,7 @@ static int dfu_bind_config(struct
 usb_configuration *c) 
  int dfu_add(struct usb_configuration *c)
  {
 - int id;
 -
 - id = usb_string_id(c-cdev);
 + int id = usb_string_id(c-cdev);
   if (id  0)
   return id;
   strings_dfu_generic[0].id = id;
 @@ -781,3 +781,8 @@ int dfu_add(struct usb_configuration *c)
  
   return dfu_bind_config(c);
  }
 +
 +/* export dfu_add to g_dnl.o */
 +ll_entry_declare(struct g_dnl_bind_callback, dfu_bind_callback,
 + g_dnl_bind_callbacks) = { .usb_function_name =
 usb_dnl_dfu,
 +   .fptr = dfu_add };
 diff --git a/drivers/usb/gadget/f_mass_storage.c
 b/drivers/usb/gadget/f_mass_storage.c index b1fe8bd..b7d03f2 100644
 --- a/drivers/usb/gadget/f_mass_storage.c
 +++ b/drivers/usb/gadget/f_mass_storage.c
 @@ -243,6 +243,7 @@
  #include config.h
  #include malloc.h
  #include common.h
 +#include linker_lists.h
  #include usb.h
  
  #include linux/err.h
 @@ -255,6 +256,7 @@
  #include linux/usb/gadget.h
  #include linux/usb/composite.h
  #include usb/lin_gadget_compat.h
 +#include g_dnl.h
  
  /**/
  
 @@ -2778,3 +2780,7 @@ int fsg_init(struct ums *ums_dev)
  
   return 0;
  }
 +
 +ll_entry_declare(struct g_dnl_bind_callback, fsg_bind_callback,
 + g_dnl_bind_callbacks) = { .usb_function_name =
 usb_dnl_ums,
 +   .fptr = fsg_add };
 diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
 index 

Re: [U-Boot] [PATCH v16 00/10] arm64 patch

2014-01-10 Thread Albert ARIBAUD
Hi tiger...@viatech.com.cn,

On Fri, 10 Jan 2014 09:58:11 +0800, tiger...@viatech.com.cn wrote:

 Hi, Albtert:
 How to download u-boot source code with arm64 patch code.
 Such as :
 Include  arch/arm/cpu/armv8 directory.
 
 I used git clone git://www.denx.de/git/u-boot.git to download source
 code.
 But not find arm64 patch code in the downloaded source code.

This is normal as the series is not yet applied to the ARM repo, let
alone the main repo.

I have just finished testing the series with the corrective patch from
Tom re: the 32-bit boards failing to build, and another patch from me
which prevents building 32-bit and 64-bit targets in a single 'MAKEALL
-a' command, as no toolchain currently exists that can build both types
of targets.

 Best wishes,

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


Re: [U-Boot] [PATCH v16 00/10] arm64 patch

2014-01-10 Thread Albert ARIBAUD
Hi feng...@phytium.com.cn,

On Sat, 14 Dec 2013 11:47:28 +0800, feng...@phytium.com.cn wrote:

 From: David Feng feng...@phytium.com.cn
 
 Changes for v16:
   - make the patches work with latest recently u-boot.
 add rela relocation type to OBJCFLAGS definition
 at arm/config.mk.

Applied to u-boot-arm, with Tom's (amended) patch
http://patchwork.ozlabs.org/patch/308941/ right above it.

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


Re: [U-Boot] [PATCH] armv8: Use __aarch64__ rather than CONFIG_ARM64 in some cases

2014-01-10 Thread Albert ARIBAUD
Hi Tom,

On Thu,  9 Jan 2014 15:11:27 -0500, Tom Rini tr...@ti.com wrote:

 The toolchain sets __aarch64__ for both LE and BE.  In the case of
 posix_types.h we cannot reliably use config.h as that will lead to
 problems.  In the case of byteorder.h it's clearer to check the EB flag
 being set in either case instead.

Amended according to Tom's instruction on IRC (actual removal of
config.h include in posix_types.h) then applied on top of the arm64
serie v16.

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


Re: [U-Boot] [PATCH v4 06/12] lib: tizen: change Tizen logo with the new one.

2014-01-10 Thread Hyungwon Hwang
Hi, Marczak

On Thu, 09 Jan 2014 12:23:10 +0100
Przemyslaw Marczak p.marc...@samsung.com wrote:

 This is big size patch. Please follow the link:
 
 http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0006-lib-tizen-change-Tizen-logo-with-the-new-one.patch
 

I tested it on M0 board, and the image shows center-aligned in high quality.
Thank you.

Best regards,
Hyungwon Hwang

Tested-by: Hyungwon Hwang human.hw...@samsung.com

-- 
Hyungwon Hwang
S/W Platform Team, Software Center
Samsung Electronics.
human.hw...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] arm: make 'MAKEALL -a' distinguish between arm and aarch64

2014-01-10 Thread Albert ARIBAUD
The vexpress_aemv8a is the first aarch64 board in U-Boot.
As it was introduced, it gets built when MAKEALL -a arm
is invoked, and fails as this command is run with a 32-bit,
not 64-bit, toolchain as the cross-compiler.

Introduce 'arch64' as a valid 'MAKEALL -a' argument, treated
as 'arm' for all other intents, and change the architecture
of the vexpress_aemv8a entry in boards.cfg from 'arm' to
'aarch64'.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
This patch must be applied above the arm64 series and Tom's (amended)
patch re config.h.

It has been tested and verified to:
- correctly exclude vexpress_aemv8a from MAKEALL -a arm
- correctly include only vexpress_aemv8a from MAKEALL -a aarch64
- correctly build vexpress_aemv8a from MAKEALL -a aarch64

 boards.cfg | 3 +--
 mkconfig   | 7 +++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index e168590..029553d 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -397,7 +397,7 @@ Active  arm pxa-   -
   vpac270
 Active  arm pxa-   icpdas  lp8x4x  
lp8x4x   -  

   Sergey Yanovich ynv...@gmail.com
 Active  arm pxa-   toradex -   
colibri_pxa270   -  

   Marek Vasut marek.va...@gmail.com
 Active  arm sa1100 -   -   -   
jornada  -  

   Kristoffer Ericson kristoffer.eric...@gmail.com
-Active  arm armv8  -   armltd  vexpress64  
vexpress_aemv8a  vexpress_aemv8a:ARM64  

   David Feng feng...@phytium.com.cn
+Active  aarch64 armv8  -   armltd  vexpress64  
vexpress_aemv8a  vexpress_aemv8a:ARM64  

   David Feng feng...@phytium.com.cn
 Active  avr32   at32ap at32ap700x  atmel   -   
atngw100 -  

   Haavard Skinnemoen haavard.skinnem...@atmel.com
 Active  avr32   at32ap at32ap700x  atmel   -   
atngw100mkii -  

   Andreas Bießmann andreas.de...@googlemail.com
 Active  avr32   at32ap at32ap700x  atmel   atstk1000   
atstk1002-  

   Haavard Skinnemoen haavard.skinnem...@atmel.com
@@ -1242,4 +1242,3 @@ Orphan  powerpc mpc8xx -   -  
 genietv
 Orphan  powerpc mpc8xx -   -   mbx8xx  
MBX  -  

   -
 Orphan  powerpc mpc8xx -   -   mbx8xx  
MBX860T  -  

   -
 Orphan  powerpc mpc8xx -   -   nx823   
NX823-  

   -
-
diff --git a/mkconfig b/mkconfig
index 40db991..b96c81f 100755
--- a/mkconfig
+++ b/mkconfig
@@ -85,6 +85,13 @@ if [ ${ARCH} -a ${ARCH} != ${arch} ]; then
exit 1
 fi
 
+#
+# Test above needed aarch64, now we need arm
+#
+if [ ${arch} = aarch64 ]; then
+   arch=arm
+fi
+
 if [ $options ] ; then
echo Configuring for ${BOARD_NAME} - Board: ${CONFIG_NAME}, Options: 
${options}
 else
-- 
1.8.3.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/12] Introduce Samsung misc file and LCD menu.

2014-01-10 Thread Przemyslaw Marczak

Hello Hyungwon,

On 01/10/2014 07:45 AM, Hyungwon Hwang wrote:

Hi Marczak,

On Thu, 09 Jan 2014 12:23:04 +0100
Przemyslaw Marczak p.marc...@samsung.com wrote:


This patch set includes changes required to:
- properly use of all gpios
- introduce common file for Samsung misc code
- keys support (PWR, VOL:UP,DOWN)
- console support on LCD
- 16bpp logo support
- introduce LCD menu on Samsung devices

Each version changes are described in each patch commit msg.

Przemyslaw Marczak (12):
   s5p: gpio: change gpio coding method for s5p gpio.
   trats2: Code cleanup.
   samsung: common: Add misc file and common function misc_init_r().
   samsung: misc: move display logo function to misc.c file.
   common: lcd.c: fix data abort exception when try to access bmp
header lib: tizen: change Tizen logo with the new one.
   video: exynos: fimd: add support for various display color modes
   samsung: boards: update display configs with 16bpp mode.
   samsung: misc: Add LCD download menu.
   Trats: add LCD download menu support
   trats2: add LCD download menu support
   universal: add LCD download menu support

  arch/arm/include/asm/arch-exynos/gpio.h  |  245 +-
  arch/arm/include/asm/arch-s5pc1xx/gpio.h |   47 +-
  board/samsung/common/Makefile|1 +
  board/samsung/common/misc.c  |  407 ++
  board/samsung/common/misc.h  |   18 +
  board/samsung/trats/trats.c  |5 +-
  board/samsung/trats2/trats2.c|   33 +-
  board/samsung/universal_c210/universal.c |6 +-
  common/lcd.c |   27 +-
  drivers/gpio/s5p_gpio.c  |   15 +-
  drivers/power/battery/bat_trats2.c   |2 +-
  drivers/video/exynos_fb.c|   28 -
  drivers/video/exynos_fimd.c  |   15 +-
  include/configs/s5p_goni.h   |4 +-
  include/configs/s5pc210_universal.h  |   41 +-
  include/configs/trats.h  |   33 +-
  include/configs/trats2.h |   31 +-
  include/lcd.h|2 +
  include/power/max77686_pmic.h|2 +
  include/power/pmic.h |1 -
  lib/tizen/tizen.c|   21 +-
  lib/tizen/tizen_hd_logo.h| 5057 ---
  lib/tizen/tizen_hd_logo_data.h   |   15 -
  lib/tizen/tizen_logo_16bpp.h |10025
++
lib/tizen/tizen_logo_16bpp_gzip.h|  727 +++ 25 files changed,
11437 insertions(+), 5371 deletions(-) create mode 100644
board/samsung/common/misc.c create mode 100644
board/samsung/common/misc.h delete mode 100644
lib/tizen/tizen_hd_logo.h delete mode 100644
lib/tizen/tizen_hd_logo_data.h create mode 100644
lib/tizen/tizen_logo_16bpp.h create mode 100644
lib/tizen/tizen_logo_16bpp_gzip.h



I downloaded the newest version of u-boot-samsung,
applied all patches you sent, build it, and
write it on M0 board.
Logo image doesn't appear.

On the console, I found the below error message.
Error: 16 bit/pixel mode, but BMP has 32 bit/pixel

Is there anything wrong I did? or should something
be changed in your code?

Thanks,
---
Hyungwon Hwang
Samsung SWC S/W Platform Team
Smasung Electronics
human.hw...@samsung.com



I assume that it was because you missed the big size patch, right?

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


Re: [U-Boot] [PATCH v4 06/12] lib: tizen: change Tizen logo with the new one.

2014-01-10 Thread Przemyslaw Marczak

Hi Hyungwon,

On 01/10/2014 10:26 AM, Hyungwon Hwang wrote:

Hi, Marczak

On Thu, 09 Jan 2014 12:23:10 +0100
Przemyslaw Marczak p.marc...@samsung.com wrote:


This is big size patch. Please follow the link:

http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0006-lib-tizen-change-Tizen-logo-with-the-new-one.patch



I tested it on M0 board, and the image shows center-aligned in high quality.
Thank you.

Best regards,
Hyungwon Hwang

Tested-by: Hyungwon Hwang human.hw...@samsung.com



Thank you for testing.

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


Re: [U-Boot] [PATCH v4 09/12] samsung: misc: Add LCD download menu.

2014-01-10 Thread Przemyslaw Marczak

Hello Minkyu,

On 01/10/2014 02:37 AM, Minkyu Kang wrote:

On 09/01/14 20:23, Przemyslaw Marczak wrote:

This simple LCD menu allows run one of download mode on device
without writing on console or for fast and easy upgrade.
This feature check user keys combination at boot:
- power key + volume up - download menu
- power key + volume down - thor mode (without menu)

New configs:
- CONFIG_LCD_MENU
- CONFIG_LCD_MENU_BOARD
which depends on: CONFIG_MISC_INIT_R

For proper effect this feature needs following definitions:

Power key:
- KEY_PWR_PMIC_NAME - (string) pmic which supports power key check

Register address:
- KEY_PWR_STATUS_REG
- KEY_PWR_INTERRUPT_REG

Register power key mask:
- KEY_PWR_STATUS_MASK
- KEY_PWR_INTERRUPT_MASK

Gpio numbers:
- KEY_PWR_INTERRUPT_MASK
- KEY_VOL_DOWN_GPIO

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com

---
Changes v2:
- remove keys.h  - definitions should be in boards headers
- add misc.h
- code cleanup
- extend commit msg by more informations

Changes v3:
- none

Changes v4:
- code cleanup in board/samsung/common/misc.c
- add command result check
- clear PWR button interrupt flag after command finish to prevent immediately
   mode exit in mode_leave_menu() function.
- introduce MODE_CMD_ARGC - max number of command arguments
- split array mode_cmd[] to mode_cmd[][] with separated arguments
- command support checking is now achieved without preprocessor ifdefs

  board/samsung/common/misc.c |  349 +++
  board/samsung/common/misc.h |   18 +++
  2 files changed, 367 insertions(+)
  create mode 100644 board/samsung/common/misc.h

diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 3a91d62..f29fca4 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -8,6 +8,350 @@
  #include common.h
  #include lcd.h
  #include libtizen.h
+#include errno.h
+#include version.h
+#include asm/sizes.h
+#include asm/arch/cpu.h
+#include asm/arch/gpio.h
+#include asm/gpio.h
+#include linux/input.h
+#include lcd.h
+#include libtizen.h


lcd.h, libtizen.h are duplicated.



Thanks, will be removed.


+#include power/pmic.h
+#include mmc.h
+#include misc.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_LCD_MENU
+static int power_key_pressed(u32 reg)
+{
+   struct pmic *pmic;
+   u32 status;
+   u32 mask;
+
+   pmic = pmic_get(KEY_PWR_PMIC_NAME);
+   if (!pmic) {
+   printf(%s: Not found\n, KEY_PWR_PMIC_NAME);
+   return 0;
+   }
+
+   if (pmic_probe(pmic))
+   return 0;
+
+   if (reg == KEY_PWR_STATUS_REG)
+   mask = KEY_PWR_STATUS_MASK;
+   else
+   mask = KEY_PWR_INTERRUPT_MASK;
+
+   if (pmic_reg_read(pmic, reg, status))
+   return 0;
+
+   return !!(status  mask);
+}
+
+static int key_pressed(int key)
+{
+   int value;
+
+   switch (key) {
+   case KEY_POWER:
+   value = power_key_pressed(KEY_PWR_INTERRUPT_REG);
+   break;
+   case KEY_VOLUMEUP:
+   value = !gpio_get_value(KEY_VOL_UP_GPIO);
+   break;
+   case KEY_VOLUMEDOWN:
+   value = !gpio_get_value(KEY_VOL_DOWN_GPIO);
+   break;
+   default:
+   value = 0;
+   break;
+   }
+
+   return value;
+}
+
+static int check_keys(void)
+{
+   int keys = 0;
+
+   if (key_pressed(KEY_POWER))
+   keys += KEY_POWER;
+   if (key_pressed(KEY_VOLUMEUP))
+   keys += KEY_VOLUMEUP;
+   if (key_pressed(KEY_VOLUMEDOWN))
+   keys += KEY_VOLUMEDOWN;
+
+   return keys;
+}
+
+/*
+ * 0 BOOT_MODE_INFO
+ * 1 BOOT_MODE_THOR
+ * 2 BOOT_MODE_UMS
+ * 3 BOOT_MODE_DFU
+ * 4 BOOT_MODE_EXIT
+ */
+static char *
+mode_name[BOOT_MODE_EXIT + 1] = {
+   DEVICE,
+   THOR,
+   UMS,
+   DFU,
+   EXIT
+};
+
+static char *
+mode_info[BOOT_MODE_EXIT + 1] = {
+   info,
+   downloader,
+   mass storage,
+   firmware update,
+   and run normal boot
+};
+
+#define MODE_CMD_ARGC  4
+
+static char *
+mode_cmd[BOOT_MODE_EXIT + 1][MODE_CMD_ARGC] = {
+   {, , , },
+   {thor, 0, mmc, 0},
+   {ums, 0, mmc, 0},
+   {dfu, 0, mmc, 0},
+   {, , , },
+};
+
+static void display_board_info(void)
+{


#ifdef CONFIG_GENERIC_MMC

+   struct mmc *mmc = find_mmc_device(0);

#endif


+   vidinfo_t *vid = panel_info;
+
+   lcd_position_cursor(4, 4);
+
+   lcd_printf(%s\n\t, U_BOOT_VERSION);
+   lcd_puts(\n\t\tBoard Info:\n);
+#ifdef CONFIG_SYS_BOARD
+   lcd_printf(\tBoard name: %s\n, CONFIG_SYS_BOARD);
+#endif
+#ifdef CONFIG_REVISION_TAG
+   lcd_printf(\tBoard rev: %u\n, get_board_rev());
+#endif
+   lcd_printf(\tDRAM banks: %u\n, CONFIG_NR_DRAM_BANKS);
+   lcd_printf(\tDRAM size: %u MB\n, gd-ram_size / SZ_1M);
+


#ifdef CONFIG_GENERIC_MMC

+   if (mmc) {
+   if (!mmc-capacity)
+   

Re: [U-Boot] [PATCH v4 09/12] samsung: misc: Add LCD download menu.

2014-01-10 Thread Minkyu Kang
On 10/01/14 18:37, Przemyslaw Marczak wrote:
 Hello Minkyu,
 
 On 01/10/2014 02:37 AM, Minkyu Kang wrote:
 On 09/01/14 20:23, Przemyslaw Marczak wrote:
 This simple LCD menu allows run one of download mode on device
 without writing on console or for fast and easy upgrade.
 This feature check user keys combination at boot:
 - power key + volume up - download menu
 - power key + volume down - thor mode (without menu)

 New configs:
 - CONFIG_LCD_MENU
 - CONFIG_LCD_MENU_BOARD
 which depends on: CONFIG_MISC_INIT_R

 For proper effect this feature needs following definitions:

 Power key:
 - KEY_PWR_PMIC_NAME - (string) pmic which supports power key check

 Register address:
 - KEY_PWR_STATUS_REG
 - KEY_PWR_INTERRUPT_REG

 Register power key mask:
 - KEY_PWR_STATUS_MASK
 - KEY_PWR_INTERRUPT_MASK

 Gpio numbers:
 - KEY_PWR_INTERRUPT_MASK
 - KEY_VOL_DOWN_GPIO

 Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com

 ---
 Changes v2:
 - remove keys.h  - definitions should be in boards headers
 - add misc.h
 - code cleanup
 - extend commit msg by more informations

 Changes v3:
 - none

 Changes v4:
 - code cleanup in board/samsung/common/misc.c
 - add command result check
 - clear PWR button interrupt flag after command finish to prevent 
 immediately
mode exit in mode_leave_menu() function.
 - introduce MODE_CMD_ARGC - max number of command arguments
 - split array mode_cmd[] to mode_cmd[][] with separated arguments
 - command support checking is now achieved without preprocessor ifdefs

   board/samsung/common/misc.c |  349 
 +++
   board/samsung/common/misc.h |   18 +++
   2 files changed, 367 insertions(+)
   create mode 100644 board/samsung/common/misc.h

 diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
 index 3a91d62..f29fca4 100644
 --- a/board/samsung/common/misc.c
 +++ b/board/samsung/common/misc.c
 @@ -8,6 +8,350 @@
   #include common.h
   #include lcd.h
   #include libtizen.h
 +#include errno.h
 +#include version.h
 +#include asm/sizes.h
 +#include asm/arch/cpu.h
 +#include asm/arch/gpio.h
 +#include asm/gpio.h
 +#include linux/input.h
 +#include lcd.h
 +#include libtizen.h

 lcd.h, libtizen.h are duplicated.

 
 Thanks, will be removed.
 
 +#include power/pmic.h
 +#include mmc.h
 +#include misc.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#ifdef CONFIG_LCD_MENU
 +static int power_key_pressed(u32 reg)
 +{
 +struct pmic *pmic;
 +u32 status;
 +u32 mask;
 +
 +pmic = pmic_get(KEY_PWR_PMIC_NAME);
 +if (!pmic) {
 +printf(%s: Not found\n, KEY_PWR_PMIC_NAME);
 +return 0;
 +}
 +
 +if (pmic_probe(pmic))
 +return 0;
 +
 +if (reg == KEY_PWR_STATUS_REG)
 +mask = KEY_PWR_STATUS_MASK;
 +else
 +mask = KEY_PWR_INTERRUPT_MASK;
 +
 +if (pmic_reg_read(pmic, reg, status))
 +return 0;
 +
 +return !!(status  mask);
 +}
 +
 +static int key_pressed(int key)
 +{
 +int value;
 +
 +switch (key) {
 +case KEY_POWER:
 +value = power_key_pressed(KEY_PWR_INTERRUPT_REG);
 +break;
 +case KEY_VOLUMEUP:
 +value = !gpio_get_value(KEY_VOL_UP_GPIO);
 +break;
 +case KEY_VOLUMEDOWN:
 +value = !gpio_get_value(KEY_VOL_DOWN_GPIO);
 +break;
 +default:
 +value = 0;
 +break;
 +}
 +
 +return value;
 +}
 +
 +static int check_keys(void)
 +{
 +int keys = 0;
 +
 +if (key_pressed(KEY_POWER))
 +keys += KEY_POWER;
 +if (key_pressed(KEY_VOLUMEUP))
 +keys += KEY_VOLUMEUP;
 +if (key_pressed(KEY_VOLUMEDOWN))
 +keys += KEY_VOLUMEDOWN;
 +
 +return keys;
 +}
 +
 +/*
 + * 0 BOOT_MODE_INFO
 + * 1 BOOT_MODE_THOR
 + * 2 BOOT_MODE_UMS
 + * 3 BOOT_MODE_DFU
 + * 4 BOOT_MODE_EXIT
 + */
 +static char *
 +mode_name[BOOT_MODE_EXIT + 1] = {
 +DEVICE,
 +THOR,
 +UMS,
 +DFU,
 +EXIT
 +};
 +
 +static char *
 +mode_info[BOOT_MODE_EXIT + 1] = {
 +info,
 +downloader,
 +mass storage,
 +firmware update,
 +and run normal boot
 +};
 +
 +#define MODE_CMD_ARGC4
 +
 +static char *
 +mode_cmd[BOOT_MODE_EXIT + 1][MODE_CMD_ARGC] = {
 +{, , , },
 +{thor, 0, mmc, 0},
 +{ums, 0, mmc, 0},
 +{dfu, 0, mmc, 0},
 +{, , , },
 +};
 +
 +static void display_board_info(void)
 +{

 #ifdef CONFIG_GENERIC_MMC

Did you check this comment also?

 +struct mmc *mmc = find_mmc_device(0);
 #endif

 +vidinfo_t *vid = panel_info;
 +
 +lcd_position_cursor(4, 4);
 +
 +lcd_printf(%s\n\t, U_BOOT_VERSION);
 +lcd_puts(\n\t\tBoard Info:\n);
 +#ifdef CONFIG_SYS_BOARD
 +lcd_printf(\tBoard name: %s\n, CONFIG_SYS_BOARD);
 +#endif
 +#ifdef CONFIG_REVISION_TAG
 +lcd_printf(\tBoard rev: %u\n, get_board_rev());
 +#endif
 +lcd_printf(\tDRAM banks: %u\n, CONFIG_NR_DRAM_BANKS);
 +lcd_printf(\tDRAM size: %u MB\n, gd-ram_size / SZ_1M);
 +

 #ifdef CONFIG_GENERIC_MMC

ditto.

 +if (mmc) {
 +if (!mmc-capacity)
 +mmc_init(mmc);
 

Re: [U-Boot] [PATCH v4 09/12] samsung: misc: Add LCD download menu.

2014-01-10 Thread Przemyslaw Marczak

On 01/10/2014 10:43 AM, Minkyu Kang wrote:

On 10/01/14 18:37, Przemyslaw Marczak wrote:

Hello Minkyu,

On 01/10/2014 02:37 AM, Minkyu Kang wrote:

On 09/01/14 20:23, Przemyslaw Marczak wrote:

This simple LCD menu allows run one of download mode on device
without writing on console or for fast and easy upgrade.
This feature check user keys combination at boot:
- power key + volume up - download menu
- power key + volume down - thor mode (without menu)

New configs:
- CONFIG_LCD_MENU
- CONFIG_LCD_MENU_BOARD
which depends on: CONFIG_MISC_INIT_R

For proper effect this feature needs following definitions:

Power key:
- KEY_PWR_PMIC_NAME - (string) pmic which supports power key check

Register address:
- KEY_PWR_STATUS_REG
- KEY_PWR_INTERRUPT_REG

Register power key mask:
- KEY_PWR_STATUS_MASK
- KEY_PWR_INTERRUPT_MASK

Gpio numbers:
- KEY_PWR_INTERRUPT_MASK
- KEY_VOL_DOWN_GPIO

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com

---
Changes v2:
- remove keys.h  - definitions should be in boards headers
- add misc.h
- code cleanup
- extend commit msg by more informations

Changes v3:
- none

Changes v4:
- code cleanup in board/samsung/common/misc.c
- add command result check
- clear PWR button interrupt flag after command finish to prevent immediately
mode exit in mode_leave_menu() function.
- introduce MODE_CMD_ARGC - max number of command arguments
- split array mode_cmd[] to mode_cmd[][] with separated arguments
- command support checking is now achieved without preprocessor ifdefs

   board/samsung/common/misc.c |  349 
+++
   board/samsung/common/misc.h |   18 +++
   2 files changed, 367 insertions(+)
   create mode 100644 board/samsung/common/misc.h

diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 3a91d62..f29fca4 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -8,6 +8,350 @@
   #include common.h
   #include lcd.h
   #include libtizen.h
+#include errno.h
+#include version.h
+#include asm/sizes.h
+#include asm/arch/cpu.h
+#include asm/arch/gpio.h
+#include asm/gpio.h
+#include linux/input.h
+#include lcd.h
+#include libtizen.h


lcd.h, libtizen.h are duplicated.



Thanks, will be removed.


+#include power/pmic.h
+#include mmc.h
+#include misc.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_LCD_MENU
+static int power_key_pressed(u32 reg)
+{
+struct pmic *pmic;
+u32 status;
+u32 mask;
+
+pmic = pmic_get(KEY_PWR_PMIC_NAME);
+if (!pmic) {
+printf(%s: Not found\n, KEY_PWR_PMIC_NAME);
+return 0;
+}
+
+if (pmic_probe(pmic))
+return 0;
+
+if (reg == KEY_PWR_STATUS_REG)
+mask = KEY_PWR_STATUS_MASK;
+else
+mask = KEY_PWR_INTERRUPT_MASK;
+
+if (pmic_reg_read(pmic, reg, status))
+return 0;
+
+return !!(status  mask);
+}
+
+static int key_pressed(int key)
+{
+int value;
+
+switch (key) {
+case KEY_POWER:
+value = power_key_pressed(KEY_PWR_INTERRUPT_REG);
+break;
+case KEY_VOLUMEUP:
+value = !gpio_get_value(KEY_VOL_UP_GPIO);
+break;
+case KEY_VOLUMEDOWN:
+value = !gpio_get_value(KEY_VOL_DOWN_GPIO);
+break;
+default:
+value = 0;
+break;
+}
+
+return value;
+}
+
+static int check_keys(void)
+{
+int keys = 0;
+
+if (key_pressed(KEY_POWER))
+keys += KEY_POWER;
+if (key_pressed(KEY_VOLUMEUP))
+keys += KEY_VOLUMEUP;
+if (key_pressed(KEY_VOLUMEDOWN))
+keys += KEY_VOLUMEDOWN;
+
+return keys;
+}
+
+/*
+ * 0 BOOT_MODE_INFO
+ * 1 BOOT_MODE_THOR
+ * 2 BOOT_MODE_UMS
+ * 3 BOOT_MODE_DFU
+ * 4 BOOT_MODE_EXIT
+ */
+static char *
+mode_name[BOOT_MODE_EXIT + 1] = {
+DEVICE,
+THOR,
+UMS,
+DFU,
+EXIT
+};
+
+static char *
+mode_info[BOOT_MODE_EXIT + 1] = {
+info,
+downloader,
+mass storage,
+firmware update,
+and run normal boot
+};
+
+#define MODE_CMD_ARGC4
+
+static char *
+mode_cmd[BOOT_MODE_EXIT + 1][MODE_CMD_ARGC] = {
+{, , , },
+{thor, 0, mmc, 0},
+{ums, 0, mmc, 0},
+{dfu, 0, mmc, 0},
+{, , , },
+};
+
+static void display_board_info(void)
+{


#ifdef CONFIG_GENERIC_MMC


Did you check this comment also?


+struct mmc *mmc = find_mmc_device(0);

#endif


+vidinfo_t *vid = panel_info;
+
+lcd_position_cursor(4, 4);
+
+lcd_printf(%s\n\t, U_BOOT_VERSION);
+lcd_puts(\n\t\tBoard Info:\n);
+#ifdef CONFIG_SYS_BOARD
+lcd_printf(\tBoard name: %s\n, CONFIG_SYS_BOARD);
+#endif
+#ifdef CONFIG_REVISION_TAG
+lcd_printf(\tBoard rev: %u\n, get_board_rev());
+#endif
+lcd_printf(\tDRAM banks: %u\n, CONFIG_NR_DRAM_BANKS);
+lcd_printf(\tDRAM size: %u MB\n, gd-ram_size / SZ_1M);
+


#ifdef CONFIG_GENERIC_MMC


ditto.



Yes, these will apply too.


+if (mmc) {
+if (!mmc-capacity)
+mmc_init(mmc);
+
+lcd_printf(\teMMC size: %llu MB\n, mmc-capacity / SZ_1M);
+}

#endif


+
+if (vid)
+ 

Re: [U-Boot] [PATCH] arm: make 'MAKEALL -a' distinguish between arm and aarch64

2014-01-10 Thread Wolfgang Denk
Dear Albert,

In message 1389346096-26870-1-git-send-email-albert.u.b...@aribaud.net you 
wrote:
 The vexpress_aemv8a is the first aarch64 board in U-Boot.
 As it was introduced, it gets built when MAKEALL -a arm
 is invoked, and fails as this command is run with a 32-bit,
 not 64-bit, toolchain as the cross-compiler.
 
 Introduce 'arch64' as a valid 'MAKEALL -a' argument, treated

I think this is a typo, and you mean 'aarch64' (double-'a') ?

[This can be fixed when applying the patch, me thinks.]

Best regards,

Wolfgang Denk

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


Re: [U-Boot] [PATCH] arm: make 'MAKEALL -a' distinguish between arm and aarch64

2014-01-10 Thread Albert ARIBAUD
Hi Wolfgang,

On Fri, 10 Jan 2014 12:49:27 +0100, Wolfgang Denk w...@denx.de wrote:

 Dear Albert,
 
 In message 1389346096-26870-1-git-send-email-albert.u.b...@aribaud.net you 
 wrote:
  The vexpress_aemv8a is the first aarch64 board in U-Boot.
  As it was introduced, it gets built when MAKEALL -a arm
  is invoked, and fails as this command is run with a 32-bit,
  not 64-bit, toolchain as the cross-compiler.
  
  Introduce 'arch64' as a valid 'MAKEALL -a' argument, treated
 
 I think this is a typo, and you mean 'aarch64' (double-'a') ?

Correct -- and the typo is not in the patch itself, phew. :)

 [This can be fixed when applying the patch, me thinks.]

Will do. Thanks for catching it.

 Best regards,
 
 Wolfgang Denk

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


[U-Boot] [U-Boot 3/3] spl: common: Support for USB MSD FAT image loading

2014-01-10 Thread Dan Murphy
Add SPL support to be able to detect a USB Mass Storage device
connected to a USB host.  Once a USB Mass storage device is detected
the SPL will load the u-boot.img from a FAT partition to target address.

Signed-off-by: Dan Murphy dmur...@ti.com
---
 arch/arm/include/asm/arch-am33xx/spl.h |   14 ++--
 common/Makefile|4 +++
 common/spl/Makefile|1 +
 common/spl/spl.c   |5 +++
 common/spl/spl_fat.c   |   16 -
 common/spl/spl_usb.c   |   58 
 include/spl.h  |3 ++
 spl/Makefile   |2 ++
 8 files changed, 92 insertions(+), 11 deletions(-)
 create mode 100644 common/spl/spl_usb.c

diff --git a/arch/arm/include/asm/arch-am33xx/spl.h 
b/arch/arm/include/asm/arch-am33xx/spl.h
index 95de9aa..cd1d88d 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -20,6 +20,7 @@
 #if defined(CONFIG_AM33XX) || defined(CONFIG_AM43XX)
 #define BOOT_DEVICE_MMC1   8
 #define BOOT_DEVICE_MMC2   9   /* eMMC or daughter card */
+#define BOOT_DEVICE_USB 13
 #elif defined(CONFIG_TI814X)
 #define BOOT_DEVICE_MMC1   9
 #define BOOT_DEVICE_MMC2   8   /* ROM only supports 2nd instance */
@@ -31,9 +32,16 @@
 #define BOOT_DEVICE_MMC2_2  0xFF
 #endif
 
-#if defined(CONFIG_AM33XX) || defined(CONFIG_AM43XX)
-#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
-#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
+#if defined(CONFIG_AM33XX)
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
+#elif defined(CONFIG_AM43XX)
+#define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
+#ifdef CONFIG_SPL_USB_SUPPORT
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_USB
+#else
+#define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2
+#endif
 #elif defined(CONFIG_TI81XX)
 #define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC2
 #define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC1
diff --git a/common/Makefile b/common/Makefile
index d12cba5..4d99ecd 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -197,6 +197,10 @@ obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
 obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
 obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
 obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
+ifdef CONFIG_SPL_USB_HOST_SUPPORT
+obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
+obj-$(CONFIG_USB_STORAGE) += usb_storage.o
+endif
 ifneq ($(CONFIG_SPL_NET_SUPPORT),y)
 obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
 obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
diff --git a/common/spl/Makefile b/common/spl/Makefile
index c8d5963..65a1484f 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -16,5 +16,6 @@ obj-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o
 obj-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
 obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
+obj-$(CONFIG_SPL_USB_SUPPORT) += spl_usb.o
 obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
 endif
diff --git a/common/spl/spl.c b/common/spl/spl.c
index da31457..0645cee 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -205,6 +205,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
spl_net_load_image(usb_ether);
break;
 #endif
+#ifdef CONFIG_SPL_USB_SUPPORT
+   case BOOT_DEVICE_USB:
+   spl_usb_load_image();
+   break;
+#endif
default:
debug(SPL: Un-supported Boot Device\n);
hang();
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 9b40584..1e532d5 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -28,7 +28,7 @@ static int spl_register_fat_device(block_dev_desc_t 
*block_dev, int partition)
err = fat_register_device(block_dev, partition);
if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   printf(spl: fat register err - %d\n, err);
+   printf(%s: fat register err - %d\n, __func__, err);
 #endif
hang();
}
@@ -46,7 +46,7 @@ int spl_load_image_fat(block_dev_desc_t *block_dev,
struct image_header *header;
 
err = spl_register_fat_device(block_dev, partition);
-   if (err = 0)
+   if (err)
goto end;
 
header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
@@ -63,8 +63,8 @@ int spl_load_image_fat(block_dev_desc_t *block_dev,
 end:
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
if (err = 0)
-   printf(spl: error reading image %s, err - %d\n,
-  filename, err);
+   printf(%s: error reading image %s, err - %d\n,
+  __func__, filename, err);
 #endif
 
return (err = 0);
@@ -76,15 +76,15 @@ int spl_load_image_fat_os(block_dev_desc_t *block_dev, int 
partition)
int err;
 
err = spl_register_fat_device(block_dev, partition);
-   if (err = 0)
-   return -1;
+ 

[U-Boot] [U-Boot 1/3] spl: common: Properly ignore spl/Makefile in .gitignore

2014-01-10 Thread Dan Murphy
The spl directory is ignored by git as these objects are created
during spl creation.  The only file not created is the Makefile.

This file can be modified and checked in via git.

Due to the order of rule precedence having the whole directory
ignored first then indicating not to ignore the Makefile is not correct
the message to force adding the Makefile is still shown.

So reorder the .gitignore for the Makefile and indicate that the Makefile
does not need to be ignored first and then indicate everything else in spl
should be ignored after wards.

Signed-off-by: Dan Murphy dmur...@ti.com
---
 .gitignore |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 3b14c25..7f006c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,8 +57,8 @@
 /errlog
 /reloc_off
 
-/spl/
 !/spl/Makefile
+/spl/*
 /tpl/
 
 /include/generated/
-- 
1.7.9.5

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


[U-Boot] [U-Boot 2/3] spl: common: Move FAT funcs to a common file

2014-01-10 Thread Dan Murphy
Move the FAT functions to a common location for reuse.

Signed-off-by: Dan Murphy dmur...@ti.com
---
 common/spl/Makefile  |1 +
 common/spl/spl_fat.c |   96 ++
 common/spl/spl_mmc.c |   68 ---
 include/spl.h|5 +++
 4 files changed, 108 insertions(+), 62 deletions(-)
 create mode 100644 common/spl/spl_fat.c

diff --git a/common/spl/Makefile b/common/spl/Makefile
index 5c0637b..c8d5963 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -16,4 +16,5 @@ obj-$(CONFIG_SPL_NAND_SUPPORT) += spl_nand.o
 obj-$(CONFIG_SPL_ONENAND_SUPPORT) += spl_onenand.o
 obj-$(CONFIG_SPL_NET_SUPPORT) += spl_net.o
 obj-$(CONFIG_SPL_MMC_SUPPORT) += spl_mmc.o
+obj-$(CONFIG_SPL_FAT_SUPPORT) += spl_fat.o
 endif
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
new file mode 100644
index 000..9b40584
--- /dev/null
+++ b/common/spl/spl_fat.c
@@ -0,0 +1,96 @@
+/*
+ * (C) Copyright 2014
+ * Texas Instruments, www.ti.com
+ *
+ * Dan Murphy dmur...@ti.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * FAT Image Functions copied from spl_mmc.c
+ */
+
+#include common.h
+#include spl.h
+#include asm/u-boot.h
+#include fat.h
+#include image.h
+
+static int fat_registered;
+
+#ifdef CONFIG_SPL_FAT_SUPPORT
+static int spl_register_fat_device(block_dev_desc_t *block_dev, int partition)
+{
+   int err = 0;
+
+   if (fat_registered)
+   return err;
+
+   err = fat_register_device(block_dev, partition);
+   if (err) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+   printf(spl: fat register err - %d\n, err);
+#endif
+   hang();
+   }
+
+   fat_registered = 1;
+
+   return err;
+}
+
+int spl_load_image_fat(block_dev_desc_t *block_dev,
+   int partition,
+   const char *filename)
+{
+   int err;
+   struct image_header *header;
+
+   err = spl_register_fat_device(block_dev, partition);
+   if (err = 0)
+   goto end;
+
+   header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
+   sizeof(struct image_header));
+
+   err = file_fat_read(filename, header, sizeof(struct image_header));
+   if (err = 0)
+   goto end;
+
+   spl_parse_image_header(header);
+
+   err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
+
+end:
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+   if (err = 0)
+   printf(spl: error reading image %s, err - %d\n,
+  filename, err);
+#endif
+
+   return (err = 0);
+}
+
+#ifdef CONFIG_SPL_OS_BOOT
+int spl_load_image_fat_os(block_dev_desc_t *block_dev, int partition)
+{
+   int err;
+
+   err = spl_register_fat_device(block_dev, partition);
+   if (err = 0)
+   return -1;
+
+   err = file_fat_read(CONFIG_SPL_FAT_LOAD_ARGS_NAME,
+   (void *)CONFIG_SYS_SPL_ARGS_ADDR, 0);
+   if (err = 0) {
+#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
+   printf(spl: error reading image %s, err - %d\n,
+  CONFIG_SPL_FAT_LOAD_ARGS_NAME, err);
+#endif
+   return -1;
+   }
+
+   return spl_load_image_fat(block_dev, partition,
+   CONFIG_SPL_FAT_LOAD_KERNEL_NAME);
+}
+#endif
+#endif
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index fc2f226..13fbff0 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -10,7 +10,6 @@
 #include spl.h
 #include asm/u-boot.h
 #include mmc.h
-#include fat.h
 #include version.h
 #include image.h
 
@@ -69,54 +68,6 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
 }
 #endif
 
-#ifdef CONFIG_SPL_FAT_SUPPORT
-static int mmc_load_image_fat(struct mmc *mmc, const char *filename)
-{
-   int err;
-   struct image_header *header;
-
-   header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
-   sizeof(struct image_header));
-
-   err = file_fat_read(filename, header, sizeof(struct image_header));
-   if (err = 0)
-   goto end;
-
-   spl_parse_image_header(header);
-
-   err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
-
-end:
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   if (err = 0)
-   printf(spl: error reading image %s, err - %d\n,
-  filename, err);
-#endif
-
-   return (err = 0);
-}
-
-#ifdef CONFIG_SPL_OS_BOOT
-static int mmc_load_image_fat_os(struct mmc *mmc)
-{
-   int err;
-
-   err = file_fat_read(CONFIG_SPL_FAT_LOAD_ARGS_NAME,
-   (void *)CONFIG_SYS_SPL_ARGS_ADDR, 0);
-   if (err = 0) {
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   printf(spl: error reading image %s, err - %d\n,
-  CONFIG_SPL_FAT_LOAD_ARGS_NAME, err);
-#endif
-   return -1;
-   }
-
-   return 

Re: [U-Boot] [PATCH] arm: make 'MAKEALL -a' distinguish between arm and aarch64

2014-01-10 Thread Gerhard Sittig
On Fri, Jan 10, 2014 at 10:28 +0100, Albert ARIBAUD wrote:
 
 The vexpress_aemv8a is the first aarch64 board in U-Boot.
 As it was introduced, it gets built when MAKEALL -a arm
 is invoked, and fails as this command is run with a 32-bit,
 not 64-bit, toolchain as the cross-compiler.
 
 Introduce 'arch64' as a valid 'MAKEALL -a' argument, treated
 as 'arm' for all other intents, and change the architecture
 of the vexpress_aemv8a entry in boards.cfg from 'arm' to
 'aarch64'.

s/arch64/aarch64/ at the first occurence in this paragraph?

 
 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 [ ... ]


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


Re: [U-Boot] [PATCH] arm: make 'MAKEALL -a' distinguish between arm and aarch64

2014-01-10 Thread Albert ARIBAUD
Hi Albert,

On Fri, 10 Jan 2014 10:28:16 +0100, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 The vexpress_aemv8a is the first aarch64 board in U-Boot.
 As it was introduced, it gets built when MAKEALL -a arm
 is invoked, and fails as this command is run with a 32-bit,
 not 64-bit, toolchain as the cross-compiler.
 
 Introduce 'arch64' as a valid 'MAKEALL -a' argument, treated
 as 'arm' for all other intents, and change the architecture
 of the vexpress_aemv8a entry in boards.cfg from 'arm' to
 'aarch64'.

Applied, with the typo found by Wolfgang fixed, to u-boot-arm/master.

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


Re: [U-Boot] [U-boot] Uboot's plan for ARMv8

2014-01-10 Thread Tom Rini
On Fri, Jan 10, 2014 at 11:02:43AM +0800, tiger...@viatech.com.cn wrote:

 Hi, experts:
 
 Does U-boot have any plan to support ARMv8 SOC?

I think the short answere here is that it's not quick to merge in brand
new arch support (it's more than just adding a new SoC family, it's
adding in a new processor family too) but we're on track to have ARMv8
support in the next release.  I would then expect that..

 Nvidia has decleared 64bit SOC plan.

... any nvidia ARMv8 platforms to come in via the u-boot-tegra tree and
other ARMv8 platforms to come in via their respective platforms (if
i.MX9000, which I just made up, is where Freescale does ARMv8, it can
still go via u-boot-imx as far as I'm concerned) unless that custodian
really wants someone else to own it.

-- 
Tom


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


Re: [U-Boot] [PATCH v4 32/37] Makefile: refactor tools-all targets

2014-01-10 Thread Gerhard Sittig
On Fri, Jan 10, 2014 at 15:44 +0900, Masahiro Yamada wrote:
 
  - Move easylogo, env, gdb tagets to tools/Makefile
  - Delete gdbtools target (same as gdb)

This appears to be an incompatible change with regards to how
users can compile these tools.  Please see tools/env/README and
update it as well.  I'm aware of external projects which grab a
U-Boot source tree and 'make env' to just get the fw_printenv(1)
binary.


There is another issue for those who do

  make HOSTCC=${CROSS_COMPILE}gcc env
  (needs a HOSTSTRIP spec as well in recent mainline sources)

to get an fw_printenv(1) binary that runs on the target (in
contrast to the build machine).  Some yocto recipes do this, to
not re-invent how to build this tool or how to read and write the
environment image.

With your changes, the 'env' make target is gone, instead there
is a 'tools-all' target but it has a wider scope, includes the
BMP manipulation/conversion stuff and uses HOSTCC to build a
bmp_logo(1) tool, which breaks in the mentioned use case (cross
compiled bmp_logo(1) executable, empty bmp_logo.h header, aborted
build sequence).

Can you please look into whether the sources in the tools/env/
directory can get compiled without involving other directories?
I tried 'make tools/env/', but this make dir/ syntax as known
from kernel builds appears to not be supported in U-Boot (yet? or
have I done something wrong?).  I did a quick hack and extended
the top level Makefile as outlined below (diff copied here with
the clipboard, whitespace will be broken, build tested but not
yet run tested, only checked file(1) output).

  --- a/Makefile
  +++ b/Makefile
  @@ -1124,6 +1124,9 @@ xmldocs pdfdocs psdocs htmldocs mandocs: 
tools/kernel-doc/docproc
   tools-all: $(VERSION_FILE) $(TIMESTAMP_FILE)
  $(Q)$(MAKE) $(build)=tools HOST_TOOLS_ALL=y
   
  +tools-env: $(VERSION_FILE) $(TIMESTAMP_FILE)
  +   $(Q)$(MAKE) $(build)=tools/env
  +
   .PHONY : CHANGELOG
   CHANGELOG:
  git log --no-merges U-Boot-1_1_5.. | \


While testing your series I noticed a probably missing
dependency:  Running something different from 'make all' (or make
without a target spec) after 'make board_config' won't work
since the fixdeps(1) tool is missing.  It's a byproduct of
'make all', afterwards other targets can get built separately.
Is there a preparation step that one needs to take if not
calling 'make all' immediately after configuration?


For the record:  My test was with your v4 series on top of
v2014.01-rc2-43-ge7be18225fbe plus your sandbox: Use system
headers first for sandbox's os.c in a different way change, with
ELDK 5.3 and a PowerPC target.

  $ . /opt/eldk-5.3-qte/powerpc/environment-setup-powerpc-linux
  $ env -u LDFLAGS ARCH=powerpc CROSS_COMPILE=$TARGET_PREFIX $SHELL

  $ mkdir output-ac14xx  cd $_
  $ make -C .. O=`pwd` ac14xx_config

  $ make HOSTCC=${CROSS_COMPILE}gcc tools/env/
  Nothing to be done ...
  $ make HOSTCC=${CROSS_COMPILE}gcc tools-all
HOSTCC  tools/easylogo/easylogo
  /bin/sh: 1: scripts/basic/fixdep: not found
  make[4]: *** [tools/easylogo/easylogo] Error 127
  make[3]: *** [tools/easylogo] Error 2
  make[2]: *** [tools-all] Error 2
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2
  $ make HOSTCC=${CROSS_COMPILE}gcc tools
CC  lib/asm-offsets.s
GEN include/generated/generic-asm-offsets.h
CC  /asm-offsets.s
  touch: cannot touch `/asm-offsets.s': Permission denied
  make[2]: *** [/asm-offsets.s] Error 1
  make[1]: *** [sub-make] Error 2
  make: *** [all] Error 2

  [ identical errors without the HOSTCC spec ]

  $ time make
  ...
  HOSTCC  scripts/basic/fixdep
  ...
  [ native tools/ gets built as well, but not tools/env/ it seems ]

  $ make HOSTCC=${CROSS_COMPILE}gcc tools-all
  ...
  tools/bmp_logo: 1: tools/bmp_logo: ELF: not found
  tools/bmp_logo: 2: tools/bmp_logo: Syntax error: ( unexpected
  ...

  $ $EDITOR ../Makefile
  $ make tools-all
  $ make HOSTCC=${CROSS_COMPILE}gcc tools-env
  $ file tools/env/fw_printenv
  tools/env/fw_printenv: ELF 32-bit MSB executable, PowerPC or cisco 4500 [ ... 
]


Let me say that I do appreciate the work that you spend to
provide us all with the comfort of Kbuild and real
out-of-source builds, and cleaned up build infrastructure for
improved maintenance, and future Kconfig support. :-]

I will report back after doing run time tests.


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


[U-Boot] [PATCH v5 01/12] s5p: gpio: change gpio coding method for s5p gpio.

2014-01-10 Thread Przemyslaw Marczak
Old s5p gpio coding method was not clean and was not working properly
for all parts and banks. New method is clean and easy to extend.

Gpio coding mask:
0x00ff - pin number
0x0000 - bank offset
0xff00 - part number

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
---
Changes v2:
- none

Changes v3:
- fix merge conflict in arch/arm/include/asm/arch-exynos/gpio.h
- add exynos5420 gpio coding
- update file: board/samsung/trats2/trats2.c

Changes v4:
- code cleanup

Changes v5:
- none

 arch/arm/include/asm/arch-exynos/gpio.h  |  245 +-
 arch/arm/include/asm/arch-s5pc1xx/gpio.h |   47 --
 board/samsung/trats2/trats2.c|8 +-
 drivers/gpio/s5p_gpio.c  |   15 +-
 include/configs/s5p_goni.h   |4 +-
 include/configs/s5pc210_universal.h  |   12 +-
 include/configs/trats.h  |4 +-
 7 files changed, 132 insertions(+), 203 deletions(-)

diff --git a/arch/arm/include/asm/arch-exynos/gpio.h 
b/arch/arm/include/asm/arch-exynos/gpio.h
index 2a19852..d6868fa 100644
--- a/arch/arm/include/asm/arch-exynos/gpio.h
+++ b/arch/arm/include/asm/arch-exynos/gpio.h
@@ -247,180 +247,81 @@ void s5p_gpio_set_rate(struct s5p_gpio_bank *bank, int 
gpio, int mode);
 
 /* GPIO pins per bank  */
 #define GPIO_PER_BANK 8
-
-#define exynos4_gpio_part1_get_nr(bank, pin) \
-   ((unsigned int) (((struct exynos4_gpio_part1 *) \
-  EXYNOS4_GPIO_PART1_BASE)-bank)) \
-   - EXYNOS4_GPIO_PART1_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin)
-
-#define EXYNOS4_GPIO_PART1_MAX ((sizeof(struct exynos4_gpio_part1) \
-   / sizeof(struct s5p_gpio_bank)) * GPIO_PER_BANK)
-
-#define exynos4_gpio_part2_get_nr(bank, pin) \
-   (((unsigned int) (((struct exynos4_gpio_part2 *) \
-   EXYNOS4_GPIO_PART2_BASE)-bank)) \
-   - EXYNOS4_GPIO_PART2_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin) + EXYNOS4_GPIO_PART1_MAX)
-
-#define exynos4x12_gpio_part1_get_nr(bank, pin) \
-   ((unsigned int) (((struct exynos4x12_gpio_part1 *) \
-  EXYNOS4X12_GPIO_PART1_BASE)-bank)) \
-   - EXYNOS4X12_GPIO_PART1_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin)
-
-#define EXYNOS4X12_GPIO_PART1_MAX ((sizeof(struct exynos4x12_gpio_part1) \
-   / sizeof(struct s5p_gpio_bank)) * GPIO_PER_BANK)
-
-#define exynos4x12_gpio_part2_get_nr(bank, pin) \
-   (((unsigned int) (((struct exynos4x12_gpio_part2 *) \
-   EXYNOS4X12_GPIO_PART2_BASE)-bank)) \
-   - EXYNOS4X12_GPIO_PART2_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin) + EXYNOS4X12_GPIO_PART1_MAX)
-
-#define EXYNOS4X12_GPIO_PART2_MAX ((sizeof(struct exynos4x12_gpio_part2) \
-   / sizeof(struct s5p_gpio_bank)) * GPIO_PER_BANK)
-
-#define exynos4x12_gpio_part3_get_nr(bank, pin) \
-   (((unsigned int) (((struct exynos4x12_gpio_part3 *) \
-   EXYNOS4X12_GPIO_PART3_BASE)-bank)) \
-   - EXYNOS4X12_GPIO_PART3_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin) + EXYNOS4X12_GPIO_PART2_MAX)
-
-#define exynos5_gpio_part1_get_nr(bank, pin) \
-   ((unsigned int) (((struct exynos5_gpio_part1 *) \
-  EXYNOS5_GPIO_PART1_BASE)-bank)) \
-   - EXYNOS5_GPIO_PART1_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin)
-
-#define EXYNOS5_GPIO_PART1_MAX ((sizeof(struct exynos5_gpio_part1) \
-   / sizeof(struct s5p_gpio_bank)) * GPIO_PER_BANK)
-
-#define exynos5_gpio_part2_get_nr(bank, pin) \
-   (((unsigned int) (((struct exynos5_gpio_part2 *) \
-   EXYNOS5_GPIO_PART2_BASE)-bank)) \
-   - EXYNOS5_GPIO_PART2_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin) + EXYNOS5_GPIO_PART1_MAX)
-
-#define EXYNOS5_GPIO_PART2_MAX ((sizeof(struct exynos5_gpio_part2) \
-   / sizeof(struct s5p_gpio_bank)) * GPIO_PER_BANK)
-
-#define exynos5_gpio_part3_get_nr(bank, pin) \
-   (((unsigned int) (((struct exynos5_gpio_part3 *) \
-   EXYNOS5_GPIO_PART3_BASE)-bank)) \
-   - EXYNOS5_GPIO_PART3_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin) + EXYNOS5_GPIO_PART2_MAX)
-
-
-/* EXYNOS5420 */
-#define exynos5420_gpio_part1_get_nr(bank, pin) \
-   ((unsigned int) (((struct exynos5420_gpio_part1 *)\
-  EXYNOS5420_GPIO_PART1_BASE)-bank)) \
-   - EXYNOS5420_GPIO_PART1_BASE) / sizeof(struct s5p_gpio_bank)) \
- * GPIO_PER_BANK) + pin)
-
-#define EXYNOS5420_GPIO_PART1_MAX ((sizeof(struct exynos5420_gpio_part1) \
-   / sizeof(struct s5p_gpio_bank)) * 

[U-Boot] [PATCH v5 07/12] video: exynos: fimd: add support for various display color modes

2014-01-10 Thread Przemyslaw Marczak
Now fimd BPP color mode depends on vl_bpp value in struct panel_info.

There is only 16BPP mode check, default mode is 24BPP.
Other fimd modes are usually unneeded and also needs some fimd driver
modifications and tests.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
---
Changes v2:
- check panel_info vl_bpix when setting fimd color mode
- move boards configs update to another commit.

Changes v3:
- none

Changes v4:
- none

Changes v5:
- none

 drivers/video/exynos_fimd.c |   15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index f962c4f..cebbba7 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -73,18 +73,19 @@ static void exynos_fimd_set_par(unsigned int win_id)
/* DATAPATH is DMA */
cfg |= EXYNOS_WINCON_DATAPATH_DMA;
 
-   if (pvid-logo_on) /* To get proprietary LOGO */
-   cfg |= EXYNOS_WINCON_WSWP_ENABLE;
-   else /* To get output console on LCD */
-   cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
+   cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
 
/* dma burst is 16 */
cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
 
-   if (pvid-logo_on) /* To get proprietary LOGO */
-   cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
-   else /* To get output console on LCD */
+   switch (pvid-vl_bpix) {
+   case 4:
cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
+   break;
+   default:
+   cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+   break;
+   }
 
writel(cfg, (unsigned int)fimd_ctrl-wincon0 +
EXYNOS_WINCON(win_id));
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 05/12] common: lcd.c: fix data abort exception when try to access bmp header

2014-01-10 Thread Przemyslaw Marczak
Changes:
- le16_to_cpu() to get_unaligned_le16()
- le32_to_cpu() to get_unaligned_le32()
when access fields in struct bmp header.

This changes avoids data abort exception caused by unaligned data access.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Acked-by: Anatolij Gustschin ag...@denx.de
---
Changes v2:
- new patch

Changes v3:
- common/Makefile - remove CFLAG: -mno-unaligned-access
- common/lcd.c - fix data abort exception when access bmp_header

Changes v4:
- add Acked-by

Changes v5:
- none

 common/lcd.c |   27 +--
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/common/lcd.c b/common/lcd.c
index 56bf067..aa81522 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -26,7 +26,7 @@
 #endif
 #include lcd.h
 #include watchdog.h
-
+#include asm/unaligned.h
 #include splash.h
 
 #if defined(CONFIG_CPU_PXA25X) || defined(CONFIG_CPU_PXA27X) || \
@@ -777,9 +777,9 @@ static void lcd_display_rle8_bitmap(bmp_image_t *bmp, 
ushort *cmap, uchar *fb,
int x, y;
int decode = 1;
 
-   width = le32_to_cpu(bmp-header.width);
-   height = le32_to_cpu(bmp-header.height);
-   bmap = (uchar *)bmp + le32_to_cpu(bmp-header.data_offset);
+   width = get_unaligned_le32(bmp-header.width);
+   height = get_unaligned_le32(bmp-header.height);
+   bmap = (uchar *)bmp + get_unaligned_le32(bmp-header.data_offset);
 
x = 0;
y = height - 1;
@@ -900,9 +900,10 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
return 1;
}
 
-   width = le32_to_cpu(bmp-header.width);
-   height = le32_to_cpu(bmp-header.height);
-   bmp_bpix = le16_to_cpu(bmp-header.bit_count);
+   width = get_unaligned_le32(bmp-header.width);
+   height = get_unaligned_le32(bmp-header.height);
+   bmp_bpix = get_unaligned_le16(bmp-header.bit_count);
+
colors = 1  bmp_bpix;
 
bpix = NBITS(panel_info.vl_bpix);
@@ -917,9 +918,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
/* We support displaying 8bpp BMPs on 16bpp LCDs */
if (bpix != bmp_bpix  !(bmp_bpix == 8  bpix == 16)) {
printf (Error: %d bit/pixel mode, but BMP has %d bit/pixel\n,
-   bpix,
-   le16_to_cpu(bmp-header.bit_count));
-
+   bpix, get_unaligned_le16(bmp-header.bit_count));
return 1;
}
 
@@ -956,7 +955,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
}
}
 #endif
-
/*
 *  BMP format for Monochrome assumes that the state of a
 * pixel is described on a per Bit basis, not per Byte.
@@ -987,15 +985,16 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
if ((y + height)  panel_info.vl_row)
height = panel_info.vl_row - y;
 
-   bmap = (uchar *) bmp + le32_to_cpu(bmp-header.data_offset);
-   fb   = (uchar *) (lcd_base +
+   bmap = (uchar *)bmp + get_unaligned_le32(bmp-header.data_offset);
+   fb   = (uchar *)(lcd_base +
(y + height - 1) * lcd_line_length + x * bpix / 8);
 
switch (bmp_bpix) {
case 1: /* pass through */
case 8:
 #ifdef CONFIG_LCD_BMP_RLE8
-   if (le32_to_cpu(bmp-header.compression) == BMP_BI_RLE8) {
+   u32 compression = get_unaligned_le32(bmp-header.compression);
+   if (compression == BMP_BI_RLE8) {
if (bpix != 16) {
/* TODO implement render code for bpix != 16 */
printf(Error: only support 16 bpix);
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 03/12] samsung: common: Add misc file and common function misc_init_r().

2014-01-10 Thread Przemyslaw Marczak
Config: CONFIG_MISC_INIT_R enables implementation of misc_init_r()
in common file::
- board/samsung/common/misc.c

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
---
Changes v2:
- change CONFIG_SAMSUNG to CONFIG_MISC_INIT_R

Changes v3:
- fix merge conflict in board/samsung/common/Makefile

Changes v4:
- none

Changes v5:
- add acked-by

 board/samsung/common/Makefile |1 +
 board/samsung/common/misc.c   |   14 ++
 2 files changed, 15 insertions(+)
 create mode 100644 board/samsung/common/misc.c

diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
index 22bd6b1..79547a3 100644
--- a/board/samsung/common/Makefile
+++ b/board/samsung/common/Makefile
@@ -8,6 +8,7 @@
 obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
 obj-$(CONFIG_THOR_FUNCTION) += thor.o
 obj-$(CONFIG_CMD_USB_MASS_STORAGE) += ums.o
+obj-$(CONFIG_MISC_INIT_R) += misc.o
 
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_BOARD_COMMON) += board.o
diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
new file mode 100644
index 000..3764d12
--- /dev/null
+++ b/board/samsung/common/misc.c
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2013 Samsung Electronics
+ * Przemyslaw Marczak p.marc...@samsung.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+
+/* Common for Samsung boards */
+int misc_init_r(void)
+{
+   return 0;
+}
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 12/12] universal: add LCD download menu support

2014-01-10 Thread Przemyslaw Marczak
Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
---
changes v2:
- add definitions for check keys
- cleanup config definitions

Changes v3:
- remove CONFIG_BOARD_NAME from include/configs/5pc210_universal.h

Changes v4:
- none

Changes v5:
- none

 include/configs/s5pc210_universal.h |   22 ++
 1 file changed, 22 insertions(+)

diff --git a/include/configs/s5pc210_universal.h 
b/include/configs/s5pc210_universal.h
index 4079b7c..ec8f991 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -272,6 +272,28 @@ int universal_spi_read(void);
 /* Common misc for Samsung */
 #define CONFIG_MISC_INIT_R
 
+/* Download menu - Samsung common */
+#define CONFIG_LCD_MENU
+#define CONFIG_LCD_MENU_BOARD
+
+/* Download menu - definitions for check keys */
+#ifndef __ASSEMBLY__
+#include power/max8998_pmic.h
+
+#define KEY_PWR_PMIC_NAME  MAX8998_PMIC
+#define KEY_PWR_STATUS_REG MAX8998_REG_STATUS1
+#define KEY_PWR_STATUS_MASK(1  7)
+#define KEY_PWR_INTERRUPT_REG  MAX8998_REG_IRQ1
+#define KEY_PWR_INTERRUPT_MASK (1  7)
+
+#define KEY_VOL_UP_GPIOexynos4_gpio_get(2, x2, 0)
+#define KEY_VOL_DOWN_GPIO  exynos4_gpio_get(2, x2, 1)
+#endif /* __ASSEMBLY__ */
+
+/* LCD console */
+#define LCD_BPPLCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+
 /*
  * LCD Settings
  */
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 06/12] lib: tizen: change Tizen logo with the new one.

2014-01-10 Thread Przemyslaw Marczak
This is big size patch. PLease follow the link:
http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0006-lib-tizen-change-Tizen-logo.patch

-- 
1.7.9.5

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


[U-Boot] [PATCH v5 04/12] samsung: misc: move display logo function to misc.c file.

2014-01-10 Thread Przemyslaw Marczak
board/samsung/common/misc.c:
- move draw_logo() function from exynos_fb.c
- add get_tizen_logo_info() function call removed from board files

boards:
- update board files
- add CONFIG_MISC_INIT_R to Universal, Trats and Trats2

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Tested-by: Hyungwon Hwang human.hw...@samsung.com
---
changes v2:
- configs cleanup
- add check logo address before display

Changes v3:
- none

Changes v4:
- none

Changes v5:
- none

 board/samsung/common/misc.c  |   42 ++
 board/samsung/trats/trats.c  |3 ---
 board/samsung/trats2/trats2.c|4 ---
 board/samsung/universal_c210/universal.c |4 ---
 drivers/video/exynos_fb.c|   28 
 include/configs/s5pc210_universal.h  |3 +++
 include/configs/trats.h  |3 +++
 include/configs/trats2.h |3 +++
 8 files changed, 51 insertions(+), 39 deletions(-)

diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 3764d12..6188e29 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -6,9 +6,51 @@
  */
 
 #include common.h
+#include lcd.h
+#include libtizen.h
+
+#ifdef CONFIG_CMD_BMP
+static void draw_logo(void)
+{
+   int x, y;
+   ulong addr;
+
+#ifdef CONFIG_TIZEN
+   get_tizen_logo_info(panel_info);
+#else
+   return;
+#endif
+
+   addr = panel_info.logo_addr;
+   if (!addr) {
+   error(There is no logo data.);
+   return;
+   }
+
+   if (panel_info.vl_width = panel_info.logo_width) {
+   x = ((panel_info.vl_width - panel_info.logo_width)  1);
+   } else {
+   x = 0;
+   printf(Warning: image width is bigger than display width\n);
+   }
+
+   if (panel_info.vl_height = panel_info.logo_height) {
+   y = ((panel_info.vl_height - panel_info.logo_height)  1);
+   } else {
+   y = 0;
+   printf(Warning: image height is bigger than display height\n);
+   }
+
+   bmp_display(addr, x, y);
+}
+#endif /* CONFIG_CMD_BMP */
 
 /* Common for Samsung boards */
 int misc_init_r(void)
 {
+#ifdef CONFIG_CMD_BMP
+   if (panel_info.logo_on)
+   draw_logo();
+#endif
return 0;
 }
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 640a193..cd27f18 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -770,9 +770,6 @@ void init_panel_info(vidinfo_t *vid)
vid-resolution = HD_RESOLUTION,
vid-rgb_mode   = MODE_RGB_P,
 
-#ifdef CONFIG_TIZEN
-   get_tizen_logo_info(vid);
-#endif
mipi_lcd_device.reverse_panel = 1;
 
strcpy(s6e8ax0_platform_data.lcd_panel_name, mipi_lcd_device.name);
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index b4ccf51..9a2c212 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -596,10 +596,6 @@ void init_panel_info(vidinfo_t *vid)
 
mipi_lcd_device.reverse_panel = 1;
 
-#ifdef CONFIG_TIZEN
-   get_tizen_logo_info(vid);
-#endif
-
strcpy(dsim_platform_data.lcd_panel_name, mipi_lcd_device.name);
dsim_platform_data.mipi_power = mipi_power;
dsim_platform_data.phy_enable = set_mipi_phy_ctrl;
diff --git a/board/samsung/universal_c210/universal.c 
b/board/samsung/universal_c210/universal.c
index 54d0e1e..166d5ee 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -484,10 +484,6 @@ void init_panel_info(vidinfo_t *vid)
vid-resolution = HD_RESOLUTION;
vid-rgb_mode   = MODE_RGB_P;
 
-#ifdef CONFIG_TIZEN
-   get_tizen_logo_info(vid);
-#endif
-
/* for LD9040. */
vid-pclk_name = 1; /* MPLL */
vid-sclk_div = 1;
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 7d4c6e0..00a0a11 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -62,31 +62,6 @@ static void exynos_lcd_init(vidinfo_t *vid)
lcd_set_flush_dcache(1);
 }
 
-#ifdef CONFIG_CMD_BMP
-static void draw_logo(void)
-{
-   int x, y;
-   ulong addr;
-
-   if (panel_width = panel_info.logo_width) {
-   x = ((panel_width - panel_info.logo_width)  1);
-   } else {
-   x = 0;
-   printf(Warning: image width is bigger than display width\n);
-   }
-
-   if (panel_height = panel_info.logo_height) {
-   y = ((panel_height - panel_info.logo_height)  1) - 4;
-   } else {
-   y = 0;
-   printf(Warning: image height is bigger than display height\n);
-   }
-
-   addr = panel_info.logo_addr;
-   bmp_display(addr, x, y);
-}
-#endif
-
 void __exynos_cfg_lcd_gpio(void)
 {
 }
@@ -323,9 +298,6 @@ void lcd_enable(void)
if (panel_info.logo_on) {
memset((void *) gd-fb_base, 0, panel_width * 

[U-Boot] [PATCH v5 02/12] trats2: Code cleanup.

2014-01-10 Thread Przemyslaw Marczak
Remove wrong and unused env variables
Trats2 is not as GT-I8800.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Acked-by: Jaehoon Chung jh80.ch...@samsung.com
Cc: Piotr Wilczek p.wilc...@samsung.com
---
Changes v2:
- none

Changes v3:
- none

Changes v4:
- add include pmic.h to max77686_pmic.h

Changes v5:
- add acked-by

 board/samsung/trats2/trats2.c  |   19 ++-
 drivers/power/battery/bat_trats2.c |2 +-
 include/configs/trats2.h   |1 -
 include/power/max77686_pmic.h  |2 ++
 4 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 1e96fdc..b4ccf51 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -72,15 +72,12 @@ static void check_hw_revision(void)
 int checkboard(void)
 {
puts(Board:\tTRATS2\n);
+   printf(HW Revision:\t0x%04x\n, board_rev);
+
return 0;
 }
 #endif
 
-static void show_hw_revision(void)
-{
-   printf(HW Revision:\t0x%04x\n, board_rev);
-}
-
 u32 get_board_rev(void)
 {
return board_rev;
@@ -614,15 +611,3 @@ void init_panel_info(vidinfo_t *vid)
exynos_set_dsim_platform_data(dsim_platform_data);
 }
 #endif /* LCD */
-
-#ifdef CONFIG_MISC_INIT_R
-int misc_init_r(void)
-{
-   setenv(model, GT-I8800);
-   setenv(board, TRATS2);
-
-   show_hw_revision();
-
-   return 0;
-}
-#endif
diff --git a/drivers/power/battery/bat_trats2.c 
b/drivers/power/battery/bat_trats2.c
index f264832..94015aa 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -8,7 +8,7 @@
 #include common.h
 #include power/pmic.h
 #include power/battery.h
-#include power/max8997_pmic.h
+#include power/max77693_pmic.h
 #include errno.h
 
 static struct battery battery_trats;
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index c9ce828..7dfbe98 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -272,7 +272,6 @@
 #define CONFIG_EFI_PARTITION
 #define CONFIG_PARTITION_UUIDS
 
-#define CONFIG_MISC_INIT_R
 #define CONFIG_BOARD_EARLY_INIT_F
 
 /* I2C */
diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
index 16e9016..c2a772a 100644
--- a/include/power/max77686_pmic.h
+++ b/include/power/max77686_pmic.h
@@ -8,6 +8,8 @@
 #ifndef __MAX77686_H_
 #define __MAX77686_H_
 
+#include power/pmic.h
+
 enum {
MAX77686_REG_PMIC_ID= 0x0,
MAX77686_REG_PMIC_INTSRC,
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 09/12] samsung: misc: Add LCD download menu.

2014-01-10 Thread Przemyslaw Marczak
This simple LCD menu allows run one of download mode on device
without writing on console or for fast and easy upgrade.
This feature check user keys combination at boot:
- power key + volume up - download menu
- power key + volume down - thor mode (without menu)

New configs:
- CONFIG_LCD_MENU
- CONFIG_LCD_MENU_BOARD
which depends on: CONFIG_MISC_INIT_R

For proper effect this feature needs following definitions:

Power key:
- KEY_PWR_PMIC_NAME - (string) pmic which supports power key check

Register address:
- KEY_PWR_STATUS_REG
- KEY_PWR_INTERRUPT_REG

Register power key mask:
- KEY_PWR_STATUS_MASK
- KEY_PWR_INTERRUPT_MASK

Gpio numbers:
- KEY_PWR_INTERRUPT_MASK
- KEY_VOL_DOWN_GPIO

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com

---
Changes v2:
- remove keys.h  - definitions should be in boards headers
- add misc.h
- code cleanup
- extend commit msg by more informations

Changes v3:
- none

Changes v4:
- code cleanup in board/samsung/common/misc.c
- add command result check
- clear PWR button interrupt flag after command finish to prevent immediately
  mode exit in mode_leave_menu() function.
- introduce MODE_CMD_ARGC - max number of command arguments
- split array mode_cmd[] to mode_cmd[][] with separated arguments
- command support checking is now achieved without preprocessor ifdefs

Changes v5:
- remove duplicated headers
- add #ifdef CONFIG_GENERIC_MMC
- change udelay to mdelay

 board/samsung/common/misc.c |  350 +++
 board/samsung/common/misc.h |   18 +++
 2 files changed, 368 insertions(+)
 create mode 100644 board/samsung/common/misc.h

diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c
index 3a91d62..c481928 100644
--- a/board/samsung/common/misc.c
+++ b/board/samsung/common/misc.c
@@ -8,6 +8,351 @@
 #include common.h
 #include lcd.h
 #include libtizen.h
+#include errno.h
+#include version.h
+#include asm/sizes.h
+#include asm/arch/cpu.h
+#include asm/arch/gpio.h
+#include asm/gpio.h
+#include linux/input.h
+#include power/pmic.h
+#include mmc.h
+#include misc.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_LCD_MENU
+static int power_key_pressed(u32 reg)
+{
+   struct pmic *pmic;
+   u32 status;
+   u32 mask;
+
+   pmic = pmic_get(KEY_PWR_PMIC_NAME);
+   if (!pmic) {
+   printf(%s: Not found\n, KEY_PWR_PMIC_NAME);
+   return 0;
+   }
+
+   if (pmic_probe(pmic))
+   return 0;
+
+   if (reg == KEY_PWR_STATUS_REG)
+   mask = KEY_PWR_STATUS_MASK;
+   else
+   mask = KEY_PWR_INTERRUPT_MASK;
+
+   if (pmic_reg_read(pmic, reg, status))
+   return 0;
+
+   return !!(status  mask);
+}
+
+static int key_pressed(int key)
+{
+   int value;
+
+   switch (key) {
+   case KEY_POWER:
+   value = power_key_pressed(KEY_PWR_INTERRUPT_REG);
+   break;
+   case KEY_VOLUMEUP:
+   value = !gpio_get_value(KEY_VOL_UP_GPIO);
+   break;
+   case KEY_VOLUMEDOWN:
+   value = !gpio_get_value(KEY_VOL_DOWN_GPIO);
+   break;
+   default:
+   value = 0;
+   break;
+   }
+
+   return value;
+}
+
+static int check_keys(void)
+{
+   int keys = 0;
+
+   if (key_pressed(KEY_POWER))
+   keys += KEY_POWER;
+   if (key_pressed(KEY_VOLUMEUP))
+   keys += KEY_VOLUMEUP;
+   if (key_pressed(KEY_VOLUMEDOWN))
+   keys += KEY_VOLUMEDOWN;
+
+   return keys;
+}
+
+/*
+ * 0 BOOT_MODE_INFO
+ * 1 BOOT_MODE_THOR
+ * 2 BOOT_MODE_UMS
+ * 3 BOOT_MODE_DFU
+ * 4 BOOT_MODE_EXIT
+ */
+static char *
+mode_name[BOOT_MODE_EXIT + 1] = {
+   DEVICE,
+   THOR,
+   UMS,
+   DFU,
+   EXIT
+};
+
+static char *
+mode_info[BOOT_MODE_EXIT + 1] = {
+   info,
+   downloader,
+   mass storage,
+   firmware update,
+   and run normal boot
+};
+
+#define MODE_CMD_ARGC  4
+
+static char *
+mode_cmd[BOOT_MODE_EXIT + 1][MODE_CMD_ARGC] = {
+   {, , , },
+   {thor, 0, mmc, 0},
+   {ums, 0, mmc, 0},
+   {dfu, 0, mmc, 0},
+   {, , , },
+};
+
+static void display_board_info(void)
+{
+#ifdef CONFIG_GENERIC_MMC
+   struct mmc *mmc = find_mmc_device(0);
+#endif
+   vidinfo_t *vid = panel_info;
+
+   lcd_position_cursor(4, 4);
+
+   lcd_printf(%s\n\t, U_BOOT_VERSION);
+   lcd_puts(\n\t\tBoard Info:\n);
+#ifdef CONFIG_SYS_BOARD
+   lcd_printf(\tBoard name: %s\n, CONFIG_SYS_BOARD);
+#endif
+#ifdef CONFIG_REVISION_TAG
+   lcd_printf(\tBoard rev: %u\n, get_board_rev());
+#endif
+   lcd_printf(\tDRAM banks: %u\n, CONFIG_NR_DRAM_BANKS);
+   lcd_printf(\tDRAM size: %u MB\n, gd-ram_size / SZ_1M);
+
+#ifdef CONFIG_GENERIC_MMC
+   if (mmc) {
+   if (!mmc-capacity)
+   mmc_init(mmc);
+
+   lcd_printf(\teMMC size: %llu MB\n, mmc-capacity / SZ_1M);
+   }
+#endif
+   if (vid)
+ 

[U-Boot] [PATCH v5 08/12] samsung: boards: update display configs with 16bpp mode.

2014-01-10 Thread Przemyslaw Marczak
16 bpp mode is required by LCD console mode.
This change updates exynos board files.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
---
Changes v2:
-- new patch

Changes v3:
- none

Changes v4:
- none

Changes v5:
- none

 board/samsung/trats/trats.c  |2 +-
 board/samsung/trats2/trats2.c|2 +-
 board/samsung/universal_c210/universal.c |2 +-
 include/configs/s5pc210_universal.h  |2 +-
 include/configs/trats.h  |2 +-
 include/configs/trats2.h |2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index cd27f18..a849b73 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -742,7 +742,7 @@ vidinfo_t panel_info = {
.vl_hsp = CONFIG_SYS_LOW,
.vl_vsp = CONFIG_SYS_LOW,
.vl_dp  = CONFIG_SYS_LOW,
-   .vl_bpix= 5,/* Bits per pixel, 2^5 = 32 */
+   .vl_bpix= 4,/* Bits per pixel, 2^4 = 16 */
 
/* s6e8ax0 Panel infomation */
.vl_hspw= 5,
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 9a2c212..bae8d6c 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -565,7 +565,7 @@ vidinfo_t panel_info = {
.vl_hsp = CONFIG_SYS_LOW,
.vl_vsp = CONFIG_SYS_LOW,
.vl_dp  = CONFIG_SYS_LOW,
-   .vl_bpix= 5,/* Bits per pixel, 2^5 = 32 */
+   .vl_bpix= 4,/* Bits per pixel, 2^4 = 16 */
 
/* s6e8ax0 Panel infomation */
.vl_hspw= 5,
diff --git a/board/samsung/universal_c210/universal.c 
b/board/samsung/universal_c210/universal.c
index 166d5ee..1ebea0f 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -446,7 +446,7 @@ vidinfo_t panel_info = {
.vl_vsp = CONFIG_SYS_HIGH,
.vl_dp  = CONFIG_SYS_HIGH,
 
-   .vl_bpix= 5,/* Bits per pixel */
+   .vl_bpix= 4,/* Bits per pixel */
 
/* LD9040 LCD Panel */
.vl_hspw= 2,
diff --git a/include/configs/s5pc210_universal.h 
b/include/configs/s5pc210_universal.h
index 3c0a974..4079b7c 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -278,7 +278,7 @@ int universal_spi_read(void);
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
 #define CONFIG_CMD_BMP
-#define CONFIG_BMP_32BPP
+#define CONFIG_BMP_16BPP
 #define CONFIG_LD9040
 #define CONFIG_EXYNOS_MIPI_DSIM
 #define CONFIG_VIDEO_BMP_GZIP
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 9a7dea1..79f9168 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -308,7 +308,7 @@
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
 #define CONFIG_CMD_BMP
-#define CONFIG_BMP_32BPP
+#define CONFIG_BMP_16BPP
 #define CONFIG_FB_ADDR 0x52504000
 #define CONFIG_S6E8AX0
 #define CONFIG_EXYNOS_MIPI_DSIM
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 8c7c6bd..740ceb1 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -319,7 +319,7 @@ int get_soft_i2c_sda_pin(void);
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
 #define CONFIG_CMD_BMP
-#define CONFIG_BMP_32BPP
+#define CONFIG_BMP_16BPP
 #define CONFIG_FB_ADDR 0x52504000
 #define CONFIG_S6E8AX0
 #define CONFIG_EXYNOS_MIPI_DSIM
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 10/12] Trats: add LCD download menu support

2014-01-10 Thread Przemyslaw Marczak
Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Acked-by: Lukasz Majewski l.majew...@samsung.com

---
changes v2:
- add definitions to check keys
- cleanup config definitions
- add acked-by

Changes v3:
- remove CONFIG_BOARD_NAME from include/configs/trats.h

Changes v4:
- none

Changes v5:
- none

 include/configs/trats.h |   22 ++
 1 file changed, 22 insertions(+)

diff --git a/include/configs/trats.h b/include/configs/trats.h
index 79f9168..2979df5 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -304,6 +304,28 @@
 /* Common misc for Samsung */
 #define CONFIG_MISC_INIT_R
 
+/* Download menu - Samsung common */
+#define CONFIG_LCD_MENU
+#define CONFIG_LCD_MENU_BOARD
+
+/* Download menu - definitions for check keys */
+#ifndef __ASSEMBLY__
+#include power/max8997_pmic.h
+
+#define KEY_PWR_PMIC_NAME  MAX8997_PMIC
+#define KEY_PWR_STATUS_REG MAX8997_REG_STATUS1
+#define KEY_PWR_STATUS_MASK(1  0)
+#define KEY_PWR_INTERRUPT_REG  MAX8997_REG_INT1
+#define KEY_PWR_INTERRUPT_MASK (1  0)
+
+#define KEY_VOL_UP_GPIOexynos4_gpio_get(2, x2, 0)
+#define KEY_VOL_DOWN_GPIO  exynos4_gpio_get(2, x2, 1)
+#endif /* __ASSEMBLY__ */
+
+/* LCD console */
+#define LCD_BPPLCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+
 /* LCD */
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 11/12] trats2: add LCD download menu support

2014-01-10 Thread Przemyslaw Marczak
Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
---
changes v2:
- add definitions for check keys
- cleanup config definitions

Changes v3:
- remove CONFIG_BOARD_NAME from include/configs/trats2.h

Changes v4:
- remove include of pmic.h from trats2.h
- remove include of common.h from pmic.h

Changes v5:
- none

 include/configs/trats2.h |   23 +++
 include/power/pmic.h |1 -
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index 740ceb1..59a2ad6 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -19,6 +19,7 @@
 #define CONFIG_S5P /* which is in a S5P Family */
 #define CONFIG_EXYNOS4 /* which is in a EXYNOS4XXX */
 #define CONFIG_TIZEN   /* TIZEN lib */
+#define CONFIG_TRATS2
 
 #include asm/arch/cpu.h  /* get chip and board defs */
 
@@ -315,6 +316,28 @@ int get_soft_i2c_sda_pin(void);
 /* Common misc for Samsung */
 #define CONFIG_MISC_INIT_R
 
+/* Download menu - Samsung common */
+#define CONFIG_LCD_MENU
+#define CONFIG_LCD_MENU_BOARD
+
+/* Download menu - definitions for check keys */
+#ifndef __ASSEMBLY__
+#include power/max77686_pmic.h
+
+#define KEY_PWR_PMIC_NAME  MAX77686_PMIC
+#define KEY_PWR_STATUS_REG MAX77686_REG_PMIC_STATUS1
+#define KEY_PWR_STATUS_MASK(1  0)
+#define KEY_PWR_INTERRUPT_REG  MAX77686_REG_PMIC_INT1
+#define KEY_PWR_INTERRUPT_MASK (1  1)
+
+#define KEY_VOL_UP_GPIOexynos4x12_gpio_get(2, x2, 2)
+#define KEY_VOL_DOWN_GPIO  exynos4x12_gpio_get(2, x3, 3)
+#endif /* __ASSEMBLY__ */
+
+/* LCD console */
+#define LCD_BPP LCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+
 /* LCD */
 #define CONFIG_EXYNOS_FB
 #define CONFIG_LCD
diff --git a/include/power/pmic.h b/include/power/pmic.h
index 0e7aa31..8f282dd 100644
--- a/include/power/pmic.h
+++ b/include/power/pmic.h
@@ -8,7 +8,6 @@
 #ifndef __CORE_PMIC_H_
 #define __CORE_PMIC_H_
 
-#include common.h
 #include linux/list.h
 #include i2c.h
 #include power/power_chrg.h
-- 
1.7.9.5

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


[U-Boot] [PATCH v5 00/12] Introduce Samsung misc file and LCD menu.

2014-01-10 Thread Przemyslaw Marczak
This patch set includes changes required to:
- properly use of all gpios
- introduce common file for Samsung misc code
- keys support (PWR, VOL:UP,DOWN)
- console support on LCD
- 16bpp logo support
- introduce LCD menu on Samsung devices

Each version changes are described in each patch commit msg.

Przemyslaw Marczak (12):
  s5p: gpio: change gpio coding method for s5p gpio.
  trats2: Code cleanup.
  samsung: common: Add misc file and common function misc_init_r().
  samsung: misc: move display logo function to misc.c file.
  common: lcd.c: fix data abort exception when try to access bmp header
  lib: tizen: change Tizen logo with the new one.
  video: exynos: fimd: add support for various display color modes
  samsung: boards: update display configs with 16bpp mode.
  samsung: misc: Add LCD download menu.
  Trats: add LCD download menu support
  trats2: add LCD download menu support
  universal: add LCD download menu support

 arch/arm/include/asm/arch-exynos/gpio.h  |  245 +-
 arch/arm/include/asm/arch-s5pc1xx/gpio.h |   47 +-
 board/samsung/common/Makefile|1 +
 board/samsung/common/misc.c  |  408 ++
 board/samsung/common/misc.h  |   18 +
 board/samsung/trats/trats.c  |5 +-
 board/samsung/trats2/trats2.c|   33 +-
 board/samsung/universal_c210/universal.c |6 +-
 common/lcd.c |   27 +-
 drivers/gpio/s5p_gpio.c  |   15 +-
 drivers/power/battery/bat_trats2.c   |2 +-
 drivers/video/exynos_fb.c|   28 -
 drivers/video/exynos_fimd.c  |   15 +-
 include/configs/s5p_goni.h   |4 +-
 include/configs/s5pc210_universal.h  |   41 +-
 include/configs/trats.h  |   33 +-
 include/configs/trats2.h |   31 +-
 include/lcd.h|2 +
 include/power/max77686_pmic.h|2 +
 include/power/pmic.h |1 -
 lib/tizen/tizen.c|   21 +-
 lib/tizen/tizen_hd_logo.h| 5057 ---
 lib/tizen/tizen_hd_logo_data.h   |   15 -
 lib/tizen/tizen_logo_16bpp.h |10025 ++
 lib/tizen/tizen_logo_16bpp_gzip.h|  727 +++
 25 files changed, 11438 insertions(+), 5371 deletions(-)
 create mode 100644 board/samsung/common/misc.c
 create mode 100644 board/samsung/common/misc.h
 delete mode 100644 lib/tizen/tizen_hd_logo.h
 delete mode 100644 lib/tizen/tizen_hd_logo_data.h
 create mode 100644 lib/tizen/tizen_logo_16bpp.h
 create mode 100644 lib/tizen/tizen_logo_16bpp_gzip.h

-- 
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 v5 00/30] zynq: More boards support

2014-01-10 Thread Albert ARIBAUD
Hi Jagannadha,

On Thu, 9 Jan 2014 01:48:01 +0530, Jagannadha Sutradharudu Teki
jagannadha.sutradharudu-t...@xilinx.com wrote:

 These changes are from u-boot-xlnx.git repo from git.xilinx.com
 and in addition of basic fdt support. This repo is well tested
 on xilinx zynq platform, hence pushing the same on upstream.
 
 Excluded qspi and nand changes from previous series.
 
 --
 Thanks,
 Jagan.
 
 Changes for v5:
   - rebase to u-boot-arm/master
   - Enabled CONFIG_DEFAULT_DEVICE_TREE in pre-board config files.
   - Updated build steps on doc/README.zynq
 Changes for v4:
 - rebase to master
 - Removed CONFIG_SYS_NO_FLASH in zynq-common.h
 Changes for v3:
 - Removed CONFIG_ZYNQ_QSPI
 - Removed CONFIG_NAND_ZYNQ
 - Removed CONFIG_SYS_PROMPT_HUSH_PS2
 - Documented bootmode detection code
 - Added comments
 
 Jagannadha Sutradharudu Teki (30):
   zynq: Enable CONFIG_FIT_VERBOSE
   zynq: Enable Boot FreeBSD/vxWorks
   zynq: Cleanup on miscellaneous configs
   zynq: Cleanup on memory configs
   zynq: Minor config cleanup
   zynq: Enable cache options
   zynq: Add UART0, UART1 configs support
   zynq: Add GEM0, GEM1 configs support
   zynq-common: Rename zynq with zynq-common
   doc: zynq: Add information on zynq u-boot
   zynq: Add zynq zc70x board support
   zynq: Add zynq zed board support
   zynq: Move CONFIG_SYS_SDRAM_SIZE to pre-board configs
   zynq-common: Define exact TEXT_BASE
   zynq: zc70x: Add Catalyst 24WC08 EEPROM config support
   zynq: Add zynq microzed board support
   zynq: Add zynq_zc770 xm010 board support
   zynq: Add zynq_zc770 xm013 board support
   zynq: Add zynq_zc770 xm012 board support
   zynq: Add support to find bootmode
   zynq-common: Define default environment
   zynq-common: Change Env. Sector size to 128Kb
   zynq-common: Define flash env. partition
   zynq-common: Define CONFIG_ENV_OVERWRITE
   dts: zynq: Add basic fdt support
   gpio: zynq: Add dummy gpio routines
   zynq-common: Enable verified boot(RSA)
   dts: zynq: Add more zynq dts files
   zynq: Enable CONFIG_DEFAULT_DEVICE_TREE
   doc: Update the zynq u-boot status
 
  arch/arm/cpu/armv7/zynq/slcr.c |   6 +
  arch/arm/dts/zynq-7000.dtsi|  13 ++
  arch/arm/include/asm/arch-zynq/gpio.h  |  25 +++
  arch/arm/include/asm/arch-zynq/sys_proto.h |   1 +
  board/xilinx/dts/zynq-microzed.dts |  14 ++
  board/xilinx/dts/zynq-zc702.dts|  14 ++
  board/xilinx/dts/zynq-zc706.dts|  14 ++
  board/xilinx/dts/zynq-zc770-xm010.dts  |  14 ++
  board/xilinx/dts/zynq-zc770-xm012.dts  |  14 ++
  board/xilinx/dts/zynq-zc770-xm013.dts  |  14 ++
  board/xilinx/dts/zynq-zed.dts  |  14 ++
  board/xilinx/zynq/board.c  |  25 +++
  boards.cfg |   8 +-
  doc/README.zynq|  94 
  include/configs/zynq-common.h  | 238 
 +
  include/configs/zynq.h | 139 -
  include/configs/zynq_microzed.h|  26 
  include/configs/zynq_zc70x.h   |  29 
  include/configs/zynq_zc770.h   |  42 +
  include/configs/zynq_zed.h |  27 
  20 files changed, 630 insertions(+), 141 deletions(-)
  create mode 100644 arch/arm/dts/zynq-7000.dtsi
  create mode 100644 arch/arm/include/asm/arch-zynq/gpio.h
  create mode 100644 board/xilinx/dts/zynq-microzed.dts
  create mode 100644 board/xilinx/dts/zynq-zc702.dts
  create mode 100644 board/xilinx/dts/zynq-zc706.dts
  create mode 100644 board/xilinx/dts/zynq-zc770-xm010.dts
  create mode 100644 board/xilinx/dts/zynq-zc770-xm012.dts
  create mode 100644 board/xilinx/dts/zynq-zc770-xm013.dts
  create mode 100644 board/xilinx/dts/zynq-zed.dts
  create mode 100644 doc/README.zynq
  create mode 100644 include/configs/zynq-common.h
  delete mode 100644 include/configs/zynq.h
  create mode 100644 include/configs/zynq_microzed.h
  create mode 100644 include/configs/zynq_zc70x.h
  create mode 100644 include/configs/zynq_zc770.h
  create mode 100644 include/configs/zynq_zed.h
 

Applied to u-boot-arm/master, thanks!

Amicalement,
-- 
Albert.
___
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-01-10 Thread Albert ARIBAUD
Hello Tom,

The following changes since commit 4b210ad34282bfd9fc982a8e3c9a9126f4094cdb:

  Merge branch 'master' of git://git.denx.de/u-boot-arm (2013-12-10 17:15:18 
-0500)

are available in the git repository at:


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

for you to fetch changes up to 10a147bc665367111920be657409a5d56d3c0590:

  doc: Update the zynq u-boot status (2014-01-10 15:18:33 +0100)


Alban Bedel (4):
  ARM: tegra: support SKU b1 of Tegra30
  i2c: tegra: Add the fifth bus on SoC with more than 4 buses
  ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
  arm: tegra: Fix the CPU complex reset masks

Albert ARIBAUD (8):
  Revert ARM: move interrupt_init to before relocation
  Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'
  Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
  Merge remote-tracking branch 'u-boot-pxa/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
  arm: make 'MAKEALL -a' distinguish between arm and aarch64

Bo Shen (3):
  arm: atmel: at91sam9x5: cleanup cs configure for spi
  arm: atmel: at91sam9x5: cleanup unneeded undef
  arm: atmel: at91sam9x5: move CONFIG_SYS_NO_FLASH to proper position

Dan Murphy (1):
  arm: am437: Fix offset for USB registers

David Feng (7):
  fdt_support: 64bit initrd start address support
  cmd_pxe: remove compiling warnings
  add weak entry definition
  arm64: core support
  arm64: generic board support
  arm64: board support of vexpress_aemv8a
  arm64: MAKEALL, filter armv8 boards from LIST_arm

Eric Nelson (8):
  i.MX6DQ/DLS: replace pad names with their Linux kernel equivalents
  i.MX6DQ/DLS: remove useless mux/pad declarations
  i.MX6DQ: Add Pinmux settings that are present in mainline and 
Dual-Lite/Solo
  i.MX6DQ/DLS: remove unused pad declarations
  i.MX6DQ/DLS: whitespace: Align IOMUX_PAD column in declarations
  imx-common: remove extraneous semicolon from macro
  i.MX6 (DQ/DLS): use macros for mux and pad declarations
  ARM: mx6: Update non-Freescale boards to include CPU errata.

Fabio Estevam (24):
  configs: imx: Make CONFIG_SYS_PROMPT uniform across FSL boards
  wandboard: Return the error immediately when ipuv3_fb_init() fails
  wandboard: Return the error when cpu_eth_init() fails
  titanium: Return the error when cpu_eth_init() fails
  nitrogen6x: Remove unused OCOTP options
  mx51evk: Fix pmic_init() argument
  mx31pdk: Fix pmic_init() argument
  efikamx: Fix pmic_init() argument
  power: power_fsl: Pass p-bus in the same way for SPI and I2C cases
  mx6sabresd: Fix wrong colors in LVDS splash
  mx6sabresd: Add SPI NOR support
  imx: Explicitly pass the I2C bus number in pmic_init()
  configs: imx: Remove CONFIG_SYS_SPD_BUS_NUM option
  mx6: clock: Fix the calculation of PLL_ENET frequency
  mx6sabresd: Allow probing HSYNC, VSYNC and DISP_CLK signals
  mx6sabresd: Fix LVDS width and color format
  doc: README.fuse: Add an example on how to use the fuse API on mx6q
  mx6sabre_common.h: Add CONFIG_CMD_FUSE support
  mx6: soc: Staticize set_vddsoc()
  mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages
  mx6: soc: Set the VDDSOC at 1.175 V
  mx6: soc: Introduce set_ldo_voltage()
  mx6: soc: Add the required LDO ramp up delay
  mx6: soc: Disable VDDPU regulator

Frank Li (1):
  imx6: fix random hang when download by usb

Giuseppe Pagano (5):
  udoo: Move and optimize platform register setting.
  udoo: Add ethernet support (FEC + Micrel KSZ9031).
  udoo: Fix watchdog during kernel boot.
  nitrogen6x: Move setup_sata to common part
  udoo: Add SATA support on uDoo Board.

Heiko Schocher (1):
  am335x, siemens boards: adapt default environment setting

Holger Brunck (1):
  arm/km: fix i2c mux define for km_kirkwood_128m16 target

Jagannadha Sutradharudu Teki (30):
  zynq: Enable CONFIG_FIT_VERBOSE
  zynq: Enable Boot FreeBSD/vxWorks
  zynq: Cleanup on miscellaneous configs
  zynq: Cleanup on memory configs
  zynq: Minor config cleanup
  zynq: Enable cache options
  zynq: Add UART0, UART1 configs support
  zynq: Add GEM0, GEM1 configs support
  zynq-common: Rename zynq with zynq-common
  doc: zynq: Add information on zynq u-boot
  zynq: Add zynq zc70x board support
  zynq: Add zynq zed board support
  zynq: Move CONFIG_SYS_SDRAM_SIZE to pre-board configs
  zynq-common: Define exact TEXT_BASE
  zynq: zc70x: Add Catalyst 24WC08 EEPROM config support
  zynq: Add zynq microzed board support
  zynq: Add zynq_zc770 xm010 board support
  zynq: Add zynq_zc770 

[U-Boot] [PATCH] net: execute miiphy_init if CONFIG_PHYLIB defined

2014-01-10 Thread Alexey Brodkin
In common/Makefile miiphyutil.o gets built if any of the following
items enabled:
 * CONFIG_PHYLIB
 * CONFIG_MII
 * CONFIG_CMD_MII

So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still
use functions like miiphy_get_dev_by_name.

In its turn miiphy_get_dev_by_name traverses mii_devs list which is
not initialized because miiphy_init never got called.

Signed-off-by: Alexey Brodkin abrod...@synopsys.com

Cc: Joe Hershberger joe.hershber...@ni.com
Cc: Rob Herring rob.herr...@calxeda.com
Cc: Simon Glass s...@chromium.org
Cc: Wolfgang Denk w...@denx.de
---
 net/eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/eth.c b/net/eth.c
index c96e767..32bd10c 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -279,7 +279,7 @@ int eth_initialize(bd_t *bis)
eth_current = NULL;
 
bootstage_mark(BOOTSTAGE_ID_NET_ETH_START);
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
+#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
miiphy_init();
 #endif
 
-- 
1.8.4.2

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


[U-Boot] [PATCH v3] spi/cadence: Adding Cadence SPI driver support for SOCFPGA

2014-01-10 Thread Chin Liang See
To add the Cadence SPI driver support for Altera SOCFPGA. It
required information such as clocks and timing from platform's
configuration header file within include/configs folder

Signed-off-by: Chin Liang See cl...@altera.com
Cc: Jagan Teki jagannadh.t...@gmail.com
Cc: Gerhard Sittig g...@denx.de
---
Changes for v3
- Moved the documentation from doc folder to driver
- Documented down macro specific to driver only
Changes for v2
- Combine driver into single C file instead of 2
- Added documentation on the macro used
- Using structure for registers instead of macro
---
 drivers/spi/Makefile   |1 +
 drivers/spi/cadence_qspi.c | 1018 
 drivers/spi/cadence_qspi.h |  196 +
 3 files changed, 1215 insertions(+)
 create mode 100644 drivers/spi/cadence_qspi.c
 create mode 100644 drivers/spi/cadence_qspi.h

diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index ed4ecd7..b8d56ea 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
 obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
 obj-$(CONFIG_BFIN_SPI) += bfin_spi.o
 obj-$(CONFIG_BFIN_SPI6XX) += bfin_spi6xx.o
+obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o
 obj-$(CONFIG_CF_SPI) += cf_spi.o
 obj-$(CONFIG_CF_QSPI) += cf_qspi.o
 obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
new file mode 100644
index 000..4712b45
--- /dev/null
+++ b/drivers/spi/cadence_qspi.c
@@ -0,0 +1,1018 @@
+/*
+ * (C) Copyright 2014 Altera Corporation www.altera.com
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include common.h
+#include asm/io.h
+#include asm/errno.h
+#include malloc.h
+#include spi.h
+#include cadence_qspi.h
+
+static int qspi_is_init;
+static unsigned int qspi_calibrated_hz;
+static unsigned int qspi_calibrated_cs;
+
+static const struct cadence_qspi *cadence_qspi_base = (void *)QSPI_BASE;
+
+#define to_cadence_qspi_slave(s)   \
+   container_of(s, struct cadence_qspi_slave, slave)
+
+#define CQSPI_CAL_DELAY(tdelay_ns, tref_ns, tsclk_ns)  \
+   tdelay_ns) - (tsclk_ns)) / (tref_ns)))
+
+#define CQSPI_GET_WR_SRAM_LEVEL()  \
+   ((readl(cadence_qspi_base-sramfill) \
+   CQSPI_REG_SRAMLEVEL_WR_LSB)  CQSPI_REG_SRAMLEVEL_WR_MASK)
+
+static unsigned int cadence_qspi_apb_cmd2addr(const unsigned char *addr_buf,
+   unsigned int addr_width)
+{
+   unsigned int addr;
+
+   addr = (addr_buf[0]  16) | (addr_buf[1]  8) | addr_buf[2];
+
+   if (addr_width == 4)
+   addr = (addr  8) | addr_buf[3];
+
+   return addr;
+}
+
+static void cadence_qspi_apb_read_fifo_data(void *dest,
+   const void *src_ahb_addr, unsigned int bytes)
+{
+   unsigned int temp;
+   int remaining = bytes;
+   unsigned int *dest_ptr = (unsigned int *)dest;
+   unsigned int *src_ptr = (unsigned int *)src_ahb_addr;
+
+   while (remaining  0) {
+   if (remaining = CQSPI_FIFO_WIDTH) {
+   *dest_ptr = readl(src_ptr);
+   remaining -= CQSPI_FIFO_WIDTH;
+   } else {
+   /* dangling bytes */
+   temp = readl(src_ptr);
+   memcpy(dest_ptr, temp, remaining);
+   break;
+   }
+   dest_ptr++;
+   }
+
+   return;
+}
+
+static void cadence_qspi_apb_write_fifo_data(const void *dest_ahb_addr,
+   const void *src, unsigned int bytes)
+{
+   unsigned int temp;
+   int remaining = bytes;
+   unsigned int *dest_ptr = (unsigned int *)dest_ahb_addr;
+   unsigned int *src_ptr = (unsigned int *)src;
+
+   while (remaining  0) {
+   if (remaining = CQSPI_FIFO_WIDTH) {
+   writel(*src_ptr, dest_ptr);
+   remaining -= sizeof(unsigned int);
+   } else {
+   /* dangling bytes */
+   memcpy(temp, src_ptr, remaining);
+   writel(temp, dest_ptr);
+   break;
+   }
+   src_ptr++;
+   }
+
+   return;
+}
+
+/* Read from SRAM FIFO with polling SRAM fill level. */
+static int qspi_read_sram_fifo_poll(void *dest_addr,
+   const void *src_addr,  unsigned int num_bytes)
+{
+   unsigned int remaining = num_bytes;
+   unsigned int retry;
+   unsigned int sram_level = 0;
+   unsigned char *dest = (unsigned char *)dest_addr;
+
+   while (remaining  0) {
+   retry = CQSPI_REG_RETRY;
+   while (retry--) {
+   sram_level = (readl(cadence_qspi_base-sramfill) 
+   CQSPI_REG_SRAMLEVEL_RD_LSB) 
+   CQSPI_REG_SRAMLEVEL_RD_MASK;
+   if (sram_level)
+   break;
+   

Re: [U-Boot] [PATCH v6 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL

2014-01-10 Thread Scott Wood
On Fri, 2014-01-10 at 10:10 +0800, Po Liu wrote:
 Using the TPL method for nand boot by sram was already
 supported. Here add some code for mpc85xx ifc nand boot.
 
   - For ifc, elbc, esdhc, espi, all need the SPL without
   section .resetvec.
   - Use a clear function name for nand spl boot.
   - Add CONFIG_SPL_DRIVERS_MISC_SUPPORT to compile the fsl_ifc.c
   in spl/Makefile;
 
 Signed-off-by: Po Liu po@freescale.com
 ---
 changes for v2:
   - seperate public code and c29xpcie board code
   - add ifc support
 changes for v3:
   - remove the redundant plus
   - ifc support use CONFIG_SPL_DRIVERS_MISC_SUPPORT
 changes for v4:
   - modify the nand_load function
   - add comments in README.SPL
 changes for v5:
   -none
 changes for v6:
   - modify the readme file for the include lib file
 
  arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 15 ---
  doc/README.SPL  |  1 +
  drivers/mtd/nand/fsl_ifc_spl.c  | 31 ---
  spl/Makefile|  1 +
  4 files changed, 34 insertions(+), 14 deletions(-)

Acked-by: Scott Wood scottw...@freescale.com

-Scott


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


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

2014-01-10 Thread Tom Rini
On Fri, Jan 10, 2014 at 04:43:51PM +0100, Albert ARIBAUD wrote:

 Hello Tom,
 
 The following changes since commit 4b210ad34282bfd9fc982a8e3c9a9126f4094cdb:
 
   Merge branch 'master' of git://git.denx.de/u-boot-arm (2013-12-10 17:15:18 
 -0500)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-arm master
 
 for you to fetch changes up to 10a147bc665367111920be657409a5d56d3c0590:
 
   doc: Update the zynq u-boot status (2014-01-10 15:18:33 +0100)
 
 
 Alban Bedel (4):
   ARM: tegra: support SKU b1 of Tegra30
   i2c: tegra: Add the fifth bus on SoC with more than 4 buses
   ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
   arm: tegra: Fix the CPU complex reset masks
 
 Albert ARIBAUD (8):
   Revert ARM: move interrupt_init to before relocation
   Merge branch 'u-boot-sh/rmobile' into 'u-boot-arm/master'
   Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
   Merge remote-tracking branch 'u-boot-pxa/master' into 
 'u-boot-arm/master'
   Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
   Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
   Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
   arm: make 'MAKEALL -a' distinguish between arm and aarch64
 
 Bo Shen (3):
   arm: atmel: at91sam9x5: cleanup cs configure for spi
   arm: atmel: at91sam9x5: cleanup unneeded undef
   arm: atmel: at91sam9x5: move CONFIG_SYS_NO_FLASH to proper position
 
 Dan Murphy (1):
   arm: am437: Fix offset for USB registers
 
 David Feng (7):
   fdt_support: 64bit initrd start address support
   cmd_pxe: remove compiling warnings
   add weak entry definition
   arm64: core support
   arm64: generic board support
   arm64: board support of vexpress_aemv8a
   arm64: MAKEALL, filter armv8 boards from LIST_arm
 
 Eric Nelson (8):
   i.MX6DQ/DLS: replace pad names with their Linux kernel equivalents
   i.MX6DQ/DLS: remove useless mux/pad declarations
   i.MX6DQ: Add Pinmux settings that are present in mainline and 
 Dual-Lite/Solo
   i.MX6DQ/DLS: remove unused pad declarations
   i.MX6DQ/DLS: whitespace: Align IOMUX_PAD column in declarations
   imx-common: remove extraneous semicolon from macro
   i.MX6 (DQ/DLS): use macros for mux and pad declarations
   ARM: mx6: Update non-Freescale boards to include CPU errata.
 
 Fabio Estevam (24):
   configs: imx: Make CONFIG_SYS_PROMPT uniform across FSL boards
   wandboard: Return the error immediately when ipuv3_fb_init() fails
   wandboard: Return the error when cpu_eth_init() fails
   titanium: Return the error when cpu_eth_init() fails
   nitrogen6x: Remove unused OCOTP options
   mx51evk: Fix pmic_init() argument
   mx31pdk: Fix pmic_init() argument
   efikamx: Fix pmic_init() argument
   power: power_fsl: Pass p-bus in the same way for SPI and I2C cases
   mx6sabresd: Fix wrong colors in LVDS splash
   mx6sabresd: Add SPI NOR support
   imx: Explicitly pass the I2C bus number in pmic_init()
   configs: imx: Remove CONFIG_SYS_SPD_BUS_NUM option
   mx6: clock: Fix the calculation of PLL_ENET frequency
   mx6sabresd: Allow probing HSYNC, VSYNC and DISP_CLK signals
   mx6sabresd: Fix LVDS width and color format
   doc: README.fuse: Add an example on how to use the fuse API on mx6q
   mx6sabre_common.h: Add CONFIG_CMD_FUSE support
   mx6: soc: Staticize set_vddsoc()
   mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages
   mx6: soc: Set the VDDSOC at 1.175 V
   mx6: soc: Introduce set_ldo_voltage()
   mx6: soc: Add the required LDO ramp up delay
   mx6: soc: Disable VDDPU regulator
 
 Frank Li (1):
   imx6: fix random hang when download by usb
 
 Giuseppe Pagano (5):
   udoo: Move and optimize platform register setting.
   udoo: Add ethernet support (FEC + Micrel KSZ9031).
   udoo: Fix watchdog during kernel boot.
   nitrogen6x: Move setup_sata to common part
   udoo: Add SATA support on uDoo Board.
 
 Heiko Schocher (1):
   am335x, siemens boards: adapt default environment setting
 
 Holger Brunck (1):
   arm/km: fix i2c mux define for km_kirkwood_128m16 target
 
 Jagannadha Sutradharudu Teki (30):
   zynq: Enable CONFIG_FIT_VERBOSE
   zynq: Enable Boot FreeBSD/vxWorks
   zynq: Cleanup on miscellaneous configs
   zynq: Cleanup on memory configs
   zynq: Minor config cleanup
   zynq: Enable cache options
   zynq: Add UART0, UART1 configs support
   zynq: Add GEM0, GEM1 configs support
   zynq-common: Rename zynq with zynq-common
   doc: zynq: Add information on zynq u-boot
   zynq: Add zynq zc70x board support
   zynq: Add zynq zed board support
   zynq: Move CONFIG_SYS_SDRAM_SIZE to pre-board configs
   zynq-common: Define exact 

Re: [U-Boot] Please pull u-boot-x86.git branch sandbox2

2014-01-10 Thread Tom Rini
On Wed, Jan 08, 2014 at 07:28:12PM -0700, Simon Glass wrote:

 Hi Tom,
 
 These are the first half of the sandbox enhancements. The second half
 may not make it before the release as I have found a few grey areas I
 want to check.
 
 
 ./tools/buildman/buildman -b x86-push -s
 Summary of 14 commits for 1195 boards (32 threads, 1 job per thread)
 01: Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
   blackfin: +   bf561-acvilon cm-bf561 blackstamp br4 bct-brettl2
 cm-bf527 dnp5370 bf506f-ezkit ip04 bf527-sdp bf609-ezkit bf537-stamp
 bf527-ezkit-v2 cm-bf537e tcm-bf518 cm-bf537u bf537-pnav cm-bf533 pr1
 bf533-ezkit ibf-dsp561 bf537-srv1 cm-bf548 bf537-minotaur bf538f-ezkit
 bf548-ezkit bf525-ucr2 blackvme bf527-ezkit tcm-bf537 bf533-stamp
 bf518f-ezbrd bf527-ad7160-eval bf526-ezbrd bf561-ezkit
   m68k: +   M54455EVB_a66 M5329AFEE M5249EVB idmr M5208EVBE
 eb_cpu5282 M5475FFE M54451EVB astro_mcf5373l M54418TWR_serial_rmii
 M54455EVB_intel M5282EVB M54455EVB_i66 M5475GFE M5253DEMO
 M54455EVB_stm33 M5485BFE M5485DFE TASREG M5329BFEE M52277EVB M5475EFE
 M5475CFE cobra5272 M5485AFE M53017EVB M5485HFE M5235EVB M5253EVBE
 M54418TWR_nand_mii M54418TWR_nand_rmii_lowfreq M5475BFE M5475DFE
 M5275EVB M52277EVB_stmicro eb_cpu5282_internal M54451EVB_stmicro
 M5271EVB M5485GFE M5373EVB M5485EFE M5485FFE M54418TWR
 M5235EVB_Flash32 M54418TWR_nand_rmii M54418TWR_serial_mii M5485CFE
 M54455EVB M5475AFE M5272C3
powerpc: +   MVBLM7 MVSMR
  sparc: +   grsim grsim_leon2 gr_cpci_ax2000 gr_xc3s_1500 gr_ep2s60
 sh: +   rsk7269 rsk7264 rsk7203
 microblaze: +   microblaze-generic
   openrisc: +   openrisc-generic
arm: +   nitrogen6dl2g palmtc zipitz2 omap3_zoom2 mx6slevk
 nitrogen6s nitrogen6q wandboard_solo mini2440 titanium nitrogen6q2g
 wandboard_dl wandboard_quad mx6dlsabresd nitrogen6dl mx6qarm2
 mx6qsabrelite mx6qsabresd mx6qsabreauto udoo_quad cam_enc_4xx
 nitrogen6s1g scb9328 cgtqmx6qeval balloon3 palmld mx1ads
 02: Add crc8 routine
 03: sandbox: block driver using host file/device as backing store
 04: sandbox: Improve/augment memory allocation functions
 05: sandbox: Correct help message arg garbling
 06: sandbox: Allow return from board_init_f()
 07: sandbox: Implement the bootm command for sandbox
 08: sandbox: Allow the console to work earlier
 09: sandbox: Add -i option to enter interactive mode
 10: sandbox: Allow reading/writing of RAM buffer
 11: sandbox: Add facility to save/restore sandbox state
 12: sandbox: tpm: Add TPM emulation
 13: sandbox: Add a prototype for cleanup_before_linux()
 14: sandbox: tpm: Fix nvwrite command
 
 
 
 The following changes since commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf:
 
   Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
 (2014-01-06 14:07:08 -0500)
 
 are available in the git repository at:
 
 
   ssh://gu-...@git.denx.de/u-boot-x86.git sandbox2
 
 for you to fetch changes up to 2c30af8f1861f09f217097460bfbea5ea691f8b8:
 
   sandbox: tpm: Fix nvwrite command (2014-01-08 17:26:17 -0700)
 
 
 Che-Liang Chiou (1):
   sandbox: tpm: Fix nvwrite command
 
 Henrik Nordström (1):
   sandbox: block driver using host file/device as backing store
 
 Simon Glass (11):
   Add crc8 routine
   sandbox: Improve/augment memory allocation functions
   sandbox: Correct help message arg garbling
   sandbox: Allow return from board_init_f()
   sandbox: Implement the bootm command for sandbox
   sandbox: Allow the console to work earlier
   sandbox: Add -i option to enter interactive mode
   sandbox: Allow reading/writing of RAM buffer
   sandbox: Add facility to save/restore sandbox state
   sandbox: tpm: Add TPM emulation
   sandbox: Add a prototype for cleanup_before_linux()
 
  arch/sandbox/cpu/cpu.c|  21 +++-
  arch/sandbox/cpu/os.c |  95 +-
  arch/sandbox/cpu/start.c  |  96 +++---
  arch/sandbox/cpu/state.c  | 353
 ++
  arch/sandbox/include/asm/global_data.h|   2 +-
  arch/sandbox/include/asm/state.h  | 128 
  arch/sandbox/include/asm/u-boot-sandbox.h |   2 +
  common/board_f.c  |  15 ++-
  common/cmd_sandbox.c  |  64 
  common/console.c  |  16 ++-
  disk/part.c   |   6 ++
  drivers/block/Makefile|   1 +
  drivers/block/sandbox.c   | 124 +++
  drivers/tpm/Makefile  |   1 +
  drivers/tpm/tpm_tis_sandbox.c | 260
 
  include/config_fallbacks.h|   3 +-
  include/configs/sandbox.h |   5 +
  include/linux/crc8.h  |  23 +
  include/os.h 

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

2014-01-10 Thread Tom Rini
On Thu, Jan 09, 2014 at 01:49:19PM +0900, Nobuhiro Iwamatsu wrote:

 Dear Tom Rini.
 
 Please pull u-boot-sh master branch.
 
 The following changes since commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf:
 
   Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
 (2014-01-06 14:07:08 -0500)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-sh.git master
 
 for you to fetch changes up to 5fe3aefd3dd0845ed4f69ba34b9790d3961d7ea8:
 
   sh: sh2: Remove CONFIG_SH2A definition from asm/processor.h
 (2014-01-09 13:22:22 +0900)
 
 
 Masahiro Yamada (1):
   sh: delete redundant CONFIG_SH definition
 
 Nobuhiro Iwamatsu (9):
   sh: sh2: Add CONFIG_SH2 definition to config.mk of SH2
   sh: sh2: remove CONFIG_SH2 definition from board config
   sh: sh3: Add CONFIG_SH3 definition to config.mk of SH3
   sh: sh3: remove CONFIG_SH3 definition from board config
   sh: sh4: Add CONFIG_SH4 definition to config.mk of SH4
   sh: sh4: remove CONFIG_SH4 definition from board config
   sh: sh2: Change CONFIG_SYS_HZ to CONFIG_SH_CMT_CLK_FREQ
   sh: sh4: Remove CONFIG_SH4A definition from source code
   sh: sh2: Remove CONFIG_SH2A definition from asm/processor.h
 
  arch/sh/cpu/sh2/config.mk   | 2 +-
  arch/sh/cpu/sh2/cpu.c   | 4 
  arch/sh/cpu/sh3/config.mk   | 2 +-
  arch/sh/cpu/sh4/config.mk   | 2 +-
  arch/sh/cpu/sh4/cpu.c   | 4 
  arch/sh/include/asm/cache.h | 4 ++--
  arch/sh/include/asm/processor.h | 8 +++-
  arch/sh/lib/time_sh2.c  | 2 +-
  include/configs/MigoR.h | 2 --
  include/configs/ap325rxa.h  | 2 --
  include/configs/ap_sh4a_4a.h| 3 ---
  include/configs/ecovec.h| 3 ---
  include/configs/espt.h  | 2 --
  include/configs/mpr2.h  | 2 --
  include/configs/ms7720se.h  | 2 --
  include/configs/ms7722se.h  | 2 --
  include/configs/ms7750se.h  | 2 --
  include/configs/r0p7734.h   | 3 ---
  include/configs/r2dplus.h   | 2 --
  include/configs/r7780mp.h   | 2 --
  include/configs/rsk7203.h   | 4 +---
  include/configs/rsk7264.h   | 4 +---
  include/configs/rsk7269.h   | 4 +---
  include/configs/sh7752evb.h | 2 --
  include/configs/sh7753evb.h | 2 --
  include/configs/sh7757lcr.h | 2 --
  include/configs/sh7763rdp.h | 2 --
  include/configs/sh7785lcr.h | 2 --
  include/configs/shmin.h | 2 --
  include/sh_tmu.h| 2 +-

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull request mmc tree

2014-01-10 Thread Tom Rini
On Thu, Jan 09, 2014 at 01:22:58PM +0200, Pantelis Antoniou wrote:

 Hi Tom,
 
 The following changes since commit e7be18225fbea76d1f0034b224f0d1e60f07cfcf:
 
   Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx (2014-01-06 
 14:07:08 -0500)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-mmc.git master
 
 for you to fetch changes up to c5c1af21764d9423b45c1d03e835c4547a8bc5cb:
 
   socfpga/dwmmc: Adding DesignWare MMC driver support for SOCFPGA (2014-01-09 
 11:53:55 +0200)
 
 
 Alexey Brodkin (1):
   mmc/dwmmc: use bounce buffer for data exchange between CPU and MMC 
 controller
 
 Chin Liang See (2):
   mmc/dwmmc: Using calloc instead malloc
   socfpga/dwmmc: Adding DesignWare MMC driver support for SOCFPGA
 
 Darwin Rambo (1):
   mmc: Minor cleanup of sdhci.c
 
 Lad, Prabhakar (1):
   include/mmc.h: Remove declaration for spl_mmc_load()
 
 Lubomir Popov (1):
   ARM: omap5_uevm: Enable 8-bit eMMC access
 
 Markus Niebel (1):
   mmc: add setdsr support
 
  arch/arm/include/asm/arch-socfpga/dwmmc.h  | 12 
  arch/arm/include/asm/arch-socfpga/system_manager.h | 65 
 +
  common/cmd_mmc.c   | 23 
 +++
  doc/README.socfpga | 53 
 +
  drivers/mmc/Makefile   |  1 +
  drivers/mmc/dw_mmc.c   | 36 
 
  drivers/mmc/mmc.c  | 18 ++
  drivers/mmc/sdhci.c| 32 
 +++-
  drivers/mmc/socfpga_dw_mmc.c   | 68 
 
  include/configs/arndale.h  |  1 +
  include/configs/exynos5250-dt.h|  1 +
  include/configs/omap5_uevm.h   |  1 +
  include/mmc.h  |  4 +++-
  13 files changed, 289 insertions(+), 26 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-socfpga/dwmmc.h
  create mode 100644 doc/README.socfpga
  mode change 100644 = 100755 drivers/mmc/dw_mmc.c
  create mode 100644 drivers/mmc/socfpga_dw_mmc.c

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] net: execute miiphy_init if CONFIG_PHYLIB defined

2014-01-10 Thread Joe Hershberger
On Fri, Jan 10, 2014 at 9:58 AM, Alexey Brodkin
alexey.brod...@synopsys.com wrote:
 In common/Makefile miiphyutil.o gets built if any of the following
 items enabled:
  * CONFIG_PHYLIB
  * CONFIG_MII
  * CONFIG_CMD_MII

 So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still
 use functions like miiphy_get_dev_by_name.

 In its turn miiphy_get_dev_by_name traverses mii_devs list which is
 not initialized because miiphy_init never got called.

 Signed-off-by: Alexey Brodkin abrod...@synopsys.com

 Cc: Joe Hershberger joe.hershber...@ni.com
 Cc: Rob Herring rob.herr...@calxeda.com
 Cc: Simon Glass s...@chromium.org
 Cc: Wolfgang Denk w...@denx.de
 ---

Acked-by: Joe Hershberger joe.hershber...@ni.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/5] edid: add function to convert edid to fb_videomode

2014-01-10 Thread Eric Nelson

Hi Christian,

On 01/08/2014 12:24 AM, Christian Gmeiner wrote:

There may be some custom boards in the field which have
an seperate eeprom chip to store edid informations in it.
To make use of those edid information in the board code
this patch add a function to convert edid to fb_videomode.

Signed-off-by: Christian Gmeiner christian.gmei...@gmail.com
---
  common/edid.c  |   29 +
  include/edid.h |3 +++
  2 files changed, 32 insertions(+)

diff --git a/common/edid.c b/common/edid.c
index e66108f..8841c25 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -12,6 +12,7 @@

  #include common.h
  #include edid.h
+#include linux/fb.h
  #include linux/ctype.h
  #include linux/string.h

@@ -288,3 +289,31 @@ void edid_print_info(struct edid1_info *edid_info)
if (!have_timing)
printf(\tNone\n);
  }
+
+void edid_to_fb_videomode(struct edid1_info *edid, struct fb_videomode *mode)
+{
+struct edid_monitor_descriptor *monitor = 
edid-monitor_details.descriptor[0];
+unsigned char *bytes = (unsigned char *)monitor;
+struct edid_detailed_timing *timing = (struct edid_detailed_timing 
*)monitor;
+
+uint32_t pixclock = EDID_DETAILED_TIMING_PIXEL_CLOCK(*timing);
+uint32_t h_blanking = 
EDID_DETAILED_TIMING_HORIZONTAL_BLANKING(*timing);
+uint32_t h_active = EDID_DETAILED_TIMING_HORIZONTAL_ACTIVE(*timing);
+uint32_t h_sync_offset = EDID_DETAILED_TIMING_HSYNC_OFFSET(*timing);
+uint32_t h_sync_width = 
EDID_DETAILED_TIMING_HSYNC_PULSE_WIDTH(*timing);
+uint32_t v_blanking = EDID_DETAILED_TIMING_VERTICAL_BLANKING(*timing);
+uint32_t v_active = EDID_DETAILED_TIMING_VERTICAL_ACTIVE(*timing);
+uint32_t v_sync_offset = EDID_DETAILED_TIMING_VSYNC_OFFSET(*timing);
+uint32_t v_sync_width = 
EDID_DETAILED_TIMING_VSYNC_PULSE_WIDTH(*timing);
+
+mode-name = EDID;


I think this wants to be KHZTOPICOS((pixclock/1000)), since the pixclock
returned above seems to be in Hz.


+mode-pixclock = pixclock;
+mode-yres = v_active;
+mode-xres = h_active;
+mode-left_margin = h_blanking - h_sync_offset - h_sync_width;
+mode-right_margin = h_sync_offset;
+mode-upper_margin = v_blanking - v_sync_offset - v_sync_width;
+mode-lower_margin = v_sync_offset;
+mode-hsync_len = h_sync_width;
+mode-vsync_len = v_sync_width;
+}


I just tried gluing this up for use in the Nitrogen6X HDMI channel,
but found that this is more difficult than expected.

Apparently the i.MX6 clock tree doesn't (yet) support use with
the 1080P monitor I have connected.

Everything else looks okay though.

Regards,


Eric

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


Re: [U-Boot] omap4460 nand booting ?

2014-01-10 Thread Gupta, Pekon
From: abraham.varric...@vvdntech.com 
Hello,

Thanks to the help I obtained on this mailing list, I've been able to
customize u-boot (2013.10 release) to work on a custom omap4460 board.
Schematically, it's similar to the pandaboard, but uses the twl6032
pmic and has a NAND memory from micron present.

I've been able to boot this board from USB and from an external mmc
card. In both cases, I've been able to access the nand memory (i.e.
reading/writing). My team tried writing an image of the linux kernel
to the nand from mmc, rebooted the board, copied the image from nand
to ddr and booted off it. At the very least, we feel that this shows
that the memory is working properly.

The problem I'm facing is that I can't seem to boot directly from the
nand memory chip. We've set the boot configuration pins to start with
NAND boot, but it doesn't seem to work. On probing the CS and
nand-busy lines we can see some activity happening, but don't
understand what it means.

The way I expect the board to work, is that the ROM code should detect
the external nand present, query for ONFI data, configure the
bus/interface accordingly, copy SPL part of bootloader from first
sector to internal sram and boot off that.

I *think* that the omap4460 is sending the ONFI request, but after
that, something malfunctions, nand is deemed unusable and the next
device in boot sequence is queried. In my case its the uart and I can
see some garbage characters coming out on the console.

Any suggestions on how I could debug this?

If this NAND has bus-width = 16, then you need to tweak the
board file with following changes.
Below code is for AM335x platforms, you need similar for omap4 platforms
--
--- arch/arm/cpu/armv7/am33xx/mem.c
+++ arch/arm/cpu/armv7/am33xx/mem.c
@@ -64,7 +64,7 @@
u32 base = CONFIG_SYS_FLASH_BASE;
 #elif defined(CONFIG_NAND)
 /* configure GPMC for NAND */
-   const u32  gpmc_regs[GPMC_MAX_REG] = {  M_NAND_GPMC_CONFIG1,
+   const u32  gpmc_regs[GPMC_MAX_REG] = {  M_NAND_GPMC_CONFIG1 | 0x1000,
M_NAND_GPMC_CONFIG2,
M_NAND_GPMC_CONFIG3,
M_NAND_GPMC_CONFIG4,
--

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


Re: [U-Boot] omap4460 nand booting ?

2014-01-10 Thread Abraham Varricatt
On Sat, Jan 11, 2014 at 3:45 AM, Gupta, Pekon pe...@ti.com wrote:

 From: abraham.varric...@vvdntech.com
 Hello,
 
 Thanks to the help I obtained on this mailing list, I've been able to
 customize u-boot (2013.10 release) to work on a custom omap4460 board.
 Schematically, it's similar to the pandaboard, but uses the twl6032
 pmic and has a NAND memory from micron present.
 
 
 The problem I'm facing is that I can't seem to boot directly from the
 nand memory chip. We've set the boot configuration pins to start with
 NAND boot, but it doesn't seem to work. On probing the CS and
 nand-busy lines we can see some activity happening, but don't
 understand what it means.
 
 
 Any suggestions on how I could debug this?
 
 If this NAND has bus-width = 16, then you need to tweak the
 board file with following changes.
 Below code is for AM335x platforms, you need similar for omap4 platforms

No, the NAND memory I'm using has a bus-width of 8.

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


Re: [U-Boot] omap4460 nand booting ?

2014-01-10 Thread Michael Trimarchi
Hi

On Sat, Jan 11, 2014 at 2:35 AM, Abraham Varricatt
abraham.varric...@googlemail.com wrote:
 On Sat, Jan 11, 2014 at 3:45 AM, Gupta, Pekon pe...@ti.com wrote:

 From: abraham.varric...@vvdntech.com
 Hello,
 
 Thanks to the help I obtained on this mailing list, I've been able to
 customize u-boot (2013.10 release) to work on a custom omap4460 board.
 Schematically, it's similar to the pandaboard, but uses the twl6032
 pmic and has a NAND memory from micron present.
 
 
 The problem I'm facing is that I can't seem to boot directly from the
 nand memory chip. We've set the boot configuration pins to start with
 NAND boot, but it doesn't seem to work. On probing the CS and
 nand-busy lines we can see some activity happening, but don't
 understand what it means.
 
 
 Any suggestions on how I could debug this?
 
 If this NAND has bus-width = 16, then you need to tweak the
 board file with following changes.
 Below code is for AM335x platforms, you need similar for omap4 platforms

 No, the NAND memory I'm using has a bus-width of 8.


How do you write on the nand the fist stage boot? Should
be ecc check of the bootrom

Michael


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



-- 
| Michael Nazzareno Trimarchi Amarula Solutions BV |
| COO  -  Founder  Cruquiuskade 47 |
| +31(0)851119172 Amsterdam 1018 AM NL |
|  [`as] http://www.amarulasolutions.com   |
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] how to get u-boot code with arm64: core support

2014-01-10 Thread FengHua
hi Tiger,
 Sorry! It's a little late.
 Albert has merged arm64 patch set. I have tested and it works fine on 
Foundation Model.
 So, you could get it from git tree of u-boot-arm branch.

Regards,
David

 Hi, fenghua:
 How to get u-boot code with arch/arm/cpu/armv8 directory?
 I used git://www.denx.de/git/u-boot.git  to get latest code, but not
 find armv8 dir.
 
 Best wishes,






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


Re: [U-Boot] how to get u-boot code with arm64: core support

2014-01-10 Thread Jagan Teki
On Sat, Jan 11, 2014 at 12:14 PM, FengHua feng...@phytium.com.cn wrote:
 hi Tiger,
  Sorry! It's a little late.
  Albert has merged arm64 patch set. I have tested and it works fine on 
 Foundation Model.
  So, you could get it from git tree of u-boot-arm branch.

 Regards,
 David

 Hi, fenghua:
 How to get u-boot code with arch/arm/cpu/armv8 directory?
 I used git://www.denx.de/git/u-boot.git  to get latest code, but not
 find armv8 dir.

Tom enqueued this on u-boot/master few back, please check!

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