Re: [U-Boot] [PATCH v2 7/7] sunxi: Ainol AW1 support

2015-03-23 Thread Chen-Yu Tsai
Hi,

On Mon, Mar 23, 2015 at 1:07 AM, Paul Kocialkowski  wrote:

Maybe a slight description of the board/device?

ChenYu

> Signed-off-by: Paul Kocialkowski 
> ---
>  board/sunxi/MAINTAINERS |  5 +
>  configs/Ainol_AW1_defconfig | 16 
>  2 files changed, 21 insertions(+)
>  create mode 100644 configs/Ainol_AW1_defconfig
>
> diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
> index ef3c937..e486458 100644
> --- a/board/sunxi/MAINTAINERS
> +++ b/board/sunxi/MAINTAINERS
> @@ -50,6 +50,11 @@ S:   Maintained
>  F: board/sunxi/dram_a20_olinuxino_l2.c
>  F: configs/A20-OLinuXino-Lime2_defconfig
>
> +AINOL AW1 BOARD
> +M: Paul Kocialkowski 
> +S: Maintained
> +F: configs/Ainol_AW1_defconfig
> +
>  AMPE A76 BOARD
>  M: Paul Kocialkowski 
>  S: Maintained
> diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
> new file mode 100644
> index 000..1c3b942
> --- /dev/null
> +++ b/configs/Ainol_AW1_defconfig
> @@ -0,0 +1,16 @@
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
> +CONFIG_FDTFILE="sun7i-a20-ainol-aw1.dtb"
> +CONFIG_USB_MUSB_SUNXI=y
> +CONFIG_USB0_VBUS_PIN="PB9"
> +CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
> +CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:4,le:87,ri:112,up:38,lo:141,hs:1,vs:1,sync:3,vmode:0"
> +CONFIG_VIDEO_LCD_POWER="PH8"
> +CONFIG_VIDEO_LCD_BL_EN="PH7"
> +CONFIG_VIDEO_LCD_BL_PWM="PB2"
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_MACH_SUN7I=y
> +CONFIG_DRAM_CLK=432
> +CONFIG_DRAM_ZQ=123
> +CONFIG_DRAM_EMR1=4
> --
> 1.9.1
>
> ___
> 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] power: pfuze100 correct macro definition

2015-03-23 Thread Peng Fan
Correct the macro PFUZE100_SW1ABC_SETP definition. We should
add parenthese for 'x'.

Signed-off-by: Peng Fan 
---
 include/power/pfuze100_pmic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
index 07199b4..9c749ed 100644
--- a/include/power/pfuze100_pmic.h
+++ b/include/power/pfuze100_pmic.h
@@ -61,7 +61,7 @@ enum {
  * Buck Regulators
  */
 
-#define PFUZE100_SW1ABC_SETP(x)((x - 3000) / 250)
+#define PFUZE100_SW1ABC_SETP(x)(((x) - 3000) / 250)
 
 /* SW1A/B/C Output Voltage Configuration */
 #define SW1x_0_300V 0
-- 
1.8.4


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


Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR only if it is still not ready

2015-03-23 Thread Andrew Gabbasov
Hi Troy,

> From: Troy Kisky [mailto:troy.ki...@boundarydevices.com]
> Sent: Friday, March 20, 2015 9:39 PM
> To: peng@freescale.com; Gabbasov, Andrew; u-boot@lists.denx.de
> Cc: Eric Nelson
> Subject: Re: [U-Boot] [PATCH 4/6] mmc: Continue polling MMC card for OCR
> only if it is still not ready
> 
> [skipped]
> 
> Here's another patch that solves the problem a little earlier. It has this
> disadvantage of being slightly bigger, though it makes the code look
better.
> 
> https://github.com/boundarydevices/u-boot-imx6/commit/c0260ca
> 

I have a couple of doubts regarding that patch.

First, my personal taste objects to such duplicating of the code
(I mean setting of version, ocr, rca, etc fields of mmc structure).
If we'll have to change or add anything to these settings, we'll have to
make
the same change in 2 different place, which is error-prone and extremely
inconvenient from maintenance point of view.

Second, what about SPI mode? Doesn't this patch skip retrieving of OCR
register
with a special command for SPI host case (thus setting ocr field
incorrectly),
if the card comes to ready state with the first attempt?

Thanks.

Best regards,
Andrew


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


Re: [U-Boot] [PATCH] mmc: fix OCR Polling

2015-03-23 Thread Andrew Gabbasov
Hi Peng,

> From: Peng Fan [mailto:peng@freescale.com]
> Sent: Saturday, March 21, 2015 1:34 PM
> To: Gabbasov, Andrew; u-boot@lists.denx.de
> Subject: Re: [U-Boot] [PATCH] mmc: fix OCR Polling
> 
> [skipped]
> 
> > After this patch, if the busy flag is indeed already set (so that the
> > loop body is not executed), and it is not an SPI case
> > (mmc_host_is_spi(mmc) is false), the "cmd" structure (which is local
> > to mmc_complete_op_cond() function) is left uninitialized, and using
> > cmd.response[0] later in the function becomes incorrect. And the OCR
> > register value and the high capacity flag may be set incorrectly.
> Yeah. you are right.
> Maybe the following piece of code should be added to replace mmc->ocr =
> cmd.response[0]:
> "
> if (mmc_host_is_spi(mmc))
>  mmc->ocr = cmd.response[0];
> else
>  mmc->ocr = mmc->op_cond_response;
> "
> Thanks for correcting me.

Well, there can be several ways to correct that. The easiest would be
something
similar to what you propose, but, just to avoid extra "if", we could add
mmc->op_cond_response = cmd.response[0];
to the end of existing "if(mmc_host_is_spi(mmc))" and change
mmc->ocr = cmd.response[0];
to
mmc->ocr = mmc->op_cond_response;
at the end of function. Since op_cond_response should be already set from
the function beginning, this can be used immediately.

And, going further, since op_cond_response is actually the same contents
as mmc->ocr, we could combine them and use mmc->ocr at once, from
the beginning of polling loops. This is a little more complex, but makes
the code cleaner. This is what is done in one of other patches in my series
;-)

Thanks.

Best regards,
Andrew


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


Re: [U-Boot] question about software i2c multi instance

2015-03-23 Thread Lukasz Majewski
Hi Bo,

> Hi Heiko,
>After check the software i2c code, I found it can not support
> multi instances, although it has I2C_SOFT_DECLARATIONS2, 
> I2C_SOFT_DECLARATIONS3, I2C_SOFT_DECLARATIONS4.
>Because, when do GPIO operation, there is only one pair of 
> CONFIG_SOFT_I2C_GPIO_SCL and CONFIG_SOFT_I2C_GPIO_SDA.
>So, if want to support multi instances, it needs to extend the
> GPIO configuration for SCL/SDA, am I right?

Some time ago we had a similar problem with SW I2C code. Please look
into Samsung's trats board implementation.

However, such approach might be outdated, since Przemek is working on
porting this functionality to device model:

https://patchwork.ozlabs.org/patch/448460/

> 
>Thanks.
> 
> Best Regards,
> Bo Shen



-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] power: pfuze100 correct macro definition

2015-03-23 Thread Przemyslaw Marczak

Hello Peng,

On 03/23/2015 08:34 AM, Peng Fan wrote:

Correct the macro PFUZE100_SW1ABC_SETP definition. We should
add parenthese for 'x'.

Signed-off-by: Peng Fan 
---
  include/power/pfuze100_pmic.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
index 07199b4..9c749ed 100644
--- a/include/power/pfuze100_pmic.h
+++ b/include/power/pfuze100_pmic.h
@@ -61,7 +61,7 @@ enum {
   * Buck Regulators
   */

-#define PFUZE100_SW1ABC_SETP(x)((x - 3000) / 250)
+#define PFUZE100_SW1ABC_SETP(x)(((x) - 3000) / 250)

  /* SW1A/B/C Output Voltage Configuration */
  #define SW1x_0_300V 0



Acked-by: Przemyslaw Marczak 

best regards,
--
Przemyslaw Marczak
Samsung R&D 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] question about software i2c multi instance

2015-03-23 Thread Bo Shen

Hi Lukasz,

On 03/23/2015 04:28 PM, Lukasz Majewski wrote:

Hi Bo,


Hi Heiko,
After check the software i2c code, I found it can not support
multi instances, although it has I2C_SOFT_DECLARATIONS2,
I2C_SOFT_DECLARATIONS3, I2C_SOFT_DECLARATIONS4.
Because, when do GPIO operation, there is only one pair of
CONFIG_SOFT_I2C_GPIO_SCL and CONFIG_SOFT_I2C_GPIO_SDA.
So, if want to support multi instances, it needs to extend the
GPIO configuration for SCL/SDA, am I right?


Some time ago we had a similar problem with SW I2C code. Please look
into Samsung's trats board implementation.

However, such approach might be outdated, since Przemek is working on
porting this functionality to device model:

https://patchwork.ozlabs.org/patch/448460/


Thanks for your information.
Now, I just do it as following to make it work. For next step, I will 
try to switch to use DM.


--->8---
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index db9b402..b9cfbb8 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -126,6 +126,13 @@ DECLARE_GLOBAL_DATA_PTR;
 #define PRINTD(fmt,args...)
 #endif

+#ifdef I2C_READ_ADAP
+static int soft_i2c_read_sda(void)
+{
+   I2C_READ_ADAP;
+}
+#endif
+
 /*---
  * Local functions
  */
@@ -256,7 +263,11 @@ static int write_byte(uchar data)
I2C_SCL(1);
I2C_DELAY;
I2C_DELAY;
+#ifdef I2C_READ_ADAP
+   nack = soft_i2c_read_sda();
+#else
nack = I2C_READ;
+#endif
I2C_SCL(0);
I2C_DELAY;
I2C_ACTIVE;
@@ -286,7 +297,11 @@ static uchar read_byte(int ack)
I2C_SCL(1);
I2C_DELAY;
data <<= 1;
+#ifdef I2C_READ_ADAP
+   data |= soft_i2c_read_sda();
+#else
data |= I2C_READ;
+#endif
I2C_DELAY;
}
send_ack(ack);
---8<---

Thanks again.

Best Regards,
Bo Shen

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


Re: [U-Boot] [PATCH 1/3] dm: i2c soft: enable driver model for software i2c driver

2015-03-23 Thread Lukasz Majewski
Hi Przemyslaw,

> This change adds driver model support to software emulated
> i2c bus driver. To bind the driver, proper device-tree node
> must be defined, with the following attributes:
> - alias: to keep proper bus order
> - compatible: 'soft-i2c'
> - clock-frequency [Hz]
> - clock-pin, data-pin: gpio phandles
> 
> /* Define the alias number to keep bus numbering order */
> aliases {
>   [...]
>   i2c5 = "/i2c@1350";
>   i2c6 = "/soft-i2c@1";
>   [...]
> };
> 
> /* Define the basic bus attributes */
> soft-i2c@1 {
>   #address-cells = <1>;
>   #size-cells = <0>;
>   compatible = "soft-i2c";
>   clock-frequency = <5>;
> 
>   /* Define the proper GPIO pins */
>   clock-pin = <&gpa0 0 GPIO_ACTIVE_HIGH>;
>   data-pin = <&gpa0 1 GPIO_ACTIVE_HIGH>;
> 
>   /* Optionally, define some driver node (bus child) */
>   somedev@0x44 {
>   compatible = "somedev";
>   reg = <0x44>;
>   [...]
>   };
> };
> 
> The device can be accessed by the i2c command:
>  i2c dev 8   (bus number set by alias)
>  i2c probe <0x44>(address is optionally)
>  i2c md 0x44 0x0 (dump dev registers at address 0x0)
>  Valid chip addresses: 0x44  (success!)
>  ...
> 
> The previous driver functionality stays unchanged. Driving the bus
> lines is done by dm gpio calls in the preprocessor macros. Each, can
> be redefined by the user as previous.
> 
> Tested on Trats2 and Odroid U3.
> 
> Signed-off-by: Przemyslaw Marczak 
> Cc: Masahiro Yamada 
> Cc: Mike Frysinger 
> Cc: Simon Glass 
> Cc: Heiko Schocher 
> ---
>  drivers/i2c/Makefile   |   1 +
>  drivers/i2c/soft_i2c.c | 410
> +++-- 2 files changed,
> 400 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
> index 774bc94..7039b6d 100644
> --- a/drivers/i2c/Makefile
> +++ b/drivers/i2c/Makefile
> @@ -6,6 +6,7 @@
>  #
>  obj-$(CONFIG_DM_I2C) += i2c-uclass.o
>  obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o
> +obj-$(CONFIG_DM_I2C_SOFT) += soft_i2c.o
>  
>  obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o
>  obj-$(CONFIG_I2C_MV) += mv_i2c.o
> diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
> index db9b402..7afae0b 100644
> --- a/drivers/i2c/soft_i2c.c
> +++ b/drivers/i2c/soft_i2c.c
> @@ -1,4 +1,7 @@
>  /*
> + * (C) Copyright 2015, Samsung Electronics
> + * Przemyslaw Marczak 
> + *
>   * (C) Copyright 2009
>   * Heiko Schocher, DENX Software Engineering, h...@denx.de.
>   * Changes for multibus/multiadapter I2C support.
> @@ -14,6 +17,11 @@
>   */
>  
>  #include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
>  #ifdef   CONFIG_MPC8260  /* only valid
> for MPC8260 */ #include 
>  #include 
> @@ -32,11 +40,9 @@
>  #if defined(CONFIG_MPC852T) || defined(CONFIG_MPC866)
>  #include 
>  #endif
> -#include 
>  
> +#if defined(CONFIG_SYS_I2C)
>  #if defined(CONFIG_SOFT_I2C_GPIO_SCL)
> -# include 
> -
>  # ifndef I2C_GPIO_SYNC
>  #  define I2C_GPIO_SYNC
>  # endif
> @@ -85,6 +91,7 @@
>  # endif
>  
>  #endif
> +#endif
>  
>  /* #define   DEBUG_I2C   */
>  
> @@ -109,6 +116,65 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define CONFIG_SYS_I2C_SOFT_SLAVE CONFIG_SYS_I2C_SLAVE
>  #endif
>  
> +/* DM SOFT I2C */
> +#ifdef CONFIG_DM_I2C_SOFT
> +# ifndef I2C_GPIO_SYNC
> +#  define I2C_GPIO_SYNC(gpio)
> +# endif
> +
> +# ifndef I2C_INIT
> +#  define I2C_INIT(scl, sda)  \
> + do { } while (0)
> +# endif
> +
> +# ifndef I2C_ACTIVE
> +#  define I2C_ACTIVE(sda) \
> + do { } while (0)
> +# endif
> +
> +# ifndef I2C_TRISTATE
> +#  define I2C_TRISTATE(sda) \
> + do { } while (0)
> +# endif
> +
> +# ifndef I2C_READ
> +#  define I2C_READ(sda) dm_gpio_get_value(sda);
> +# endif
> +
> +# ifndef I2C_SDA
> +#  define I2C_SDA(sda, bit) \
> + do { \
> + if (bit) { \
> + sda->flags &= ~GPIOD_IS_OUT; \
> + sda->flags |= GPIOD_IS_IN; \
> + dm_gpio_set_dir(sda); \
> + } else { \
> + sda->flags &= ~GPIOD_IS_IN; \
> + sda->flags |= GPIOD_IS_OUT; \
> + dm_gpio_set_dir(sda); \
> + dm_gpio_set_value(sda, 0); \
> + } \
> + I2C_GPIO_SYNC(sda); \
> + } while (0)
> +# endif
> +
> +# ifndef I2C_SCL
> +#  define I2C_SCL(scl, bit) \
> + do { \
> + scl->flags &= ~GPIOD_IS_IN; \
> + scl->flags |= GPIOD_IS_OUT; \
> + dm_gpio_set_dir(scl); \
> + dm_gpio_set_value(scl, bit); \
> + I2C_GPIO_SYNC(scl); \
> + } while (0)
> +# endif
> +
> +# ifndef I2C_DELAY
> +#  define I2C_DELAY(us) udelay(us)   /* 1/4 I2C clock duration
> */ +# endif
> +
> +#endif /* CONFIG_DM_I2C_SOFT */
> +
>  /*---
>   * Definitions
>   */
> @@ -117,7 +183,6 @@ DECLARE_GLOBAL_DATA_PTR;

Re: [U-Boot] [PATCH v6 2/8] lpc32xx: mtd: nand: add MLC NAND controller

2015-03-23 Thread Albert ARIBAUD
Bonjour Scott,

Le Fri, 20 Mar 2015 17:41:11 -0500, Scott Wood
 a écrit :

> On Fri, 2015-03-20 at 10:35 +0100, Albert ARIBAUD wrote:
> > Hi Scott,
> > 
> > Le Thu, 19 Mar 2015 16:39:42 -0500, Scott Wood
> >  a écrit :
> > 
> > > On Wed, 2015-03-18 at 10:04 +0100, Albert ARIBAUD (3ADEV) wrote:
> > > > +int nand_spl_load_image(uint32_t offs, unsigned int size, void *dst)
> > > > +{
> > > > +   int block_good;
> > > 
> > > bool?
> > > 
> > > > +   struct lpc32xx_oob oob;
> > > > +   unsigned int page, left;
> > > > +
> > > > +   /* if starting mid-block consider block good */
> > > > +   block_good = 1;
> > > > +
> > > > +   for (page = offs / BYTES_PER_PAGE,
> > > > +left = DIV_ROUND_UP(size, BYTES_PER_PAGE);
> > > > +left && (page < PAGES_PER_CHIP_MAX); page++) {
> > > > +   /* read inband and oob page data anyway */
> > > > +   int res = read_single_page(dst, page, &oob);
> > > > +   /* return error if a good block's page was not readable 
> > > > */
> > > > +   if ((res < 0) && block_good)
> > > > +   return -1;
> > > 
> > > Why even try to read it if it's been marked bad?
> > 
> > Actually, at this point, we may not know yet if the block is good or
> > bad, since we might be reading a page of it for the first time. Will
> > fix, see below.
> > 
> > > > +   /* if first page in a block, update 'block good' status 
> > > > */
> > > 
> > > The non-SPL driver appears to be checking the last two pages in the
> > > block, not the first page.
> > 
> > Thanks for pointing out this discrepancy.
> > 
> > I took the first page option here after checking the NAND's datasheet,
> > which says that for factory bad block marking at least, while all pages
> > in a bad block /should/ bear the bad block marker, only the first one is
> > /guaranteed/ to have it. The driver might have inherited the 'last page'
> > option from the previous NAND chip used, or from a mistake of my own.
> 
> Are there any plans for this controller to be used with different chips?

Not that I know; but in the same vein, the current LPC32XX maintainer
did not consider there were any plans for a few devices in it, and then
came my patch series :) so I cannot rule out that someday a new LPC32XX
board pops up in U-Boot with another NAND device.

> > BTW, is there a standard way to ask a NAND chip which page(s) in a bad
> > block should be checked?
> 
> Yes and no:
> http://lists.infradead.org/pipermail/linux-mtd/2011-November/038419.html

... right.

How about this: the driver expects a driver-specific configuration
option which tells it which page(s) in a block, and which byte in a
page's OOB area, should be scanned for bad block markers, and "my"
board provides a value for said option.

This way, when the driver is used with a new NAND chip in another
board, it can be configured for this board's specific case.  

> > > > +   if ((page % PAGES_PER_BLOCK) == 0) {
> > > > +   /* assume block is good */
> > > > +   block_good = 1;
> > > > +   /* if page could not be read, assume block is 
> > > > bad */
> > > > +   if (res < 0)
> > > > +   block_good = 0;
> > > 
> > > No.  A block is to be skipped if and only if it has a bad block marker.
> > > ECC errors should not be silently ignored just because they happen on
> > > the first page of a block.  If the writer of this data didn't skip the
> > > block, then skipping it when reading will result in unusable data
> > > regardless of the underlying ECC problem.
> > 
> > You're correct of course.
> > 
> > However, I do want the SPL chainloading to be as resilient as
> > possible, and we have established that it will have to read some part
> > of a bad block -- possibly resulting in a read failure -- before
> > knowing that the block is bad, which means it may have to finally
> > ignore the read failure.
> 
> FWIW, the eLBC/IFC SPL functions have the same problem regarding halting
> on an ECC error before checking the bad block status.  Instead it should
> return an error code, and let the caller halt after it's sure it's not
> marked bad.

Maybe we could generalize an SPL chainloading common/spl/spl.c routine
and have boards /SoCs only provide the hardware-specific page/OOB read
function(s) ? Honestly, that would be way beyond my scope for this
patch series.
 
> > I guess I could wait to declare the block good or bad until I could
> > read at least one if its pages (actually, one of its pages' OOB data)
> > properly, only bail out if the OOB says the block is supposed to be
> > good.
> >
> > Now, if none of the block's pages could be read, this still prevents us
> > from knowing whether these read failures are catastrophic.
> >
> > If the block was actually bad and skipped, then the resulting image
> > might be intact, will pass the checksum test, and will run; if 

Re: [U-Boot] [PATCH 2/3] Kconfig: i2c: remove wrong help message related to dm i2c

2015-03-23 Thread Lukasz Majewski
Hi Przemyslaw,

> Signed-off-by: Przemyslaw Marczak 
> Cc: Masahiro Yamada 
> Cc: Mike Frysinger 
> Cc: Simon Glass 
> Cc: Heiko Schocher 
> ---
>  drivers/i2c/Kconfig | 11 +--
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
> index 692810d..0a52ed9 100644
> --- a/drivers/i2c/Kconfig
> +++ b/drivers/i2c/Kconfig
> @@ -2,16 +2,7 @@ config DM_I2C
>   bool "Enable Driver Model for I2C drivers"
>   depends on DM
>   help
> -   Enable driver model for I2C. This SPI flash interface
> -   (spi_flash_probe(), spi_flash_write(), etc.) is then
> -   implemented by the SPI flash uclass. There is one standard
> -   SPI flash driver which knows how to probe most chips
> -   supported by U-Boot. The uclass interface is defined in
> -   include/spi_flash.h, but is currently fully compatible
> -   with the old interface to avoid confusion and duplication
> -   during the transition parent. SPI and SPI flash must be
> -   enabled together (it is not possible to use driver model
> -   for one and not the other).
> +   Enable driver model for I2C.
>  
>  config DM_I2C_COMPAT
>   bool "Enable I2C compatibility layer"

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] Kconfig: i2c: add entry for driver-model software i2c

2015-03-23 Thread Lukasz Majewski
Hi Przemyslaw,

> Signed-off-by: Przemyslaw Marczak 
> Cc: Masahiro Yamada 
> Cc: Mike Frysinger 
> Cc: Simon Glass 
> Cc: Heiko Schocher 
> ---
>  drivers/i2c/Kconfig | 43 +++
>  1 file changed, 43 insertions(+)
> 
> diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
> index 0a52ed9..dd7eb3c 100644
> --- a/drivers/i2c/Kconfig
> +++ b/drivers/i2c/Kconfig
> @@ -13,6 +13,49 @@ config DM_I2C_COMPAT
> to convert all code for a board in a single commit. It
> should not be enabled for any board in an official release.
>  
> +config DM_I2C_SOFT
> + bool "Enable Driver Model for Software I2C Driver"
> + depends on DM_I2C
> + help
> +   Enable the i2c bus driver emulation by using GPIO.
> +   The bus configuration is given by the device-tree, like
> below. +
> +   /* First, define the alias number to have continuous bus
> numbering */
> +   aliases {
> + [...]
> + i2c5 = "/i2c@1350";
> + i2c6 = "/soft-i2c@1";
> + [...]
> +   }
> +
> +   /* And next define the basic bus attributes */
> +   soft-i2c@1 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "soft-i2c";
> + clock-frequency = <5>;
> + /* Define the proper GPIO pins */
> + clock-pin = <&gpa0 0 GPIO_ACTIVE_HIGH>;
> + data-pin = <&gpa0 1 GPIO_ACTIVE_HIGH>;
> +
> + /* Optionally, define some driver node (bus child) */
> + somedev@0x44 {
> + compatible = "somedev";
> + reg = <0x44>;
> + [...]
> + };
> +   }
> +
> +   The device can be accessed by the i2c command:
> +   # i2c dev 8   (bus number set by alias)
> +   # i2c probe <0x44>(address is optionally)
> +   # i2c md 0x44 0x0 (dump dev registers at
> address 0x0)
> +   # Valid chip addresses: 0x44  (success!)
> +   ...
> +
> +   Driving the bus lines is done by dm gpio calls in the
> preprocessor
> +   macros. Each, can be redefined by the user.
> +
>  config SYS_I2C_UNIPHIER
>   bool "UniPhier I2C driver"
>   depends on ARCH_UNIPHIER && DM_I2C

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] question about software i2c multi instance

2015-03-23 Thread Przemyslaw Marczak

Hello Bo,


On 03/23/2015 09:36 AM, Bo Shen wrote:

Hi Lukasz,

On 03/23/2015 04:28 PM, Lukasz Majewski wrote:

Hi Bo,


Hi Heiko,
After check the software i2c code, I found it can not support
multi instances, although it has I2C_SOFT_DECLARATIONS2,
I2C_SOFT_DECLARATIONS3, I2C_SOFT_DECLARATIONS4.
Because, when do GPIO operation, there is only one pair of
CONFIG_SOFT_I2C_GPIO_SCL and CONFIG_SOFT_I2C_GPIO_SDA.
So, if want to support multi instances, it needs to extend the
GPIO configuration for SCL/SDA, am I right?


Some time ago we had a similar problem with SW I2C code. Please look
into Samsung's trats board implementation.

However, such approach might be outdated, since Przemek is working on
porting this functionality to device model:

https://patchwork.ozlabs.org/patch/448460/


Thanks for your information.
Now, I just do it as following to make it work. For next step, I will
try to switch to use DM.

--->8---
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index db9b402..b9cfbb8 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -126,6 +126,13 @@ DECLARE_GLOBAL_DATA_PTR;
  #define PRINTD(fmt,args...)
  #endif

+#ifdef I2C_READ_ADAP
+static int soft_i2c_read_sda(void)
+{
+   I2C_READ_ADAP;
+}
+#endif
+
  /*---
   * Local functions
   */
@@ -256,7 +263,11 @@ static int write_byte(uchar data)
 I2C_SCL(1);
 I2C_DELAY;
 I2C_DELAY;
+#ifdef I2C_READ_ADAP
+   nack = soft_i2c_read_sda();
+#else
 nack = I2C_READ;
+#endif
 I2C_SCL(0);
 I2C_DELAY;
 I2C_ACTIVE;
@@ -286,7 +297,11 @@ static uchar read_byte(int ack)
 I2C_SCL(1);
 I2C_DELAY;
 data <<= 1;
+#ifdef I2C_READ_ADAP
+   data |= soft_i2c_read_sda();
+#else
 data |= I2C_READ;
+#endif
 I2C_DELAY;
 }
 send_ack(ack);
---8<---

Thanks again.

Best Regards,
Bo Shen




Please look into the Trats2 board code in:

board/samsung/trats2/trats2.c lines 130-145
include/configs/trats2.h lines 180-185

It doesn't require i2c driver modifications. But anyway I recommend to 
use the code of my patches, which Lukasz mentioned.


Best regards,
--
Przemyslaw Marczak
Samsung R&D 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 v2 1/1] ARM: DRA7XX: Add config file for Android with fastboot support

2015-03-23 Thread Lukasz Majewski
Hi Dileep,

>   - Added new configuration for Android fastboot
>   - This is based on following patch modified accordingly
> http://git.omapzoom.org/?p=repo/u-boot.git;a=commit;h=b2e04f92b5d91c708b6fd6b79d2266966ac51f4b
> 
> Signed-off-by: Angela Stegmaier 
> Signed-off-by: Dileep Katta 
> ---
> Changes in v2:
>   - Merged the header file content to existing dra7xx_evm.h to
> avoid duplication
>   - Removed unnecessary definitions as per comments
> 
>  board/ti/dra7xx/MAINTAINERS  |  1 +
>  configs/dra7xx_evm_android_defconfig |  5 +
>  include/configs/dra7xx_evm.h | 30
> ++ 3 files changed, 36 insertions(+)
>  create mode 100644 configs/dra7xx_evm_android_defconfig
> 
> diff --git a/board/ti/dra7xx/MAINTAINERS b/board/ti/dra7xx/MAINTAINERS
> index 5ec6769..1b5ae71 100644
> --- a/board/ti/dra7xx/MAINTAINERS
> +++ b/board/ti/dra7xx/MAINTAINERS
> @@ -6,3 +6,4 @@ F:include/configs/dra7xx_evm.h
>  F:   configs/dra7xx_evm_defconfig
>  F:   configs/dra7xx_evm_qspiboot_defconfig
>  F:   configs/dra7xx_evm_uart3_defconfig
> +F:   configs/dra7xx_evm_android_defconfig
> diff --git a/configs/dra7xx_evm_android_defconfig
> b/configs/dra7xx_evm_android_defconfig new file mode 100644
> index 000..5fdce85
> --- /dev/null
> +++ b/configs/dra7xx_evm_android_defconfig
> @@ -0,0 +1,5 @@
> +CONFIG_SPL=y
> +CONFIG_SYS_EXTRA_OPTIONS="CONS_INDEX=1,DRA7XX_ANDROID"
> ++S:CONFIG_ARM=y
> ++S:CONFIG_OMAP54XX=y
> ++S:CONFIG_TARGET_DRA7XX_EVM=y
> diff --git a/include/configs/dra7xx_evm.h
> b/include/configs/dra7xx_evm.h index dee2b11..dd20e08 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -43,6 +43,16 @@
>   "uuid_disk=${uuid_gpt_disk};" \
>   "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}"
>  
> +#ifdef CONFIG_DRA7XX_ANDROID
> +/* Fastboot */
> +#define CONFIG_CMD_FASTBOOT
> +#define CONFIG_ANDROID_BOOT_IMAGE
> +#define CONFIG_USB_FASTBOOT_BUF_ADDRCONFIG_SYS_LOAD_ADDR
> +#define CONFIG_USB_FASTBOOT_BUF_SIZE0x2F00
> +#define CONFIG_FASTBOOT_FLASH
> +#define CONFIG_FASTBOOT_FLASH_MMC_DEV   1
> +#endif
> +
>  #include 
>  
>  /* Enhance our eMMC support / experience. */
> @@ -115,7 +125,11 @@
>  #define CONFIG_SPL_SPI_SUPPORT
>  #define CONFIG_SPL_SPI_LOAD
>  #define CONFIG_SPL_SPI_FLASH_SUPPORT
> +#ifdef CONFIG_DRA7XX_ANDROID
> +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8
> +#else
>  #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x4
> +#endif
>  
>  #define CONFIG_SUPPORT_EMMC_BOOT
>  
> @@ -130,6 +144,22 @@
>  #define CONFIG_OMAP_USB_PHY
>  #define CONFIG_OMAP_USB2PHY2_HOST
>  
> +/* USB GADGET */
> +#define CONFIG_USB_GADGET
> +#define CONFIG_MUSB_GADGET
> +#define CONFIG_MUSB_PIO_ONLY
> +#define CONFIG_USBDOWNLOAD_GADGET
> +#define CONFIG_USB_GADGET_VBUS_DRAW 2
> +#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
> +#ifdef CONFIG_CMD_FASTBOOT
> +#define CONFIG_G_DNL_VENDOR_NUM 0x0451
> +#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
> +#else
> +#define CONFIG_G_DNL_VENDOR_NUM 0x0403
> +#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
> +#endif
> +#define CONFIG_USB_GADGET_DUALSPEED
> +
>  /* SATA */
>  #define CONFIG_BOARD_LATE_INIT
>  #define CONFIG_CMD_SCSI

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] question about software i2c multi instance

2015-03-23 Thread Bo Shen

Hi Przemyslaw Marczak,

On 03/23/2015 04:47 PM, Przemyslaw Marczak wrote:




Please look into the Trats2 board code in:

board/samsung/trats2/trats2.c lines 130-145
include/configs/trats2.h lines 180-185

It doesn't require i2c driver modifications. But anyway I recommend to
use the code of my patches, which Lukasz mentioned.


Thanks for your information. I will try this method.
Thanks again.


Best regards,
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marc...@samsung.com


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


Re: [U-Boot] [PATCH] fastboot: check for alias when looking up partition by name

2015-03-23 Thread Lukasz Majewski
Hi Steve,

> Hi Lukasz,
> 
> On 15-03-20 12:50 AM, Lukasz Majewski wrote:
> > Hi Steve,
> >
> >>
> >>
> >> On 15-03-12 10:17 AM, Michael Scott wrote:
> >>>
> >>> On 03/12/2015 09:23 AM, Steve Rae wrote:
> 
> [... snip ...]
> 
>  An interesting feature (which seems unnecessary to me...)
>  However,
> >>> A bit of background:
> >>>
> >>> We are using fastboot support on Nvidia Jetson-TK1 platform where
> >>> a GPT limitation sets partition names to 3 letters.
> >>>
> >>> IE: LNX = boot, APP = system and UDA = userdata.
> >> OK -- then this patch makes much more sense!
> >> - so when the user performs "mmc part", (I'm assuming it will list
> >> the "3 letter names"), then they perform "fastboot flash LNX
> >> boot.bin" (which makes sense to me)
> >> - or they can setup these aliases and perform "fastboot flash boot
> >> boot.bin" (I would probably stick with the former myself...)
> >> Thanks, Steve
> >>>
> >>> To present a "normal" fastboot experience to users, we use this
> >>> patch.
> >>>
>  Acked-by: Steve Rae 
> >>>
> >>> Thank you for the Ack!
> >
> > Are there more comments for this patch?
> >
> 
> No - the feature is OK
> (personally - I would use the names that match what "mmc part"
> displays; so I don't think that I would create any aliases)
> 
> Acked-by: Steve Rae 

Applied to u-boot-dfu tree. Thanks!

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] fastboot: add support for reboot-bootloader command

2015-03-23 Thread Lukasz Majewski
Hi Steve,

> 
> 
> On 15-02-25 06:10 AM, Alexey Firago wrote:
> > The "fastboot reboot-bootloader" command is defined to
> > re-enter into fastboot mode after rebooting into
> > bootloader. This command is usually used after updating
> > bootloader via fastboot.
> >
> > This commit implements only a generic side of the
> > command - setting of the reset flag and then resetting.
> > Setting of the reset flag is implemented using __weak
> > fb_set_reboot_flag() function. The actual setting and
> > checking of the reset flag should be implemented by
> > a boot script and/or board/SoC specific code.
> >
> > Signed-off-by: Alexey Firago 
> > ---
> >
> > Changes in v3:
> > - return -ENOSYS from default fb_set_reboot_flag()
> >
> > Changes in v2:
> > - return error in default fb_set_reboot_flag()
> >
> >   drivers/usb/gadget/f_fastboot.c | 13 +
> >   1 file changed, 13 insertions(+)
> >
> > diff --git a/drivers/usb/gadget/f_fastboot.c
> > b/drivers/usb/gadget/f_fastboot.c index 310175a..a000c25 100644
> > --- a/drivers/usb/gadget/f_fastboot.c
> > +++ b/drivers/usb/gadget/f_fastboot.c
> > @@ -122,6 +122,7 @@ static struct usb_gadget_strings
> > *fastboot_strings[] = { };
> >
> >   static void rx_handler_command(struct usb_ep *ep, struct
> > usb_request *req); +static int strcmp_l1(const char *s1, const char
> > *s2);
> >
> >   static void fastboot_complete(struct usb_ep *ep, struct
> > usb_request *req) {
> > @@ -317,8 +318,20 @@ static void compl_do_reset(struct usb_ep *ep,
> > struct usb_request *req) do_reset(NULL, 0, 0, NULL);
> >   }
> >
> > +int __weak fb_set_reboot_flag(void)
> > +{
> > +   return -ENOSYS;
> > +}
> > +
> >   static void cb_reboot(struct usb_ep *ep, struct usb_request *req)
> >   {
> > +   char *cmd = req->buf;
> > +   if (!strcmp_l1("reboot-bootloader", cmd)) {
> > +   if (fb_set_reboot_flag()) {
> > +   fastboot_tx_write_str("FAILCannot set
> > reboot flag");
> > +   return;
> > +   }
> > +   }
> > fastboot_func->in_req->complete = compl_do_reset;
> > fastboot_tx_write_str("OKAY");
> >   }
> >
> 
> Tested-by: Steve Rae 
> 
> (on bcm28155_ap board)
> Thanks!

Applied to u-boot-dfu tree. Thanks!

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] usb: ci_udc: fix warnings on 64-bit builds

2015-03-23 Thread Lukasz Majewski
Hi Rob,

> Change addresses to unsigned long to be compatible with 64-bit builds.
> Regardless of fixing warnings, the device is still only 32-bit
> capable.
> 
> Signed-off-by: Rob Herring 
> Cc: "Łukasz Majewski" 
> Cc: Marek Vasut 
> ---
>  drivers/usb/gadget/ci_udc.c | 42
> +- 1 file changed, 21
> insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index b0ef35e..a231abf 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -160,8 +160,8 @@ static struct ept_queue_item *ci_get_qtd(int
> ep_num, int dir_in) static void ci_flush_qh(int ep_num)
>  {
>   struct ept_queue_head *head = ci_get_qh(ep_num, 0);
> - const uint32_t start = (uint32_t)head;
> - const uint32_t end = start + 2 * sizeof(*head);
> + const unsigned long start = (unsigned long)head;
> + const unsigned long end = start + 2 * sizeof(*head);
>  
>   flush_dcache_range(start, end);
>  }
> @@ -175,8 +175,8 @@ static void ci_flush_qh(int ep_num)
>  static void ci_invalidate_qh(int ep_num)
>  {
>   struct ept_queue_head *head = ci_get_qh(ep_num, 0);
> - uint32_t start = (uint32_t)head;
> - uint32_t end = start + 2 * sizeof(*head);
> + unsigned long start = (unsigned long)head;
> + unsigned long end = start + 2 * sizeof(*head);
>  
>   invalidate_dcache_range(start, end);
>  }
> @@ -190,8 +190,8 @@ static void ci_invalidate_qh(int ep_num)
>  static void ci_flush_qtd(int ep_num)
>  {
>   struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
> - const uint32_t start = (uint32_t)item;
> - const uint32_t end = start + 2 * ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)item;
> + const unsigned long end = start + 2 * ILIST_ENT_SZ;
>  
>   flush_dcache_range(start, end);
>  }
> @@ -205,8 +205,8 @@ static void ci_flush_qtd(int ep_num)
>  static void ci_invalidate_qtd(int ep_num)
>  {
>   struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
> - const uint32_t start = (uint32_t)item;
> - const uint32_t end = start + 2 * ILIST_ENT_SZ;
> + const unsigned long start = (unsigned long)item;
> + const unsigned long end = start + 2 * ILIST_ENT_SZ;
>  
>   invalidate_dcache_range(start, end);
>  }
> @@ -308,8 +308,8 @@ static int ci_ep_disable(struct usb_ep *ep)
>  static int ci_bounce(struct ci_req *ci_req, int in)
>  {
>   struct usb_request *req = &ci_req->req;
> - uint32_t addr = (uint32_t)req->buf;
> - uint32_t hwaddr;
> + unsigned long addr = (unsigned long)req->buf;
> + unsigned long hwaddr;
>   uint32_t aligned_used_len;
>  
>   /* Input buffer address is not aligned. */
> @@ -343,7 +343,7 @@ align:
>   memcpy(ci_req->hw_buf, req->buf, req->length);
>  
>  flush:
> - hwaddr = (uint32_t)ci_req->hw_buf;
> + hwaddr = (unsigned long)ci_req->hw_buf;
>   aligned_used_len = roundup(req->length, ARCH_DMA_MINALIGN);
>   flush_dcache_range(hwaddr, hwaddr + aligned_used_len);
>  
> @@ -353,8 +353,8 @@ flush:
>  static void ci_debounce(struct ci_req *ci_req, int in)
>  {
>   struct usb_request *req = &ci_req->req;
> - uint32_t addr = (uint32_t)req->buf;
> - uint32_t hwaddr = (uint32_t)ci_req->hw_buf;
> + unsigned long addr = (unsigned long)req->buf;
> + unsigned long hwaddr = (unsigned long)ci_req->hw_buf;
>   uint32_t aligned_used_len;
>  
>   if (in)
> @@ -388,13 +388,13 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep) len = ci_req->req.length;
>  
>   item->info = INFO_BYTES(len) | INFO_ACTIVE;
> - item->page0 = (uint32_t)ci_req->hw_buf;
> - item->page1 = ((uint32_t)ci_req->hw_buf & 0xf000) +
> 0x1000;
> - item->page2 = ((uint32_t)ci_req->hw_buf & 0xf000) +
> 0x2000;
> - item->page3 = ((uint32_t)ci_req->hw_buf & 0xf000) +
> 0x3000;
> - item->page4 = ((uint32_t)ci_req->hw_buf & 0xf000) +
> 0x4000;
> + item->page0 = (unsigned long)ci_req->hw_buf;
> + item->page1 = ((unsigned long)ci_req->hw_buf & 0xf000) +
> 0x1000;
> + item->page2 = ((unsigned long)ci_req->hw_buf & 0xf000) +
> 0x2000;
> + item->page3 = ((unsigned long)ci_req->hw_buf & 0xf000) +
> 0x3000;
> + item->page4 = ((unsigned long)ci_req->hw_buf & 0xf000) +
> 0x4000; 
> - head->next = (unsigned) item;
> + head->next = (unsigned long)item;
>   head->info = 0;
>  
>   /*
> @@ -422,7 +422,7 @@ static void ci_ep_submit_next_request(struct
> ci_ep *ci_ep)
>* can use the other to transmit the extra
> zero-length packet. */
>   struct ept_queue_item *other_item = ci_get_qtd(num,
> 0);
> - item->next = (unsigned)other_item;
> + item->next = (unsigned long)other_item;
>   item = other_item;
>   item->info = INFO_ACTIVE;
>   }
> @@ -772,7 +772,7 @@ static int ci_pullup(struct usb_gadget *gadget,
> int is_on) writel(USBCMD

[U-Boot] [PATCH 1/5] armv8: semihosting: do not inline trap call

2015-03-23 Thread Linus Walleij
The semihosting trap call does not like being inlined, probably
because that will mean register reordering screwing up the return
value in r0, so tag this function "noinline".

Signed-off-by: Linus Walleij 
---
 arch/arm/lib/semihosting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index fd6d8573f560..d3f724b726e1 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -26,7 +26,7 @@
 /*
  * Call the handler
  */
-static long smh_trap(unsigned int sysnum, void *addr)
+static noinline long smh_trap(unsigned int sysnum, void *addr)
 {
register long result asm("r0");
 #if defined(CONFIG_ARM64)
-- 
1.9.3

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


[U-Boot] [PATCH 2/5] armv8: semihosting: add a command to load semihosted images

2015-03-23 Thread Linus Walleij
Instead of sprinkling custom code and calls over the Vexpress64
boardfile, create a command that loads images using semihosting
just like we would load from flash memory of over the network,
using a special command:

smhload  

This will make it possible to remove some custom calls and
code and make the boot easier.

Signed-off-by: Linus Walleij 
---
 arch/arm/lib/semihosting.c | 70 ++
 doc/README.semihosting | 25 -
 2 files changed, 75 insertions(+), 20 deletions(-)

diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index d3f724b726e1..edacb1187731 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -13,6 +13,7 @@
  * for them.
  */
 #include 
+#include 
 #include 
 
 #define SYSOPEN0x01
@@ -234,3 +235,72 @@ long smh_len(const char *fname)
/* Return the file length (or -1 error indication) */
return len;
 }
+
+static int smh_load_file(const char * const name, ulong load_addr,
+ulong *end_addr)
+{
+   long fd;
+   long len;
+   long ret;
+
+   fd = smh_open(name, "rb");
+   if (fd == -1)
+   return -1;
+
+   len = smh_len_fd(fd);
+   if (len < 0) {
+   smh_close(fd);
+   return -1;
+   }
+
+   ret = smh_read(fd, (void *)load_addr, len);
+   smh_close(fd);
+
+   if (ret == 0) {
+   *end_addr = load_addr + len - 1;
+   printf("loaded file %s from %08lX to %08lX, %08lX bytes\n",
+  name,
+  load_addr,
+  *end_addr,
+  len);
+   } else {
+   printf("read failed\n");
+   return 0;
+   }
+
+   return 0;
+}
+
+static int do_smhload(cmd_tbl_t *cmdtp, int flag, int argc, char * const 
argv[])
+{
+   if (argc == 3 || argc == 4) {
+   ulong load_addr;
+   ulong end_addr = 0;
+   ulong ret;
+   char end_str[64];
+
+   load_addr = simple_strtoul(argv[2], NULL, 16);
+   if (!load_addr)
+   return -1;
+
+   ret = smh_load_file(argv[1], load_addr, &end_addr);
+   if (ret < 0)
+   return 1;
+
+   /* Optionally save returned end to the environment */
+   if (argc == 4) {
+   sprintf(end_str, "0x%08lx", end_addr);
+   setenv(argv[3], end_str);
+   }
+   } else {
+   return CMD_RET_USAGE;
+   }
+   return 0;
+}
+
+U_BOOT_CMD(smhload, 4, 0, do_smhload, "load a file using semihosting",
+  " 0x [end var]\n"
+  "- load a semihosted file to the address specified\n"
+  "  if the optional [end var] is specified, the end\n"
+  "  address of the file will be stored in this environment\n"
+  "  variable.\n");
diff --git a/doc/README.semihosting b/doc/README.semihosting
index 724856078069..c016a4f8406d 100644
--- a/doc/README.semihosting
+++ b/doc/README.semihosting
@@ -30,25 +30,10 @@ vexpress_aemv8a.h but differentiate the two models by the 
presence or
 absence of CONFIG_BASE_FVP. This change is tested and works on both the
 Foundation and Base fastmodel simulators.
 
-The level of semihosting support is minimal, restricted to just what it
-takes to load images to memory. If more semihosting functionality is
-required, such as file seek, outputting strings, reading characters, etc,
-then it can be easily added later.
+The semihosting code adds a command:
 
-We require that the board include file define these env variables:
-- kernel_name  e.g. "uImage"
-- kernel_addr_re.g. "0x8000"
-- initrd_name  e.g. "ramdisk.img"
-- initrd_addr_re.g. "0x8800"
-- fdt_name e.g. "devtree.dtb"
-- fdt_addr_r   e.g. "0x8300"
+  smhload   [env var]
 
-Optionally, "fdt_high" and "initrd_high" can be specified as per
-their rules for allowing or preventing copying of these images.
-
-For the "fdt chosen" startup macro, this code will then define:
-- initrd_end (based on retrieving initrd_addr_r plus actual initrd_size)
-
-We will then load the kernel, initrd, and fdt into the specified
-locations in memory in a similar way that the ATF fastmodel code
-uses semihosting calls to load other boot stages and u-boot itself.
+That will load an image from the host filesystem into RAM at the specified
+address and optionally store the load end address in the specified
+environment variable.
-- 
1.9.3

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


[U-Boot] [PATCH 5/5] vexpress64: cut config and defaults for unclear variant

2015-03-23 Thread Linus Walleij
This variant that is neither FVP / Base Model or Juno Versatile
Express 64bit is confusing. Get rid of it unless someone can
point out what machine that really is. Seems to be an evolutional
artifact in the config base.

Signed-off-by: Linus Walleij 
---
 board/armltd/vexpress64/Kconfig   | 13 -
 configs/vexpress_aemv8a_defconfig |  3 ---
 include/configs/vexpress_aemv8a.h | 28 
 3 files changed, 4 insertions(+), 40 deletions(-)
 delete mode 100644 configs/vexpress_aemv8a_defconfig

diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig
index 7d5e7bee8b9a..f5693aebacc5 100644
--- a/board/armltd/vexpress64/Kconfig
+++ b/board/armltd/vexpress64/Kconfig
@@ -1,16 +1,3 @@
-if TARGET_VEXPRESS64_AEMV8A
-
-config SYS_BOARD
-   default "vexpress64"
-
-config SYS_VENDOR
-   default "armltd"
-
-config SYS_CONFIG_NAME
-   default "vexpress_aemv8a"
-
-endif
-
 if TARGET_VEXPRESS64_BASE_FVP
 
 config SYS_BOARD
diff --git a/configs/vexpress_aemv8a_defconfig 
b/configs/vexpress_aemv8a_defconfig
deleted file mode 100644
index 9f4b87655613..
--- a/configs/vexpress_aemv8a_defconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_ARM=y
-CONFIG_TARGET_VEXPRESS64_AEMV8A=y
-CONFIG_DEFAULT_DEVICE_TREE="vexpress64"
diff --git a/include/configs/vexpress_aemv8a.h 
b/include/configs/vexpress_aemv8a.h
index cda89d8ca814..027c7d1555ba 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -20,14 +20,6 @@
 
 #define CONFIG_REMAKE_ELF
 
-#if !defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) && \
-!defined(CONFIG_TARGET_VEXPRESS64_JUNO)
-/* Base FVP and Juno not using GICv3 yet */
-#define CONFIG_GICV3
-#endif
-
-/*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
-
 #define CONFIG_SUPPORT_RAW_INITRD
 
 /* Cache Definitions */
@@ -46,8 +38,7 @@
 #define CONFIG_SYS_TEXT_BASE   0xe000
 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
 #else
-#define CONFIG_SYS_TEXT_BASE   0x8000
-#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
+#error "Unknown board variant"
 #endif
 
 /* Flat Device Tree Definitions */
@@ -117,10 +108,9 @@
 #define GICD_BASE  (0x2C01)
 #define GICC_BASE  (0x2C02f000)
 #else
-#define GICD_BASE  (0x2C001000)
-#define GICC_BASE  (0x2C002000)
-#endif
+#error "Unknown board variant"
 #endif
+#endif /* !CONFIG_GICV3 */
 
 #define CONFIG_SYS_MEMTEST_START   V2M_BASE
 #define CONFIG_SYS_MEMTEST_END (V2M_BASE + 0x8000)
@@ -249,17 +239,7 @@
 #define CONFIG_BOOTDELAY   1
 
 #else
-
-#define CONFIG_EXTRA_ENV_SETTINGS  \
-   "kernel_addr_r=0x8000\0"\
-   "initrd_addr_r=0x8800\0"\
-   "fdt_addr_r=0x8300\0"   
\
-   "fdt_high=0xa000\0"
-
-#define CONFIG_BOOTARGS"console=ttyAMA0,115200n8 
root=/dev/ram0"
-#define CONFIG_BOOTCOMMAND "bootm $kernel_addr_r " \
-   "$initrd_addr_r:$initrd_size 
$fdt_addr_r"
-#define CONFIG_BOOTDELAY   -1
+#error "Unknown board variant"
 #endif
 
 /* Do not preserve environment */
-- 
1.9.3

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


[U-Boot] [PATCH 4/5] armv8: semihosting: delete external interface

2015-03-23 Thread Linus Walleij
Now that loading files using semihosting can be done using
a command in standard scripts, and we have rewritten the boardfile
and added it to the Vexpress64, let's delete the external
interface to the semihosting file retrieveal and rely solely
on these commands, and staticize them inside that file so the
whole business is self-contained.

Signed-off-by: Linus Walleij 
---
 arch/arm/include/asm/semihosting.h | 17 ---
 arch/arm/lib/semihosting.c | 92 --
 2 files changed, 109 deletions(-)
 delete mode 100644 arch/arm/include/asm/semihosting.h

diff --git a/arch/arm/include/asm/semihosting.h 
b/arch/arm/include/asm/semihosting.h
deleted file mode 100644
index 835ca7e4b683..
--- a/arch/arm/include/asm/semihosting.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 2014 Broadcom Corporation
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-#ifndef __SEMIHOSTING_H__
-#define __SEMIHOSTING_H__
-
-/*
- * ARM semihosting functions for loading images to memory. See the source
- * code for more information.
- */
-int smh_load(const char *fname, void *memp, int avail, int verbose);
-long smh_len(const char *fname);
-
-#endif /* __SEMIHOSTING_H__ */
diff --git a/arch/arm/lib/semihosting.c b/arch/arm/lib/semihosting.c
index edacb1187731..c3e964eabc13 100644
--- a/arch/arm/lib/semihosting.c
+++ b/arch/arm/lib/semihosting.c
@@ -14,7 +14,6 @@
  */
 #include 
 #include 
-#include 
 
 #define SYSOPEN0x01
 #define SYSCLOSE   0x02
@@ -145,97 +144,6 @@ static long smh_len_fd(long fd)
return ret;
 }
 
-/*
- * Open, load a file into memory, and close it. Check that the available space
- * is sufficient to store the entire file. Return the bytes actually read from
- * the file as seen by the read function. The verbose flag enables some extra
- * printing of successful read status.
- */
-int smh_load(const char *fname, void *memp, int avail, int verbose)
-{
-   long ret;
-   long fd;
-   size_t len;
-
-   ret = -1;
-
-   debug("%s: fname \'%s\', avail %u, memp %p\n", __func__, fname,
- avail, memp);
-
-   /* Open the file */
-   fd = smh_open(fname, "rb");
-   if (fd == -1)
-   return -1;
-
-   /* Get the file length */
-   ret = smh_len_fd(fd);
-   if (ret == -1) {
-   smh_close(fd);
-   return -1;
-   }
-
-   /* Check that the file will fit in the supplied buffer */
-   if (ret > avail) {
-   printf("%s: ERROR ret %ld, avail %u\n", __func__, ret,
-  avail);
-   smh_close(fd);
-   return -1;
-   }
-
-   len = ret;
-
-   /* Read the file into the buffer */
-   ret = smh_read(fd, memp, len);
-   if (ret == 0) {
-   /* Print successful load information if requested */
-   if (verbose) {
-   printf("\n%s\n", fname);
-   printf("0x%8p dest\n", memp);
-   printf("0x%08lx size\n", len);
-   printf("0x%08x avail\n", avail);
-   }
-   }
-
-   /* Close the file */
-   smh_close(fd);
-
-   return ret;
-}
-
-/*
- * Get the file length from the filename
- */
-long smh_len(const char *fname)
-{
-   long ret;
-   long fd;
-   long len;
-
-   debug("%s: file \'%s\'\n", __func__, fname);
-
-   /* Open the file */
-   fd = smh_open(fname, "rb");
-   if (fd < 0)
-   return fd;
-
-   /* Get the file length */
-   len = smh_len_fd(fd);
-   if (len < 0) {
-   smh_close(fd);
-   return len;
-   }
-
-   /* Close the file */
-   ret = smh_close(fd);
-   if (ret < 0)
-   return ret;
-
-   debug("%s: returning len %ld\n", __func__, len);
-
-   /* Return the file length (or -1 error indication) */
-   return len;
-}
-
 static int smh_load_file(const char * const name, ulong load_addr,
 ulong *end_addr)
 {
-- 
1.9.3

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


[U-Boot] [PATCH 3/5] vexpress64: remove board late init, use smhload

2015-03-23 Thread Linus Walleij
This removes the kludgy late board init from the FVP simulator
version of Versatile Express 64bit (ARMv8), and replace it with
a default boot command using the new smhload command to load
the files using semihosting. Tested on the Foundation Model.

Signed-off-by: Linus Walleij 
---
 board/armltd/vexpress64/vexpress64.c | 96 
 include/configs/vexpress_aemv8a.h| 18 ---
 2 files changed, 10 insertions(+), 104 deletions(-)

diff --git a/board/armltd/vexpress64/vexpress64.c 
b/board/armltd/vexpress64/vexpress64.c
index de6286435d97..876cb678eb03 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -33,101 +32,6 @@ void reset_cpu(ulong addr)
 {
 }
 
-#ifdef CONFIG_BOARD_LATE_INIT
-int board_late_init(void)
-{
-#ifdef CONFIG_SEMIHOSTING
-   /*
-* Please refer to doc/README.semihosting for a more complete
-* description.
-*
-* We require that the board include file defines these env variables:
-* - kernel_name
-* - kernel_addr_r
-* - initrd_name
-* - initrd_addr_r
-* - fdt_name
-* - fdt_addr_r
-*
-* For the "fdt chosen" startup macro, this code will then define:
-* - initrd_end (based on initrd_addr_r plus actual initrd_size)
-*
-* We will then load the kernel, initrd, and fdt into the specified
-* locations in memory in a similar way that the ATF fastmodel code
-* uses semihosting calls to load other boot stages and u-boot itself.
-*/
-
-   /* Env variable strings */
-   char *kernel_name = getenv("kernel_name");
-   char *kernel_addr_str = getenv("kernel_addr_r");
-   char *initrd_name = getenv("initrd_name");
-   char *initrd_addr_str = getenv("initrd_addr_r");
-   char *fdt_name = getenv("fdt_name");
-   char *fdt_addr_str = getenv("fdt_addr_r");
-   char initrd_end_str[64];
-
-   /* Actual addresses converted from env variables */
-   void *kernel_addr_r;
-   void *initrd_addr_r;
-   void *fdt_addr_r;
-
-   /* Actual initrd base and size */
-   unsigned long initrd_base;
-   unsigned long initrd_size;
-
-   /* Space available */
-   int avail;
-
-   /* Make sure the environment variables needed are set */
-   if (!(kernel_addr_str && initrd_addr_str && fdt_addr_str)) {
-   printf("%s: Define {kernel/initrd/fdt}_addr_r\n", __func__);
-   return -1;
-   }
-   if (!(kernel_name && initrd_name && fdt_name)) {
-   printf("%s: Define {kernel/initrd/fdt}_name\n", __func__);
-   return -1;
-   }
-
-   /* Get exact initrd_size */
-   initrd_size = smh_len(initrd_name);
-   if (initrd_size == -1) {
-   printf("%s: Can't get file size for \'%s\'\n", __func__,
-  initrd_name);
-   return -1;
-   }
-
-   /* Set initrd_end */
-   initrd_base = simple_strtoul(initrd_addr_str, NULL, 16);
-   initrd_addr_r = (void *)initrd_base;
-   sprintf(initrd_end_str, "0x%lx", initrd_base + initrd_size - 1);
-   setenv("initrd_end", initrd_end_str);
-
-   /* Load kernel to memory */
-   fdt_addr_r = (void *)simple_strtoul(fdt_addr_str, NULL, 16);
-   kernel_addr_r = (void *)simple_strtoul(kernel_addr_str, NULL, 16);
-
-   /*
-* The kernel must be lower in memory than fdt and loading the
-* kernel must not trample the fdt or vice versa.
-*/
-   avail = fdt_addr_r - kernel_addr_r;
-   if (avail < 0) {
-   printf("%s: fdt must be after kernel\n", __func__);
-   return -1;
-   }
-   smh_load(kernel_name, kernel_addr_r, avail, 1);
-
-   /* Load fdt to memory */
-   smh_load(fdt_name, fdt_addr_r, 0x2, 1);
-
-   /* Load initrd to memory */
-   smh_load(initrd_name, initrd_addr_r, initrd_size, 1);
-
-#endif /* CONFIG_SEMIHOSTING */
-   return 0;
-}
-#endif /* CONFIG_BOARD_LATE_INIT */
-
 /*
  * Board specific ethernet initialization routine.
  */
diff --git a/include/configs/vexpress_aemv8a.h 
b/include/configs/vexpress_aemv8a.h
index e6fc2aeea2b8..cda89d8ca814 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -15,7 +15,6 @@
 #ifndef CONFIG_SEMIHOSTING
 #error CONFIG_TARGET_VEXPRESS64_BASE_FVP requires CONFIG_SEMIHOSTING
 #endif
-#define CONFIG_BOARD_LATE_INIT
 #define CONFIG_ARMV8_SWITCH_TO_EL1
 #endif
 
@@ -228,11 +227,11 @@
 #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
 #define CONFIG_EXTRA_ENV_SETTINGS  \
"kernel_name=uImage\0"  \
-   "kernel_addr_r=0x8000\0"\
+   "kernel_addr=0x8000\0"  \
 

Re: [U-Boot] [PATCH 03/13] dfu: Build warning fixes for 64-bit

2015-03-23 Thread Lukasz Majewski
Hi Thierry,

> From: Thierry Reding 
> 
> Explicitly cast the result of a pointer arithmetic to unsigned int so
> that it matches the corresponding printf format string. While at it,
> use %p to print a buffer address rather than %x and an explicit cast
> (which causes a warning in this case because it's cast to unsigned
> int instead of unsigned long).
> 
> Cc: Łukasz Majewski 
> Signed-off-by: Thierry Reding 
> ---
>  drivers/dfu/dfu.c | 2 +-
>  drivers/dfu/dfu_mmc.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index 0560afa9ffa5..5c137acfaa04 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c
> @@ -200,7 +200,7 @@ int dfu_write(struct dfu_entity *dfu, void *buf,
> int size, int blk_seq_num) 
>   debug("%s: name: %s buf: 0x%p size: 0x%x p_num: 0x%x offset:
> 0x%llx bufoffset: 0x%x\n", __func__, dfu->name, buf, size,
> blk_seq_num, dfu->offset,
> -   dfu->i_buf - dfu->i_buf_start);
> +   (unsigned int)(dfu->i_buf - dfu->i_buf_start));
>  
>   if (!dfu->inited) {
>   /* initial state */
> diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
> index fd865e11212e..2a780f7b5d31 100644
> --- a/drivers/dfu/dfu_mmc.c
> +++ b/drivers/dfu/dfu_mmc.c
> @@ -156,7 +156,7 @@ static int mmc_file_op(enum dfu_op op, struct
> dfu_entity *dfu, dfu->data.mmc.dev, dfu->data.mmc.part);
>  
>   if (op != DFU_OP_SIZE)
> - sprintf(cmd_buf + strlen(cmd_buf), " 0x%x",
> (unsigned int)buf);
> + sprintf(cmd_buf + strlen(cmd_buf), " %p", buf);
>  
>   sprintf(cmd_buf + strlen(cmd_buf), " %s", dfu->name);
>  

Acked-by: Lukasz Majewski 
Tested-by: Lukasz Majewski 
[test HW: trats - Exynos4210 board]

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/13] usb: mass-storage: Build warning fixes for 64-bit

2015-03-23 Thread Lukasz Majewski
Hi Thierry,

> From: Thierry Reding 
> 
> Fix a printf format mismatch warning seen on 64-bit builds.
> 
> Cc: Łukasz Majewski 
> Cc: Marek Vasut 
> Signed-off-by: Thierry Reding 
> ---
>  drivers/usb/gadget/f_mass_storage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/f_mass_storage.c
> b/drivers/usb/gadget/f_mass_storage.c index
> e045957d0723..71fd49db7f24 100644 ---
> a/drivers/usb/gadget/f_mass_storage.c +++
> b/drivers/usb/gadget/f_mass_storage.c @@ -973,7 +973,7 @@ static int
> do_write(struct fsg_common *common) 
>   /* If an error occurred, report it and its
> position */ if (nwritten < amount) {
> - printf("nwritten:%d amount:%d\n",
> nwritten,
> + printf("nwritten:%zd amount:%u\n",
> nwritten, amount);
>   curlun->sense_data = SS_WRITE_ERROR;
>   curlun->info_valid = 1;

Acked-by: Lukasz Majewski 
Tested-by: Lukasz Majewski 
[test HW - Exynos4210 Trats board]

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/13] usb: mass-storage: Build warning fixes for 64-bit

2015-03-23 Thread Lukasz Majewski
Hi Thierry,

> From: Thierry Reding 
> 
> Fix a printf format mismatch warning seen on 64-bit builds.
> 
> Cc: Łukasz Majewski 
> Cc: Marek Vasut 
> Signed-off-by: Thierry Reding 
> ---
>  drivers/usb/gadget/f_mass_storage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/f_mass_storage.c
> b/drivers/usb/gadget/f_mass_storage.c index
> e045957d0723..71fd49db7f24 100644 ---
> a/drivers/usb/gadget/f_mass_storage.c +++
> b/drivers/usb/gadget/f_mass_storage.c @@ -973,7 +973,7 @@ static int
> do_write(struct fsg_common *common) 
>   /* If an error occurred, report it and its
> position */ if (nwritten < amount) {
> - printf("nwritten:%d amount:%d\n",
> nwritten,
> + printf("nwritten:%zd amount:%u\n",
> nwritten, amount);
>   curlun->sense_data = SS_WRITE_ERROR;
>   curlun->info_valid = 1;

Reviewed-by: Lukasz Majewski 

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 7/7] sunxi: Ainol AW1 support

2015-03-23 Thread Hans de Goede

Hi,

On 23-03-15 08:09, Chen-Yu Tsai wrote:

Hi,

On Mon, Mar 23, 2015 at 1:07 AM, Paul Kocialkowski  wrote:

Maybe a slight description of the board/device?


Yes please, note no need to send a new version if you reply
with a short description I can add that while merging these.

This version of the patch-set looks good, so I plan to merge it
as is (assuming tests on the a23 tablet I've turn out ok).

Not sure yet when exactly I will get around to merging this,
that should happen sometime during this week.

Regards,

Hans






ChenYu


Signed-off-by: Paul Kocialkowski 
---
  board/sunxi/MAINTAINERS |  5 +
  configs/Ainol_AW1_defconfig | 16 
  2 files changed, 21 insertions(+)
  create mode 100644 configs/Ainol_AW1_defconfig

diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index ef3c937..e486458 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -50,6 +50,11 @@ S:   Maintained
  F: board/sunxi/dram_a20_olinuxino_l2.c
  F: configs/A20-OLinuXino-Lime2_defconfig

+AINOL AW1 BOARD
+M: Paul Kocialkowski 
+S: Maintained
+F: configs/Ainol_AW1_defconfig
+
  AMPE A76 BOARD
  M: Paul Kocialkowski 
  S: Maintained
diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
new file mode 100644
index 000..1c3b942
--- /dev/null
+++ b/configs/Ainol_AW1_defconfig
@@ -0,0 +1,16 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
+CONFIG_FDTFILE="sun7i-a20-ainol-aw1.dtb"
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB0_VBUS_PIN="PB9"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:4,le:87,ri:112,up:38,lo:141,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="PH8"
+CONFIG_VIDEO_LCD_BL_EN="PH7"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_ZQ=123
+CONFIG_DRAM_EMR1=4
--
1.9.1

___
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 mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] dm: ls1021a: Bring in ls1021a dts files from linux kernel

2015-03-23 Thread Haikun Wang
From: haikun 

Bring in device tree files for ls1021a from linux V3.19.
In order to use it in u-boot, make some changes:
1. remove 'gic' node and interrupt related properties in every node.
2. remove 'clockgen' node and clock related properties in every node.
3. change address-cells and size-cells of root node and 'soc' node
   from 2 to 1.
4. Add quadspi node.

Signed-off-by: Haikun Wang 
---
 arch/arm/dts/Makefile|   3 +
 arch/arm/dts/ls1021a-qds.dts |  47 
 arch/arm/dts/ls1021a-twr.dts |  31 +
 arch/arm/dts/ls1021a.dtsi| 265 +++
 4 files changed, 346 insertions(+)
 create mode 100644 arch/arm/dts/ls1021a-qds.dts
 create mode 100644 arch/arm/dts/ls1021a-twr.dts
 create mode 100644 arch/arm/dts/ls1021a.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index cbe5b86..67b821a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -54,6 +54,9 @@ dtb-$(CONFIG_SOCFPGA) +=  \
socfpga_cyclone5_socdk.dtb  \
socfpga_cyclone5_socrates.dtb
 
+dtb-$(CONFIG_TARGET_LS1021AQDS) += ls1021a-qds.dtb
+dtb-$(CONFIG_TARGET_LS1021ATWR) += ls1021a-twr.dtb
+
 targets += $(dtb-y)
 
 DTC_FLAGS += -R 4 -p 0x1000
diff --git a/arch/arm/dts/ls1021a-qds.dts b/arch/arm/dts/ls1021a-qds.dts
new file mode 100644
index 000..9a06695
--- /dev/null
+++ b/arch/arm/dts/ls1021a-qds.dts
@@ -0,0 +1,47 @@
+/*
+ * Freescale ls1021a QDS board device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a.dtsi"
+
+/ {
+   model = "LS1021A QDS Board";
+
+   aliases {
+   spi0 = &qspi;
+   spi1 = &dspi0;
+   };
+};
+
+&dspi0 {
+   bus-num = <0>;
+   status = "okay";
+
+   dspiflash: at45db021d@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "spi-flash";
+   spi-max-frequency = <1600>;
+   spi-cpol;
+   spi-cpha;
+   reg = <0>;
+   };
+};
+
+&qspi {
+   bus-num = <0>;
+   status = "okay";
+
+   qflash0: s25fl128s@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "spi-flash";
+   spi-max-frequency = <2000>;
+   reg = <0>;
+   };
+};
diff --git a/arch/arm/dts/ls1021a-twr.dts b/arch/arm/dts/ls1021a-twr.dts
new file mode 100644
index 000..db528f9
--- /dev/null
+++ b/arch/arm/dts/ls1021a-twr.dts
@@ -0,0 +1,31 @@
+/*
+ * Freescale ls1021a TWR board device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+#include "ls1021a.dtsi"
+
+/ {
+   model = "LS1021A TWR Board";
+
+   aliases {
+   spi0 = &qspi;
+   };
+};
+
+&qspi {
+   bus-num = <0>;
+   status = "okay";
+
+   qflash0: n25q128a13@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "spi-flash";
+   spi-max-frequency = <2000>;
+   reg = <0>;
+   };
+};
diff --git a/arch/arm/dts/ls1021a.dtsi b/arch/arm/dts/ls1021a.dtsi
new file mode 100644
index 000..e160a5d
--- /dev/null
+++ b/arch/arm/dts/ls1021a.dtsi
@@ -0,0 +1,265 @@
+/*
+ * Freescale ls1021a SOC common device tree source
+ *
+ * Copyright 2013-2015 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include "skeleton.dtsi"
+
+/ {
+   compatible = "fsl,ls1021a";
+
+   aliases {
+   serial0 = &lpuart0;
+   serial1 = &lpuart1;
+   serial2 = &lpuart2;
+   serial3 = &lpuart3;
+   serial4 = &lpuart4;
+   serial5 = &lpuart5;
+   };
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   cpu@f00 {
+   compatible = "arm,cortex-a7";
+   device_type = "cpu";
+   reg = <0xf00>;
+   };
+
+   cpu@f01 {
+   compatible = "arm,cortex-a7";
+   device_type = "cpu";
+   reg = <0xf01>;
+   };
+   };
+
+   timer {
+   compatible = "arm,armv7-timer";
+   };
+
+   pmu {
+   compatible = "arm,cortex-a7-pmu";
+   };
+
+   soc {
+   compatible = "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   device_type = "soc";
+   ranges;
+
+
+   ifc: ifc@153 {
+   compatible = "fsl,ifc", "simple-bus";
+   reg = <0x153 0x1>;
+   };
+
+   dcfg: dcfg@1ee {
+   compatible = "fsl,ls1021a-dcfg", "syscon";
+   

Re: [U-Boot] serial atag tag in devicetree ?

2015-03-23 Thread Hans de Goede

Hi,

On 22-03-15 22:01, Rob Herring wrote:

On Sun, Mar 22, 2015 at 6:26 AM, Hans de Goede  wrote:

Hi All,

I'm sending this mail because Paul Kocialkowski (in the Cc)
has submitted a patch for upstream u-boot to set the serial
atag tag from u-boot for Allwinner SoCs, using the SoCs
SID, which is a 128 bit register containing a unique number
for each SoC.


We shouldn't really be adding ATAGs to newer platforms...


In some cases a manufacturer may want to override this with
its own serial from say an eeprom, as such it is desirable
to communicate the serial from u-boot to the kernel rather
then reproducing the sid reading code in the kernel.

For old atag using kernels there is an atag for this, and
the contents of this tag will show up in /proc/cpuinfo,
currently there is no equivalent for this in devicetree.

I'm a bit reluctant to merge Paul's patch into u-boot
because of this as it will enable a feature on older
kernels while leaving the upstream kernel without it.

So I was wondering how to deal with this in devicetree,
at least one board in u-boot already sets a devicetree
property for this:

board/gateworks/gw_ventana/gw_ventana.c
1202: *   serial# env var
1207:   char *serial = getenv("serial#");
1432:   setenv("serial#", str);
1512:   fdt_setprop(blob, 0, "system-serial", getenv("serial#"),
1513:   strlen(getenv("serial#")) + 1);

Which sets a system-serial property in the root node,
so at the same level where we also have the model string
this seems to make sense to me.


system-serial is new to me...


So do we want to add a devicetree binding for system
serials, and if we do should we make it a string like
above, or should we make it an 64 bit integer like the atag?

If we make it a string we can store longer serials, but
how should we deal with those wrt /proc/cpuinfo? Only show
the first 64 bits ?


There is already "serial-number" (a string) which exists for
OpenFirmware. Also, "copyright" corresponds to vendor/manufacturer
string. Both of these are supported by lshw already.


Ok, so if I understand you correctly then you're saying that we
should set a "serial-number" string property at the dt root level
and that this may contain pretty much anything, e.g. in the
sunxi case the full 128 bit SID in hex.

Is the use of the "serial-number" string property already documented
somewhere? If not I'll submit a kernel patch to document it.

And for older kernels we should not set any serial atag (u-boot
always sets it, so this leaves it at 0) and old kernel users are
out of luck wrt getting to the serial ?

Regards,

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


Re: [U-Boot] [PATCH v2 1/3] ARM: mx6: move to a standard arch/board approach

2015-03-23 Thread Stefano Babic
On 04/03/2015 13:13, Boris Brezillon wrote:
> Freescale boards are currently all defined in arch/arm/Kconfig, which
> makes them hard to detect.
> Moreover the MX6 SoC variant (Q, D, DL, S, SL) selection is currently
> done via the SYS_EXTRA_OPTIONS option which marked as deprecated.
> 
> Move to a more standard way to select sub-architecture and board by
> creating a Kconfig under arch/arm/cpu/armv7/mx6 and a new ARCH_MX6
> option.
> 
> Existing MX6 board definitions should be moved in this new Kconfig in
> choice menu, and new boards should be directly declared in this menu.
> 
> Signed-off-by: Boris Brezillon 
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


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


Re: [U-Boot] [PATCH v2 2/3] ARM: iMX: define an IMX_CONFIG Kconfig option

2015-03-23 Thread Stefano Babic
On 04/03/2015 13:13, Boris Brezillon wrote:
> IMX_CONFIG is currently passed via the SYS_EXTRA_OPTIONS which is marked
> as deprecated.
> 
> Add a new Kconfig file under arch/arm/imx-common and define the
> IMX_CONFIG Kconfig in there.
> 
> Each board is supposed to provide a default value pointing to the
> appropriate imximage.cfg file.
> 
> Signed-off-by: Boris Brezillon 
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic



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


Re: [U-Boot] [PATCH 1/2] imx:mx6dlsabresd fix error detecting thermal

2015-03-23 Thread Stefano Babic
On 10/03/2015 08:33, Peng Fan wrote:
> Before add CONFIG_SYS_MALLOC_F and CONFIG_SYS_MALLOC_F_LEN,
> uboot will complains "CPU:   Temperature: Can't find sensor device".
> This is because DM and DM_THERMAL are enabled, but SYS_MALLOC_F
> is not configured.
> 
> After applying this patch, uboot can correctly detect the temperature.
> "
> U-Boot 2015.04-rc2-00146-g48b6e30-dirty (Mar 09 2015 - 13:04:36)
> 
> CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
> CPU:   Temperature 44 C
> "
> 
> Signed-off-by: Peng Fan 
> ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic




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


Re: [U-Boot] [PATCH v2 3/3] board/seco: Add mx6q-uq7 basic board support

2015-03-23 Thread Stefano Babic
On 04/03/2015 13:13, Boris Brezillon wrote:
> Add basic SECO MX6Q/uQ7 board support (Ethernet, UART, SD are supported).
> It also adds a Kconfig skeleton to later add more SECO board (supporting
> SoC and board variants).
> 
> Signed-off-by: Boris Brezillon 
> ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic



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


Re: [U-Boot] [PATCH 2/2] imx:mx6slevk support reading temperature

2015-03-23 Thread Stefano Babic
On 10/03/2015 08:33, Peng Fan wrote:
> This patch is to support reading temperature for mx6slevk board.
> 
> Signed-off-by: Peng Fan 
> ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic




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


Re: [U-Boot] [PATCH v2 7/7] sunxi: Ainol AW1 support

2015-03-23 Thread Hans de Goede

Hi,

On 23-03-15 08:09, Chen-Yu Tsai wrote:

Hi,

On Mon, Mar 23, 2015 at 1:07 AM, Paul Kocialkowski  wrote:

Maybe a slight description of the board/device?


Never mind I've just merged this in my local tree, adding a short description
myself based on (and pointing to): http://linux-sunxi.org/Ainol_AW1

I'll push this to next once tested.

Regards,

Hans



ChenYu


Signed-off-by: Paul Kocialkowski 
---
  board/sunxi/MAINTAINERS |  5 +
  configs/Ainol_AW1_defconfig | 16 
  2 files changed, 21 insertions(+)
  create mode 100644 configs/Ainol_AW1_defconfig

diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index ef3c937..e486458 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -50,6 +50,11 @@ S:   Maintained
  F: board/sunxi/dram_a20_olinuxino_l2.c
  F: configs/A20-OLinuXino-Lime2_defconfig

+AINOL AW1 BOARD
+M: Paul Kocialkowski 
+S: Maintained
+F: configs/Ainol_AW1_defconfig
+
  AMPE A76 BOARD
  M: Paul Kocialkowski 
  S: Maintained
diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
new file mode 100644
index 000..1c3b942
--- /dev/null
+++ b/configs/Ainol_AW1_defconfig
@@ -0,0 +1,16 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
+CONFIG_FDTFILE="sun7i-a20-ainol-aw1.dtb"
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB0_VBUS_PIN="PB9"
+CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
+CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:4,le:87,ri:112,up:38,lo:141,hs:1,vs:1,sync:3,vmode:0"
+CONFIG_VIDEO_LCD_POWER="PH8"
+CONFIG_VIDEO_LCD_BL_EN="PH7"
+CONFIG_VIDEO_LCD_BL_PWM="PB2"
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN7I=y
+CONFIG_DRAM_CLK=432
+CONFIG_DRAM_ZQ=123
+CONFIG_DRAM_EMR1=4
--
1.9.1

___
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 mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: UniPhier: remove unnecessary CONFIG_SYS_SOC

2015-03-23 Thread Masahiro Yamada
2015-03-16 13:46 GMT+09:00 Masahiro Yamada :
> Since commit a86ac9540e20 (ARM: UniPhier: include  instead
> of ), UniPhier platform does not need the symbolic
> link arch/arm/include/asm.  This option is not necessary either.
>
> Signed-off-by: Masahiro Yamada 
> ---


Applied to u-boot-uniphier/master.




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


Re: [U-Boot] [PATCH 0/13] ARM: UniPhier: enable CONFIG_SPL_DM with some clean-ups

2015-03-23 Thread Masahiro Yamada
2015-03-23 0:07 GMT+09:00 Masahiro Yamada :
>
>
>
> Masahiro Yamada (13):
>   ARM: UniPhier: include PH1-LD4 Makefile from PH1-sLD8
>   ARM: UniPhier: move platform devices to SPL
>   ARM: UniPhier: move UART pin settings to SPL
>   ARM: UniPhier: enable CONFIG_PANIC_HANG
>   ARM: UniPhier: enable Driver Model and UART on SPL
>   ARM: UniPhier: use CONFIG_SPL_STACK to define SPL stack pointer
>   ARM: UniPhier: add CONFIG_SPL_MAX_FOOTPRINT
>   ARM: UniPhier: move init stack area just below TEXT_BASE
>   ARM: UniPhier: add empty lowlevel_init to U-boot proper
>   ARM: UniPhier: fix typos in comments
>   ARM: UniPhier: optimize kicking secondary CPUs code
>   ARM: UniPhier: disable L2 cache by lowlevel_init of U-Boot proper
>   ARM: UniPhier: remove unnecessary ifdef conditional


Applied to u-boot-uniphier/master.


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


[U-Boot] Pull request: u-boot-uniphier

2015-03-23 Thread Masahiro Yamada
Hi Tom,

The following changes since commit 21866c34a1b4098a8868c9250daf01baf84c2397:

  at91sam9rlek_mmc_defconfig: Add CONFIG_ARCH_AT91=y (2015-03-20 10:47:38 -0400)

are available in the git repository at:

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

for you to fetch changes up to 90e357efed06767d87c49280bc25272fdf378612:

  ARM: UniPhier: remove unnecessary ifdef conditional (2015-03-24
00:16:02 +0900)


Masahiro Yamada (14):
  ARM: UniPhier: remove unnecessary CONFIG_SYS_SOC
  ARM: UniPhier: include PH1-LD4 Makefile from PH1-sLD8
  ARM: UniPhier: move platform devices to SPL
  ARM: UniPhier: move UART pin settings to SPL
  ARM: UniPhier: enable CONFIG_PANIC_HANG
  ARM: UniPhier: enable Driver Model and UART on SPL
  ARM: UniPhier: use CONFIG_SPL_STACK to define SPL stack pointer
  ARM: UniPhier: add CONFIG_SPL_MAX_FOOTPRINT
  ARM: UniPhier: move init stack area just below TEXT_BASE
  ARM: UniPhier: add empty lowlevel_init to U-boot proper
  ARM: UniPhier: fix typos in comments
  ARM: UniPhier: optimize kicking secondary CPUs code
  ARM: UniPhier: disable L2 cache by lowlevel_init of U-Boot proper
  ARM: UniPhier: remove unnecessary ifdef conditional

 arch/arm/mach-uniphier/Kconfig  |  3 ---
 arch/arm/mach-uniphier/Makefile |  2 +-
 arch/arm/mach-uniphier/cache_uniphier.c | 32
++--
 arch/arm/mach-uniphier/init_page_table.S| 10 +-
 arch/arm/mach-uniphier/late_lowlevel_init.S | 17 +
 arch/arm/mach-uniphier/lowlevel_init.S  | 63
+++
 arch/arm/mach-uniphier/ph1-ld4/Makefile |  4 ++--
 arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c  | 27
+++
 arch/arm/mach-uniphier/ph1-ld4/pinctrl.c| 18 ++
 arch/arm/mach-uniphier/ph1-pro4/Makefile|  4 ++--
 arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c | 27
+++
 arch/arm/mach-uniphier/ph1-pro4/pinctrl.c   | 15 ++-
 arch/arm/mach-uniphier/ph1-sld8/Makefile| 17 +
 arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c | 27
+++
 arch/arm/mach-uniphier/ph1-sld8/pinctrl.c   | 18 ++
 arch/arm/mach-uniphier/smp.S| 54
--
 arch/arm/mach-uniphier/spl.c| 18 +++---
 arch/arm/mach-uniphier/support_card.c   | 11 ++-
 configs/ph1_ld4_defconfig   |  1 +
 configs/ph1_pro4_defconfig  |  1 +
 configs/ph1_sld8_defconfig  |  1 +
 include/configs/uniphier.h  | 20 
 22 files changed, 200 insertions(+), 190 deletions(-)
 create mode 100644 arch/arm/mach-uniphier/late_lowlevel_init.S
 create mode 100644 arch/arm/mach-uniphier/ph1-ld4/early_pinctrl.c
 create mode 100644 arch/arm/mach-uniphier/ph1-pro4/early_pinctrl.c
 create mode 100644 arch/arm/mach-uniphier/ph1-sld8/early_pinctrl.c
 delete mode 100644 arch/arm/mach-uniphier/smp.S


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


Re: [U-Boot] [PATCH v7 01/27] test: dm: Reorder the objects to build

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:08, Joe Hershberger  wrote:
> Signed-off-by: Joe Hershberger 
> Acked-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 03/27] net: Provide a function to get the current MAC address

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The current implementation exposes the eth_device struct to code that
> needs to access the MAC address.  Add a wrapper function for this to
> abstract away the pointer for this operation.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 05/27] net: Remove unneeded "extern" in net.h

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Many of the functions in net.h were preceded extern needlessly. Removing
> them to limit the number of checkpatch.pl complaints.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 02/27] common: Make sure arch-specific map_sysmem() is defined

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:08, Joe Hershberger  wrote:
> In the case where the arch defines a custom map_sysmem(), make sure that
> including just mapmem.h is sufficient to have these functions as they
> are when the arch does not override it.
>
> Also split the non-arch specific functions out of common.h
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 07/27] net: Change return codes from net/eth.c to use errorno constants

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Many functions returned -1 previously. Change them to return appropriate error
> codes.
>
> Signed-off-by: Joe Hershberger 
> Reported-by: Simon Glass 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 04/27] net: Rename helper function to be more clear

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Make it clear that the helper is checking the addr, not setting it.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 06/27] net: Refactor in preparation for driver model

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Move some things around and organize things so that the driver model
> implementation will fit in more easily.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 13/27] dm: eth: Add basic driver model support to Ethernet stack

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> First just add support for MAC drivers.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 10/27] net: Make netretry actually do something

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> netretry previously would only retry in one specific case (your MAC
> address is not set) and no other. This is basically useless. In the DM
> implementation for eth it turns this into a completely useless case
> since an un-configured MAC address results in not even entering the
> NetLoop. The behavior is now changed to retry any failed command
> (rotating through the eth adapters if ethrotate != no).
>
> It also defaulted to retry forever. It is now changed to default to not
> retry
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 08/27] net: Use int instead of u8 for boolean flag

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> On some archs masking the parameter is inefficient, so don't use u8.
>
> Signed-off-by: Joe Hershberger 
> Reported-by: Simon Glass 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 09/27] net: Remove the bd* parameter from net stack functions

2015-03-23 Thread Simon Glass
Hi Joe,

On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> This value is not used by the network stack and is available in the
> global data, so stop passing it around.  For the one legacy function
> that still expects it (init op on old Ethernet drivers) pass in the
> global pointer version directly to avoid changing that interface.
>
> Signed-off-by: Joe Hershberger 
> Reported-by: Simon Glass 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7:
> -Fixed compile error in 4xx_enet.c

This fixes the compile error but introduced a warning. However the fix
was trivial (just removing a variable declaration). So I applied that
fix to your patch.

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 11/27] net: Access mapped physmem in net functions

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Previously the net functions would access memory assuming physmem did
> not need to be mapped.  In sandbox, that's not the case.
>
> Now we map the physmem specified by the user in loadaddr to the buffer
> that represents that space.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 12/27] cmd: net: Clean up return codes

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The return codes in common/cmd_net.c had a number of inconsistencies.
> Update them to all use the enum from command.h
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 15/27] dm: eth: Pass the packet pointer as a parameter to recv

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Stop forcing drivers to call net_process_received_packet() - formerly
> called NetReceive(). Now the uclass will handle calling the driver for
> each packet until the driver errors or has nothing to return. The uclass
> will then pass the good packets off to the network stack by calling
> net_process_received_packet().
>
> Signed-off-by: Joe Hershberger 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 14/27] net: Clean up network stack names used in DM drivers

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Take the opportunity to enforce better names on newly written or
> retrofitted Ethernet drivers.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 17/27] sandbox: eth: Add ARP and PING response to sandbox driver

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The sandbox driver will now generate response traffic to exercise the
> ping command even when no network exists.  This allows the basic data
> pathways of the DM to be tested.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 18/27] test: dm: eth: Add tests for the eth dm implementation

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Add a test for the eth uclass using the sandbox eth driver. Verify basic
> functionality of the network stack / eth uclass by exercising the ping
> function.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 19/27] dm: eth: Add support for aliases

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Allow network devices to be referred to as "eth0" instead of
> "eth@12345678" when specified in ethact.
>
> Add tests to verify this behavior.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 16/27] sandbox: eth: Add network support to sandbox

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Add basic network support to sandbox which includes a network driver.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 22/27] sandbox: eth: Add ability to disable ping reply in sandbox eth driver

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> This is needed to test the netretry functionality (make the command fail
> on a sandbox eth device).
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 21/27] test: dm: eth: Add testing for ethrotate env var

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Make sure that the ethrotate behavior occurs as expected.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 20/27] dm: eth: Add support for ethprime env var

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The ethprime env var is used to indicate the starting device if none is
> specified in ethact. Also support aliases specified in the ethprime var.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 23/27] test: dm: net: Add a test of the netretry behavior

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The effect of the "netretry" env var was recently changed. This test
> checks that behavior.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 24/27] sandbox: eth: Add a bridge to a real network for sandbox

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Implement a bridge between U-Boot's network stack and Linux's raw packet
> API allowing the sandbox to send and receive packets using the host
> machine's network interface.
>
> This raw Ethernet API requires elevated privileges.  You can either run
> as root, or you can add the capability needed like so:
>
> sudo /sbin/setcap "CAP_NET_RAW+ep" /path/to/u-boot
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 25/27] sandbox: Enable DHCP and IP defrag

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> This is now testable via the eth-raw interface
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 27/27] net: Improve error handling

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> Take a pass at plumbing errors through to the users of the network stack
>
> Currently only the start() function errors will be returned from
> NetLoop(). recv() tends not to have errors, so that is likely not worth
> adding. send() certainly can return errors, but this patch does not
> attempt to plumb them yet. halt() is not expected to error.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7 26/27] sandbox: eth: Add support for using the 'lo' interface

2015-03-23 Thread Simon Glass
On 22 March 2015 at 16:09, Joe Hershberger  wrote:
> The 'lo' interface on Linux doesn't support thinks like ARP or
> link-layer access like we use to talk to a normal network interface.
> A higher-level network API must be used to access localhost.
>
> As written, this interface is limited to not supporting ICMP since the
> API doesn't allow the socket to be opened for all IP traffic and be able
> to receive at the same time. UDP is far more useful to test with, so it
> was selected over ICMP. Ping won't work, but things like TFTP should
> work.
>
> Signed-off-by: Joe Hershberger 
> Reviewed-by: Simon Glass 
>
> ---
>
> Changes in v7: None

Applied to u-boot-dm/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/7] sunxi: gpio: Indentation fix

2015-03-23 Thread Hans de Goede

Hi,

Thanks for the patches, I had to make this fixup (squashed) to fix
vbus detect to work on axp221:

-- drivers/gpio/sunxi_gpio.c --
index 6296092..670af0c 100644
@@ -21,6 +21,9 @@
 #ifdef CONFIG_AXP209_POWER
 #include 
 #endif
+#ifdef CONFIG_AXP221_POWER
+#include 
+#endif

 DECLARE_GLOBAL_DATA_PTR;

Other then that + adding a small
blurb with some info on the Ainol AW1 board this set has been
merged as is.

The entire set has been queued up in u-boot-sunxi/next for upstream merging.

Regards,

Hans


On 22-03-15 18:07, Paul Kocialkowski wrote:

Signed-off-by: Paul Kocialkowski 
---
  arch/arm/include/asm/arch-sunxi/gpio.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h 
b/arch/arm/include/asm/arch-sunxi/gpio.h
index f2c247d..a66e45c 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -84,7 +84,7 @@ struct sunxi_gpio_reg {
  #define GPIO_CFG_INDEX(pin)   (((pin) & 0x1f) >> 3)
  #define GPIO_CFG_OFFSET(pin)  pin) & 0x1f) & 0x7) << 2)

-#define GPIO_DRV_INDEX(pin)   (((pin) & 0x1f) >> 4)
+#define GPIO_DRV_INDEX(pin)(((pin) & 0x1f) >> 4)
  #define GPIO_DRV_OFFSET(pin)  pin) & 0x1f) & 0xf) << 1)

  #define GPIO_PULL_INDEX(pin)  (((pin) & 0x1f) >> 4)
@@ -194,7 +194,7 @@ enum sunxi_gpio_number {
  #define SUN8I_GPL3_R_UART_RX  2

  #define SUN9I_GPN0_R_RSB_SCK  3
-#define SUN9I_GPN1_R_RSB_SDA3
+#define SUN9I_GPN1_R_RSB_SDA   3

  /* GPIO pin pull-up/down config */
  #define SUNXI_GPIO_PULL_DISABLE   0


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


Re: [U-Boot] [PATCH v2 7/7] sunxi: Ainol AW1 support

2015-03-23 Thread Paul Kocialkowski
Le lundi 23 mars 2015 à 15:25 +0100, Hans de Goede a écrit :
> Hi,
> 
> On 23-03-15 08:09, Chen-Yu Tsai wrote:
> > Hi,
> >
> > On Mon, Mar 23, 2015 at 1:07 AM, Paul Kocialkowski  wrote:
> >
> > Maybe a slight description of the board/device?
> 
> Never mind I've just merged this in my local tree, adding a short description
> myself based on (and pointing to): http://linux-sunxi.org/Ainol_AW1

Okay, I'm back home just now. For the record, I don't write device
descriptions because that information is is available on the linux-sunxi
wiki. Although, I understand it is only informative here, I also don't
want to be adding any kind of marketing stuff to the commit message. 

> I'll push this to next once tested.

Thanks! All those commits have been build-tested with MAKEALL -s sunxi.

> Regards,
> 
> Hans
> 
> >
> > ChenYu
> >
> >> Signed-off-by: Paul Kocialkowski 
> >> ---
> >>   board/sunxi/MAINTAINERS |  5 +
> >>   configs/Ainol_AW1_defconfig | 16 
> >>   2 files changed, 21 insertions(+)
> >>   create mode 100644 configs/Ainol_AW1_defconfig
> >>
> >> diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
> >> index ef3c937..e486458 100644
> >> --- a/board/sunxi/MAINTAINERS
> >> +++ b/board/sunxi/MAINTAINERS
> >> @@ -50,6 +50,11 @@ S:   Maintained
> >>   F: board/sunxi/dram_a20_olinuxino_l2.c
> >>   F: configs/A20-OLinuXino-Lime2_defconfig
> >>
> >> +AINOL AW1 BOARD
> >> +M: Paul Kocialkowski 
> >> +S: Maintained
> >> +F: configs/Ainol_AW1_defconfig
> >> +
> >>   AMPE A76 BOARD
> >>   M: Paul Kocialkowski 
> >>   S: Maintained
> >> diff --git a/configs/Ainol_AW1_defconfig b/configs/Ainol_AW1_defconfig
> >> new file mode 100644
> >> index 000..1c3b942
> >> --- /dev/null
> >> +++ b/configs/Ainol_AW1_defconfig
> >> @@ -0,0 +1,16 @@
> >> +CONFIG_SPL=y
> >> +CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER"
> >> +CONFIG_FDTFILE="sun7i-a20-ainol-aw1.dtb"
> >> +CONFIG_USB_MUSB_SUNXI=y
> >> +CONFIG_USB0_VBUS_PIN="PB9"
> >> +CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT"
> >> +CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:4,le:87,ri:112,up:38,lo:141,hs:1,vs:1,sync:3,vmode:0"
> >> +CONFIG_VIDEO_LCD_POWER="PH8"
> >> +CONFIG_VIDEO_LCD_BL_EN="PH7"
> >> +CONFIG_VIDEO_LCD_BL_PWM="PB2"
> >> +CONFIG_ARM=y
> >> +CONFIG_ARCH_SUNXI=y
> >> +CONFIG_MACH_SUN7I=y
> >> +CONFIG_DRAM_CLK=432
> >> +CONFIG_DRAM_ZQ=123
> >> +CONFIG_DRAM_EMR1=4
> >> --
> >> 1.9.1
> >>
> >> ___
> >> 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
> >



signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3] sunxi: Yones Toptech BD1078 support

2015-03-23 Thread Hans de Goede

Hi,

Thanks.

The entire set has been queued up in u-boot-sunxi/next for upstream merging.

Regards,

Hans


On 22-03-15 18:12, Paul Kocialkowski wrote:

This series goes on top of my previous series that concludes with Ainol AW1
support.

Also, if you're interested by the idea of using sunxi_name_to_gpio_bank, this
could be extended for UART as well, where *many* different pin mux setups are
possible. We are just lucky that hardware designers usually use the ports that
U-Boot selects, but there is no fundamental reason for that.


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


Re: [U-Boot] [PATCH v2 1/7] sunxi: gpio: Indentation fix

2015-03-23 Thread Paul Kocialkowski
Le lundi 23 mars 2015 à 17:21 +0100, Hans de Goede a écrit :
> Hi,
> 
> Thanks for the patches, I had to make this fixup (squashed) to fix
> vbus detect to work on axp221:
> 
> -- drivers/gpio/sunxi_gpio.c 
> --
> index 6296092..670af0c 100644
> @@ -21,6 +21,9 @@
>   #ifdef CONFIG_AXP209_POWER
>   #include 
>   #endif
> +#ifdef CONFIG_AXP221_POWER
> +#include 
> +#endif
> 
>   DECLARE_GLOBAL_DATA_PTR;
> 
> Other then that + adding a small
> blurb with some info on the Ainol AW1 board this set has been
> merged as is.

Oh you're right, I forgot that one!

> The entire set has been queued up in u-boot-sunxi/next for upstream merging.

Thanks a lot!

> Regards,
> 
> Hans
> 
> 
> On 22-03-15 18:07, Paul Kocialkowski wrote:
> > Signed-off-by: Paul Kocialkowski 
> > ---
> >   arch/arm/include/asm/arch-sunxi/gpio.h | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h 
> > b/arch/arm/include/asm/arch-sunxi/gpio.h
> > index f2c247d..a66e45c 100644
> > --- a/arch/arm/include/asm/arch-sunxi/gpio.h
> > +++ b/arch/arm/include/asm/arch-sunxi/gpio.h
> > @@ -84,7 +84,7 @@ struct sunxi_gpio_reg {
> >   #define GPIO_CFG_INDEX(pin)   (((pin) & 0x1f) >> 3)
> >   #define GPIO_CFG_OFFSET(pin)  pin) & 0x1f) & 0x7) << 2)
> >
> > -#define GPIO_DRV_INDEX(pin)   (((pin) & 0x1f) >> 4)
> > +#define GPIO_DRV_INDEX(pin)(((pin) & 0x1f) >> 4)
> >   #define GPIO_DRV_OFFSET(pin)  pin) & 0x1f) & 0xf) << 1)
> >
> >   #define GPIO_PULL_INDEX(pin)  (((pin) & 0x1f) >> 4)
> > @@ -194,7 +194,7 @@ enum sunxi_gpio_number {
> >   #define SUN8I_GPL3_R_UART_RX  2
> >
> >   #define SUN9I_GPN0_R_RSB_SCK  3
> > -#define SUN9I_GPN1_R_RSB_SDA3
> > +#define SUN9I_GPN1_R_RSB_SDA   3
> >
> >   /* GPIO pin pull-up/down config */
> >   #define SUNXI_GPIO_PULL_DISABLE   0
> >



signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/3] sunxi: Yones Toptech BD1078 support

2015-03-23 Thread Hans de Goede

Hi,

p.s.


On 22-03-15 18:12, Paul Kocialkowski wrote:

This series goes on top of my previous series that concludes with Ainol AW1
support.

Also, if you're interested by the idea of using sunxi_name_to_gpio_bank, this
could be extended for UART as well, where *many* different pin mux setups are
possible. We are just lucky that hardware designers usually use the ports that
U-Boot selects, but there is no fundamental reason for that.


I'm not really interested in making the #ifdeffery for the uart setup even
more complicated, eventually we should get all this info, including all the
pinmux stuff from a dtb (shared with the kernel) appended to the u-boot binary,
and then this will use standard devicetree pinmux stuff, until we get there
I would like to keep this as simple as possible.

Regards,

Hans


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


Re: [U-Boot] [PATCH 1/2] power: axp152: Registers definitions in header

2015-03-23 Thread Hans de Goede

Hi,

Thanks, I've also queued these 2 up in u-boot-sunxi/next.

Regards,

Hans




On 22-03-15 18:08, Paul Kocialkowski wrote:

Signed-off-by: Paul Kocialkowski 
---
  drivers/power/axp152.c | 11 ---
  include/axp152.h   | 12 
  2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index 27c2c4c..740a3b4 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -8,17 +8,6 @@
  #include 
  #include 

-enum axp152_reg {
-   AXP152_CHIP_VERSION = 0x3,
-   AXP152_DCDC2_VOLTAGE = 0x23,
-   AXP152_DCDC3_VOLTAGE = 0x27,
-   AXP152_DCDC4_VOLTAGE = 0x2B,
-   AXP152_LDO2_VOLTAGE = 0x2A,
-   AXP152_SHUTDOWN = 0x32,
-};
-
-#define AXP152_POWEROFF(1 << 7)
-
  static int axp152_write(enum axp152_reg reg, u8 val)
  {
return i2c_write(0x30, reg, 1, &val, 1);
diff --git a/include/axp152.h b/include/axp152.h
index 3e5ccbd..9d205f8 100644
--- a/include/axp152.h
+++ b/include/axp152.h
@@ -3,6 +3,18 @@
   *
   * SPDX-License-Identifier:   GPL-2.0+
   */
+
+enum axp152_reg {
+   AXP152_CHIP_VERSION = 0x3,
+   AXP152_DCDC2_VOLTAGE = 0x23,
+   AXP152_DCDC3_VOLTAGE = 0x27,
+   AXP152_DCDC4_VOLTAGE = 0x2B,
+   AXP152_LDO2_VOLTAGE = 0x2A,
+   AXP152_SHUTDOWN = 0x32,
+};
+
+#define AXP152_POWEROFF(1 << 7)
+
  int axp152_set_dcdc2(int mvolt);
  int axp152_set_dcdc3(int mvolt);
  int axp152_set_dcdc4(int mvolt);


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


[U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect

2015-03-23 Thread Hans de Goede
vbus-usable does not get set if power is provided through the power barrel
connector, even if external 5v is also present on the otg connector.

vbus-available correctly always reflects if there is 5v present on the otg
connector.

Signed-off-by: Hans de Goede 
---
 drivers/power/axp221.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index f758a75..dc3a7f1 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -424,7 +424,7 @@ int axp_gpio_get_value(unsigned int pin)
if (ret)
return ret;
 
-   return !!(val & AXP221_POWER_STATUS_VBUS_USABLE);
+   return !!(val & AXP221_POWER_STATUS_VBUS_AVAIL);
default:
return -EINVAL;
}
-- 
2.3.3

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


Re: [U-Boot] [PATCH 0/3] sunxi: Yones Toptech BD1078 support

2015-03-23 Thread Paul Kocialkowski
Le lundi 23 mars 2015 à 17:26 +0100, Hans de Goede a écrit :
> Hi,
> 
> p.s.
> 
> 
> On 22-03-15 18:12, Paul Kocialkowski wrote:
> > This series goes on top of my previous series that concludes with Ainol AW1
> > support.
> >
> > Also, if you're interested by the idea of using sunxi_name_to_gpio_bank, 
> > this
> > could be extended for UART as well, where *many* different pin mux setups 
> > are
> > possible. We are just lucky that hardware designers usually use the ports 
> > that
> > U-Boot selects, but there is no fundamental reason for that.
> 
> I'm not really interested in making the #ifdeffery for the uart setup even
> more complicated, eventually we should get all this info, including all the
> pinmux stuff from a dtb (shared with the kernel) appended to the u-boot 
> binary,
> and then this will use standard devicetree pinmux stuff, until we get there
> I would like to keep this as simple as possible.

Understood. There was a real need for mmc as the previous setups were
just wrong for platforms != (sun4i || sun7i), but in the case of UART,
it just remains minimalistic, which is fine.

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: http://www.replicant.us/
Blog: http://blog.replicant.us/
Wiki/tracker/forums: http://redmine.replicant.us/



signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect

2015-03-23 Thread Paul Kocialkowski
Le lundi 23 mars 2015 à 17:28 +0100, Hans de Goede a écrit :
> vbus-usable does not get set if power is provided through the power barrel
> connector, even if external 5v is also present on the otg connector.
> 
> vbus-available correctly always reflects if there is 5v present on the otg
> connector.

You (or I) could submit the very same change for the AXP209. It's the
same bit for available (1 << 5).

> Signed-off-by: Hans de Goede 
> ---
>  drivers/power/axp221.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
> index f758a75..dc3a7f1 100644
> --- a/drivers/power/axp221.c
> +++ b/drivers/power/axp221.c
> @@ -424,7 +424,7 @@ int axp_gpio_get_value(unsigned int pin)
>   if (ret)
>   return ret;
>  
> - return !!(val & AXP221_POWER_STATUS_VBUS_USABLE);
> + return !!(val & AXP221_POWER_STATUS_VBUS_AVAIL);
>   default:
>   return -EINVAL;
>   }



signature.asc
Description: This is a digitally signed message part
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect

2015-03-23 Thread Hans de Goede

Hi,

On 23-03-15 17:28, Hans de Goede wrote:

vbus-usable does not get set if power is provided through the power barrel
connector, even if external 5v is also present on the otg connector.

vbus-available correctly always reflects if there is 5v present on the otg
connector.


Except that it also gets set when there is a usb-host cable with a device
attached plugged in, so this is going to need some more thinking, I'll
send a new patch when I've something which does not break using the port
in host mode.

Regards,

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


Re: [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect

2015-03-23 Thread Hans de Goede

Hi,

On 23-03-15 17:33, Paul Kocialkowski wrote:

Le lundi 23 mars 2015 à 17:28 +0100, Hans de Goede a écrit :

vbus-usable does not get set if power is provided through the power barrel
connector, even if external 5v is also present on the otg connector.

vbus-available correctly always reflects if there is 5v present on the otg
connector.


You (or I) could submit the very same change for the AXP209. It's the
same bit for available (1 << 5).


Yes I was about to mail you about that when I noticed that this seems to
break actual host mode support on the otg connector, it seems that
plugging in a micro-b to usb-a receptacle (aka host) convertor + a device
plugged into the usb-a receptacle also causes bit 5 to get set :|

So my patch is no good, but powering the otg port while external 5v is present
also is not good (one side effect is that the tablet will power up immediately
after sending a power-off command to the axp221).

If you've some time to tinker with this I would appreciate any ideas
you may have (assuming the same problem exists on the axp209)
simply plug in 5v power into the power barrel, as well as 5v power
(e.g. simply from your pc) and boot up the tablet, at least in my
case then it does not properly give the charger plugged in error.

Regards,

Hans






Signed-off-by: Hans de Goede 
---
  drivers/power/axp221.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index f758a75..dc3a7f1 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -424,7 +424,7 @@ int axp_gpio_get_value(unsigned int pin)
if (ret)
return ret;

-   return !!(val & AXP221_POWER_STATUS_VBUS_USABLE);
+   return !!(val & AXP221_POWER_STATUS_VBUS_AVAIL);
default:
return -EINVAL;
}



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


Re: [U-Boot] [PATCH] common/board_f: make board_init_f_mem() independent on !CONFIG_X86

2015-03-23 Thread Alexey Brodkin
Hi Tom, Simon,

On Mon, 2015-03-16 at 11:03 +0300, Alexey Brodkin wrote:
> Even though board_init_f_mem() is not used on x86 today there's no
> reason to not use it in the future.
> 
> Moreover board_init_f_mem() has nothing to do with any particular
> architecture so move it away from #else /* CONFIG_X86 */
> 
> Signed-off-by: Alexey Brodkin 
> Cc: Simon Glass 
> Cc: Tom Rini 

Any comments on this one?
This is a prerequisite for ARC updates so would be good to have it
merged sometime soon.

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


Re: [U-Boot] Rework the network stack

2015-03-23 Thread Simon Glass
Hi Jörg,

On 22 March 2015 at 14:37, Jörg Krause  wrote:
> Hi Joe,
>
> On Sa, 2015-03-21 at 22:59 -0500, Joe Hershberger wrote:
>> Hi Jörg,
>>
>> On Sat, Mar 21, 2015 at 3:33 AM, Jörg Krause 
>> wrote:
>> >
>> > Hi all,
>> >
>> > there is an issue with the current network stack using netconsole. It's
>> > impossible to use network commands as TFTP inside netconsole, because
>> > they try to run as atomic network commands.
>> >
>> > The issue was already reported by Stefano Babic in 2010:
>> > [U-Boot] NetConsole and network API
>> > http://lists.denx.de/pipermail/u-boot/2010-August/075535.html
>>
>> I worked around this problem here:
>>
>> http://lists.denx.de/pipermail/u-boot/2012-August/129913.html
>
> I know about this patch, and I understand the problem it tries to
> workaround. But it does not work for using netconsole with another
> protocol like ping. When for example ping enters the NetLoop() it will
> halt the network device.
>
> The problem for this is here:
> if (eth_is_on_demand_init() || protocol != NETCONS) {
> eth_halt();
> ...
> }
>
> eth_is_on_demand_init() returns correctly with false, because PING !=
> NETCONS. But the second expression results in true, because PING !=
> NETCONS.
>
>> > I run into the same problem:
>> > [U-Boot] netconsole: USB Ethernet connection dropping with ping or
>> > tftpboot
>> > http://lists.denx.de/pipermail/u-boot/2015-February/203838.html
>>
>> I didn't understand what about your case was not able to work given the
>> workaround I implemented previously. What was different about it?
>>
>> > I have looked at the current network stack. The stack is based on the
>> > concept of atomic network commands. The implementation for netconsole
>> > looks very confusing.
>>
>> There is no doubt that netconsole is quite confusing as it exists today.
>
> I tried to fix the issue, but it did not work properly.
>
>> > Sascha Hauer has reimplemented the network stack for Barebox:
>> > http://www.spinics.net/lists/u-boot-v2/msg00914.html
>> >
>> > Looking at the current implementation of net.c looks very clean and
>> > well-designed.
>>
>> Thanks for pointing this out. I hadn't gone to look at the network stack in
>> barebox.
>>
>> > What do you think about porting this to U-Boot?
>>
>> I can look into this. Naturally there are many other changes to u-boot
>> network stack since the time barebox forked, so I expect such a port to be
>> very intensive... most likely a near complete rewrite of Sascha's series,
>> but I will investigate further.
>
> I had a look at the patches and the code base is not entirely the same.
> But maybe we should just stick to the crucial points of the new network
> stack:
>
> 1) A network device gets initialized when it becomes the current one and
> gets brought down when it's not used anymore or prior booting to Linux
> so the connection remains active all the time.
>
> My thoughts about this one:
> Bringing the device down can be done in eth_unregister(). Initializing
> for the current device can be done in eth_current_changed(). What I like
> even better is to make eth_current_changed() the sole place for calling
> init() and halt(). It would have to be extend to take at least two
> parameters, eth_current and new_current. If eth_current is null just
> bring up the new device, if new_current is null just bring down the
> current device.
>
> 2) Replace the NetLoop by a connection list where each protocol uses a
> connection to send and receive packets.
>
> This induce to port all protocols to use the new network, of cause.
>
> In my opinion it would be also good to do some clean ups and
> restructuring of code. Put more functions into net-utils, is there a
> need for eth_init and so on.

Joe has done a lot of work to move U-Boot's network stack over to
driver model. This is now at u-boot-dm/next waiting for the merge
window to open.

The connection list idea does not sound like a hugely complex change.
Are you thinking of trying it out?

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


Re: [U-Boot] [PATCH] sunxi: axp221: Use vbus-available rather then vbus-usable for vbus-detect

2015-03-23 Thread Chen-Yu Tsai
Hi,

On Mon, Mar 23, 2015 at 9:34 AM, Hans de Goede  wrote:
> Hi,
>
> On 23-03-15 17:28, Hans de Goede wrote:
>>
>> vbus-usable does not get set if power is provided through the power barrel
>> connector, even if external 5v is also present on the otg connector.
>>
>> vbus-available correctly always reflects if there is 5v present on the otg
>> connector.
>
>
> Except that it also gets set when there is a usb-host cable with a device
> attached plugged in, so this is going to need some more thinking, I'll
> send a new patch when I've something which does not break using the port
> in host mode.

My understanding is VBUS_Usable = VBUS_Available && (!(N_VBUSEN || reg 30h[7]))

reg 30h[7] says whether to check N_VBUSEN before using VBUS.

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


Re: [U-Boot] [PATCH] common/board_f: make board_init_f_mem() independent on !CONFIG_X86

2015-03-23 Thread Simon Glass
On 23 March 2015 at 10:40, Alexey Brodkin  wrote:
> Hi Tom, Simon,
>
> On Mon, 2015-03-16 at 11:03 +0300, Alexey Brodkin wrote:
>> Even though board_init_f_mem() is not used on x86 today there's no
>> reason to not use it in the future.
>>
>> Moreover board_init_f_mem() has nothing to do with any particular
>> architecture so move it away from #else /* CONFIG_X86 */
>>
>> Signed-off-by: Alexey Brodkin 
>> Cc: Simon Glass 
>> Cc: Tom Rini 
>
> Any comments on this one?
> This is a prerequisite for ARC updates so would be good to have it
> merged sometime soon.

I must have missed something as it did not seem to change anything for ARC.

This breaks building on x86 though, so we can't take this patch as is. E.g.:

   x86:  +   crownbay
+common/board_f.c: In function ‘board_init_f_mem’:
+common/board_f.c:1092:5: error: lvalue required as left operand of assignment
+  gd = (struct global_data *)top;
+ ^

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


[U-Boot] [PATCH v6 28/28] armv8/fsl-lsch3: Implement workaround for I2C erratum A009203

2015-03-23 Thread York Sun
This erratum requires setting GLITCH_EN bit in debug register to
enable digital filter to improve clock stability.

Signed-off-by: York Sun 
CC: Heiko Schocher 

---

Changes in v6:
  Add erratum number

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
  Add comment to I2C workaround

 arch/arm/cpu/armv8/fsl-lsch3/soc.c |   34 ++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/cpu/armv8/fsl-lsch3/soc.c 
b/arch/arm/cpu/armv8/fsl-lsch3/soc.c
index ca00108..2538001 100644
--- a/arch/arm/cpu/armv8/fsl-lsch3/soc.c
+++ b/arch/arm/cpu/armv8/fsl-lsch3/soc.c
@@ -37,11 +37,45 @@ static void erratum_rcw_src(void)
 #endif
 }
 
+#define I2C_DEBUG_REG 0x6
+#define I2C_GLITCH_EN 0x8
+/*
+ * This erratum requires setting glitch_en bit to enable
+ * digital glitch filter to improve clock stability.
+ */
+static void erratum_a009203(void)
+{
+   u8 __iomem *ptr;
+#ifdef CONFIG_SYS_I2C
+#ifdef I2C1_BASE_ADDR
+   ptr = (u8 __iomem *)(I2C1_BASE_ADDR + I2C_DEBUG_REG);
+
+   writeb(I2C_GLITCH_EN, ptr);
+#endif
+#ifdef I2C2_BASE_ADDR
+   ptr = (u8 __iomem *)(I2C2_BASE_ADDR + I2C_DEBUG_REG);
+
+   writeb(I2C_GLITCH_EN, ptr);
+#endif
+#ifdef I2C3_BASE_ADDR
+   ptr = (u8 __iomem *)(I2C3_BASE_ADDR + I2C_DEBUG_REG);
+
+   writeb(I2C_GLITCH_EN, ptr);
+#endif
+#ifdef I2C4_BASE_ADDR
+   ptr = (u8 __iomem *)(I2C4_BASE_ADDR + I2C_DEBUG_REG);
+
+   writeb(I2C_GLITCH_EN, ptr);
+#endif
+#endif
+}
+
 void fsl_lsch3_early_init_f(void)
 {
erratum_a008751();
erratum_rcw_src();
init_early_memctl_regs();   /* tighten IFC timing */
+   erratum_a009203();
 }
 
 #ifdef CONFIG_SPL_BUILD
-- 
1.7.9.5

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


[U-Boot] [PATCH] ARM: tegra: fix colibri_t20 machine type

2015-03-23 Thread Marcel Ziswiler
A while ago I got Russell to change the machine type of our Colibri T20
from COLIBRI_TEGRA2 to COLIBRI_T20 which is also reflected in his
machine registry:

http://www.arm.linux.org.uk/developer/machines/list.php?id=3323
---
 arch/arm/include/asm/mach-types.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
index d4a447b..c424a22 100644
--- a/arch/arm/include/asm/mach-types.h
+++ b/arch/arm/include/asm/mach-types.h
@@ -936,7 +936,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_CWME9210 3320
 #define MACH_TYPE_CWME9210JS   3321
 #define MACH_TYPE_PGS_SITARA   3322
-#define MACH_TYPE_COLIBRI_TEGRA2   3323
+#define MACH_TYPE_COLIBRI_T20  3323
 #define MACH_TYPE_W21  3324
 #define MACH_TYPE_POLYSAT1 3325
 #define MACH_TYPE_DATAWAY  3326
@@ -12197,16 +12197,16 @@ extern unsigned int __machine_arch_type;
 # define machine_is_pgs_v1()   (0)
 #endif
 
-#ifdef CONFIG_MACH_COLIBRI_TEGRA2
+#ifdef CONFIG_MACH_COLIBRI_T20
 # ifdef machine_arch_type
 #  undef machine_arch_type
 #  define machine_arch_type__machine_arch_type
 # else
-#  define machine_arch_typeMACH_TYPE_COLIBRI_TEGRA2
+#  define machine_arch_typeMACH_TYPE_COLIBRI_T20
 # endif
-# define machine_is_colibri_tegra2()   (machine_arch_type == 
MACH_TYPE_COLIBRI_TEGRA2)
+# define machine_is_colibri_t20()  (machine_arch_type == 
MACH_TYPE_COLIBRI_T20)
 #else
-# define machine_is_colibri_tegra2()   (0)
+# define machine_is_colibri_t20()  (0)
 #endif
 
 #ifdef CONFIG_MACH_W21
-- 
1.9.3

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


[U-Boot] [PATCH] ARM: tegra: fix colibri_t20 asix reset

2015-03-23 Thread Marcel Ziswiler
Fix ASIX USB to Ethernet chip reset.
---
 board/toradex/colibri_t20/colibri_t20.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/board/toradex/colibri_t20/colibri_t20.c 
b/board/toradex/colibri_t20/colibri_t20.c
index 4656094..5d8bdec 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -46,7 +46,14 @@ void pin_mux_usb(void)
/* VBus GPIO */
pinmux_tristate_disable(PMUX_PINGRP_DTE);
 
-   /* USB 1 aka Tegra USB port 3 VBus */
+   /* Reset ASIX using LAN_RESET */
+   gpio_request(GPIO_PV4, "LAN_RESET");
+   gpio_direction_output(GPIO_PV4, 0);
+   pinmux_tristate_disable(PMUX_PINGRP_GPV);
+   udelay(5);
+   gpio_set_value(GPIO_PV4, 1);
+
+   /* USBH_PEN: USB 1 aka Tegra USB port 3 VBus */
pinmux_tristate_disable(PMUX_PINGRP_SPIG);
 }
 #endif
-- 
1.9.3

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


[U-Boot] [PATCH] ARM: tegra: update colibri_t20 configuration

2015-03-23 Thread Marcel Ziswiler
Bring the Colibri T20 configuration in-line with Apalis/Colibri T30.
---
 include/configs/colibri_t20.h | 31 +++
 1 file changed, 27 insertions(+), 4 deletions(-)

diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index e80e9ed..c17f245 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -14,9 +14,12 @@
 #define CONFIG_TEGRA_BOARD_STRING  "Toradex Colibri T20"
 
 /* Board-specific serial config */
+#define CONFIG_SERIAL_MULTI
 #define CONFIG_TEGRA_ENABLE_UARTA
 #define CONFIG_TEGRA_UARTA_SDIO1
-#define CONFIG_SYS_NS16550_COM1NV_PA_APB_UARTA_BASE
+#define CONFIG_SYS_NS16550_COM1NV_PA_APB_UARTA_BASE
+
+#define CONFIG_MACH_TYPE   MACH_TYPE_COLIBRI_T20
 
 /* SD/MMC support */
 #define CONFIG_MMC
@@ -29,17 +32,17 @@
 #define CONFIG_USB_EHCI_TEGRA
 #define CONFIG_USB_ULPI
 #define CONFIG_USB_ULPI_VIEWPORT
-#define CONFIG_USB_STORAGE
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 3
+#define CONFIG_USB_STORAGE
 #define CONFIG_CMD_USB
 
 /* USB networking support */
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+
+/* General networking support */
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_DHCP
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_PING
 
 /* NAND support */
 #define CONFIG_CMD_NAND
@@ -56,6 +59,26 @@
 #define CONFIG_CMD_BDI
 #define CONFIG_CMD_CACHE
 
+/* Miscellaneous commands */
+#define CONFIG_CMD_SETEXPR
+#define CONFIG_FAT_WRITE
+
+/* Increase console I/O buffer size */
+#undef CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_CBSIZE  1024
+
+/* Increase arguments buffer size */
+#undef CONFIG_SYS_BARGSIZE
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
+
+/* Increase print buffer size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+
+/* Increase maximum number of arguments */
+#undef CONFIG_SYS_MAXARGS
+#define CONFIG_SYS_MAXARGS 32
+
+#include "tegra-common-usb-gadget.h"
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
-- 
1.9.3

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


Re: [U-Boot] [PATCH v5 17/28] armv8/fsl-lsch3: Enable system error aborts

2015-03-23 Thread York Sun

On 03/20/2015 07:28 PM, York Sun wrote:
> From: Scott Wood 
> 
> This lets us see the problems (close to) when they happen,
> rather than Linux hanging when it enables them prior to having a
> working console.
> 
> Signed-off-by: Scott Wood 
> Signed-off-by: York Sun 
> ---
> 
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  arch/arm/cpu/armv8/fsl-lsch3/cpu.c |4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c 
> b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
> index 07064a3..22b5fb2 100644
> --- a/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
> +++ b/arch/arm/cpu/armv8/fsl-lsch3/cpu.c
> @@ -263,6 +263,10 @@ int arch_cpu_init(void)
>   __asm_invalidate_tlb_all();
>   early_mmu_setup();
>   set_sctlr(get_sctlr() | CR_C);
> +
> + /* Enable system error aborts */
> + asm volatile("msr daifclr, #4" : : : "memory");
> +

I should have dropped this patch according to Scott's comment.

York

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


Re: [U-Boot] [PATCH] remove unnecessary version.h includes

2015-03-23 Thread Lukasz Majewski
Hi Rob,

>  board/samsung/trats/setup.h| 1 -

Acked-by: Lukasz Majewski 

Rob, thanks for preparing the patch.

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/5] ARM: tegra: rename colibri_t20 board

2015-03-23 Thread Marcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed
for Apalis/Colibri T30 get rid of the carrier board in the board
naming.

While at it also bring the prompt more in line with our other products.
---
 arch/arm/mach-tegra/tegra20/Kconfig | 2 +-
 board/toradex/colibri_t20/Kconfig   | 4 ++--
 board/toradex/colibri_t20/MAINTAINERS   | 9 +
 board/toradex/colibri_t20/Makefile  | 2 +-
 board/toradex/colibri_t20/{colibri_t20_iris.c => colibri_t20.c} | 0
 configs/colibri_t20_defconfig   | 2 +-
 include/configs/colibri_t20.h   | 6 +++---
 tools/buildman/README   | 2 +-
 8 files changed, 14 insertions(+), 13 deletions(-)
 rename board/toradex/colibri_t20/{colibri_t20_iris.c => colibri_t20.c} (100%)

diff --git a/arch/arm/mach-tegra/tegra20/Kconfig 
b/arch/arm/mach-tegra/tegra20/Kconfig
index e88ac16..7f09f81 100644
--- a/arch/arm/mach-tegra/tegra20/Kconfig
+++ b/arch/arm/mach-tegra/tegra20/Kconfig
@@ -30,7 +30,7 @@ config TARGET_VENTANA
 config TARGET_WHISTLER
bool "NVIDIA Tegra20 Whistler evaluation board"
 
-config TARGET_COLIBRI_T20_IRIS
+config TARGET_COLIBRI_T20
bool "Toradex Colibri T20 board"
 
 endchoice
diff --git a/board/toradex/colibri_t20/Kconfig 
b/board/toradex/colibri_t20/Kconfig
index cd308be..7f373b2 100644
--- a/board/toradex/colibri_t20/Kconfig
+++ b/board/toradex/colibri_t20/Kconfig
@@ -1,7 +1,7 @@
-if TARGET_COLIBRI_T20_IRIS
+if TARGET_COLIBRI_T20
 
 config SYS_BOARD
-   default "colibri_t20_iris"
+   default "colibri_t20"
 
 config SYS_VENDOR
default "toradex"
diff --git a/board/toradex/colibri_t20/MAINTAINERS 
b/board/toradex/colibri_t20/MAINTAINERS
index c68955b..b251c00 100644
--- a/board/toradex/colibri_t20/MAINTAINERS
+++ b/board/toradex/colibri_t20/MAINTAINERS
@@ -1,6 +1,7 @@
-COLIBRI_T20_IRIS BOARD
+COLIBRI_T20
 M: Lucas Stach 
 S: Maintained
-F: board/toradex/colibri_t20_iris/
-F: include/configs/colibri_t20_iris.h
-F: configs/colibri_t20_iris_defconfig
+F: board/toradex/colibri_t20/
+F: include/configs/colibri_t20.h
+F: configs/colibri_t20_defconfig
+F: arch/arm/dts/tegra20-colibri.dtb
diff --git a/board/toradex/colibri_t20/Makefile 
b/board/toradex/colibri_t20/Makefile
index f286aec..86f78d9 100644
--- a/board/toradex/colibri_t20/Makefile
+++ b/board/toradex/colibri_t20/Makefile
@@ -6,4 +6,4 @@
 
 include $(srctree)/board/nvidia/common/common.mk
 
-obj-y  += colibri_t20_iris.o
+obj-y  += colibri_t20.o
diff --git a/board/toradex/colibri_t20/colibri_t20_iris.c 
b/board/toradex/colibri_t20/colibri_t20.c
similarity index 100%
rename from board/toradex/colibri_t20/colibri_t20_iris.c
rename to board/toradex/colibri_t20/colibri_t20.c
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index af8e435..8987567 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -1,5 +1,5 @@
 CONFIG_ARM=y
 CONFIG_TEGRA=y
 CONFIG_TEGRA20=y
-CONFIG_TARGET_COLIBRI_T20_IRIS=y
+CONFIG_TARGET_COLIBRI_T20=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 4888c94..e80e9ed 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2012 Lucas Stach
+ * Copyright (C) 2012 Lucas Stach
  *
  * SPDX-License-Identifier:GPL-2.0+
  */
@@ -10,8 +10,8 @@
 #include "tegra20-common.h"
 
 /* High-level configuration options */
-#define V_PROMPT   "Tegra20 (Colibri) # "
-#define CONFIG_TEGRA_BOARD_STRING  "Toradex Colibri T20 on Iris"
+#define V_PROMPT   "Colibri T20 # "
+#define CONFIG_TEGRA_BOARD_STRING  "Toradex Colibri T20"
 
 /* Board-specific serial config */
 #define CONFIG_TEGRA_ENABLE_UARTA
diff --git a/tools/buildman/README b/tools/buildman/README
index cf7bf5c..e870d54 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -613,7 +613,7 @@ $ ./tools/buildman/buildman -b us-mem4 -sSdB
  run_list_real 19962000  +4
  do_nandboot760 756  -4
  do_mem_crc 168  68-100
-colibri_t20_iris:  all -9  rodata -29  text +20
+colibri_t20:  all -9  rodata -29  text +20
u-boot: add: 1/0, grow: 2/-3 bytes: 140/-112 (28)
  function   old new   delta
  hash_command80 160 +80
-- 
1.9.3

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


[U-Boot] [PATCH 0/5] rename colibri_t20

2015-03-23 Thread Marcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed
upon for Apalis/Colibri T30 [1] get rid of the carrier board post fix
in the board/configuration/device-tree naming.

[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/192041

Marcel Ziswiler (5):
  ARM: tegra: rename colibri_t20 configuration
  ARM: tegra: rename colibri_t20 device-tree
  ARM: tegra: get rid of colibri_t20-common
  ARM: tegra: rename colibri_t20 board folder
  ARM: tegra: rename colibri_t20 board

 arch/arm/dts/Makefile  |  2 +-
 ...20-colibri_t20_iris.dts => tegra20-colibri.dts} |  0
 arch/arm/mach-tegra/tegra20/Kconfig|  4 +--
 .../colibri_t20-common/colibri_t20-common.h|  7 -
 .../{colibri_t20_iris => colibri_t20}/Kconfig  |  6 ++--
 board/toradex/colibri_t20/MAINTAINERS  |  7 +
 board/toradex/colibri_t20/Makefile |  9 ++
 .../colibri_t20.c} | 33 +++-
 board/toradex/colibri_t20_iris/MAINTAINERS |  6 
 board/toradex/colibri_t20_iris/Makefile|  9 --
 board/toradex/colibri_t20_iris/colibri_t20_iris.c  | 36 --
 configs/colibri_t20_defconfig  |  5 +++
 configs/colibri_t20_iris_defconfig |  5 ---
 .../configs/{colibri_t20_iris.h => colibri_t20.h}  |  6 ++--
 tools/buildman/README  |  2 +-
 15 files changed, 56 insertions(+), 81 deletions(-)
 rename arch/arm/dts/{tegra20-colibri_t20_iris.dts => tegra20-colibri.dts} 
(100%)
 delete mode 100644 board/toradex/colibri_t20-common/colibri_t20-common.h
 rename board/toradex/{colibri_t20_iris => colibri_t20}/Kconfig (51%)
 create mode 100644 board/toradex/colibri_t20/MAINTAINERS
 create mode 100644 board/toradex/colibri_t20/Makefile
 rename board/toradex/{colibri_t20-common/colibri_t20-common.c => 
colibri_t20/colibri_t20.c} (65%)
 delete mode 100644 board/toradex/colibri_t20_iris/MAINTAINERS
 delete mode 100644 board/toradex/colibri_t20_iris/Makefile
 delete mode 100644 board/toradex/colibri_t20_iris/colibri_t20_iris.c
 create mode 100644 configs/colibri_t20_defconfig
 delete mode 100644 configs/colibri_t20_iris_defconfig
 rename include/configs/{colibri_t20_iris.h => colibri_t20.h} (89%)

-- 
1.9.3

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


[U-Boot] [PATCH 1/5] ARM: tegra: rename colibri_t20 configuration

2015-03-23 Thread Marcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed
for Apalis/Colibri T30 get rid of the carrier board in the
configuration naming.
---
 board/toradex/colibri_t20_iris/Kconfig| 2 +-
 configs/{colibri_t20_iris_defconfig => colibri_t20_defconfig} | 0
 include/configs/{colibri_t20_iris.h => colibri_t20.h} | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename configs/{colibri_t20_iris_defconfig => colibri_t20_defconfig} (100%)
 rename include/configs/{colibri_t20_iris.h => colibri_t20.h} (100%)

diff --git a/board/toradex/colibri_t20_iris/Kconfig 
b/board/toradex/colibri_t20_iris/Kconfig
index 4bf7278..cd308be 100644
--- a/board/toradex/colibri_t20_iris/Kconfig
+++ b/board/toradex/colibri_t20_iris/Kconfig
@@ -7,6 +7,6 @@ config SYS_VENDOR
default "toradex"
 
 config SYS_CONFIG_NAME
-   default "colibri_t20_iris"
+   default "colibri_t20"
 
 endif
diff --git a/configs/colibri_t20_iris_defconfig b/configs/colibri_t20_defconfig
similarity index 100%
rename from configs/colibri_t20_iris_defconfig
rename to configs/colibri_t20_defconfig
diff --git a/include/configs/colibri_t20_iris.h b/include/configs/colibri_t20.h
similarity index 100%
rename from include/configs/colibri_t20_iris.h
rename to include/configs/colibri_t20.h
-- 
1.9.3

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


[U-Boot] [PATCH 3/5] ARM: tegra: get rid of colibri_t20-common

2015-03-23 Thread Marcel Ziswiler
As a preparatory step to renaming the board folder as well first get
rid of the colibri_t20-common after having integrated it into
colibri_t20_iris for now.

While at it also migrate to using NVIDIA's common.mk magic.
---
 .../colibri_t20-common/colibri_t20-common.h|  7 -
 board/toradex/colibri_t20_iris/Makefile|  4 +--
 .../colibri_t20_iris.c}| 33 --
 3 files changed, 27 insertions(+), 17 deletions(-)
 delete mode 100644 board/toradex/colibri_t20-common/colibri_t20-common.h
 rename board/toradex/{colibri_t20-common/colibri_t20-common.c => 
colibri_t20_iris/colibri_t20_iris.c} (65%)

diff --git a/board/toradex/colibri_t20-common/colibri_t20-common.h 
b/board/toradex/colibri_t20-common/colibri_t20-common.h
deleted file mode 100644
index 1fe53f6..000
--- a/board/toradex/colibri_t20-common/colibri_t20-common.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- *  Copyright (C) 2012 Lucas Stach
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-
-void colibri_t20_common_pin_mux_usb(void);
diff --git a/board/toradex/colibri_t20_iris/Makefile 
b/board/toradex/colibri_t20_iris/Makefile
index ebeac70..f286aec 100644
--- a/board/toradex/colibri_t20_iris/Makefile
+++ b/board/toradex/colibri_t20_iris/Makefile
@@ -4,6 +4,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-y  := ../../nvidia/common/board.o
-obj-y  += ../colibri_t20-common/colibri_t20-common.o
+include $(srctree)/board/nvidia/common/common.mk
+
 obj-y  += colibri_t20_iris.o
diff --git a/board/toradex/colibri_t20-common/colibri_t20-common.c 
b/board/toradex/colibri_t20_iris/colibri_t20_iris.c
similarity index 65%
rename from board/toradex/colibri_t20-common/colibri_t20-common.c
rename to board/toradex/colibri_t20_iris/colibri_t20_iris.c
index 58a9916..4656094 100644
--- a/board/toradex/colibri_t20-common/colibri_t20-common.c
+++ b/board/toradex/colibri_t20_iris/colibri_t20_iris.c
@@ -9,27 +9,44 @@
 #include 
 #include 
 #include 
+#include 
 
-#include "colibri_t20-common.h"
+#ifdef CONFIG_TEGRA_MMC
+/*
+ * Routine: pin_mux_mmc
+ * Description: setup the pin muxes/tristate values for the SDMMC(s)
+ */
+void pin_mux_mmc(void)
+{
+   funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_4_BIT);
+   pinmux_tristate_disable(PMUX_PINGRP_GMB);
+}
+#endif
+
+#ifdef CONFIG_TEGRA_NAND
+void pin_mux_nand(void)
+{
+   funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_NDFLASH_KBC_8_BIT);
+}
+#endif
 
 #ifdef CONFIG_USB_EHCI_TEGRA
-void colibri_t20_common_pin_mux_usb(void)
+void pin_mux_usb(void)
 {
/* module internal USB bus to connect ethernet chipset */
funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
+
/* ULPI reference clock output */
pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
+
/* PHY reset GPIO */
pinmux_tristate_disable(PMUX_PINGRP_UAC);
+
/* VBus GPIO */
pinmux_tristate_disable(PMUX_PINGRP_DTE);
-}
-#endif
 
-#ifdef CONFIG_TEGRA_NAND
-void pin_mux_nand(void)
-{
-   funcmux_select(PERIPH_ID_NDFLASH, FUNCMUX_NDFLASH_KBC_8_BIT);
+   /* USB 1 aka Tegra USB port 3 VBus */
+   pinmux_tristate_disable(PMUX_PINGRP_SPIG);
 }
 #endif
-- 
1.9.3

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


[U-Boot] [PATCH 2/5] ARM: tegra: rename colibri_t20 device-tree

2015-03-23 Thread Marcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed
for Apalis/Colibri T30 get rid of the carrier board in the device-tree
naming.
---
 arch/arm/dts/Makefile  | 2 +-
 arch/arm/dts/{tegra20-colibri_t20_iris.dts => tegra20-colibri.dts} | 0
 configs/colibri_t20_defconfig  | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/dts/{tegra20-colibri_t20_iris.dts => tegra20-colibri.dts} 
(100%)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index cbe5b86..f897e6d 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -24,7 +24,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
tegra20-trimslice.dtb \
tegra20-ventana.dtb \
tegra20-whistler.dtb \
-   tegra20-colibri_t20_iris.dtb \
+   tegra20-colibri.dtb \
tegra30-apalis.dtb \
tegra30-beaver.dtb \
tegra30-cardhu.dtb \
diff --git a/arch/arm/dts/tegra20-colibri_t20_iris.dts 
b/arch/arm/dts/tegra20-colibri.dts
similarity index 100%
rename from arch/arm/dts/tegra20-colibri_t20_iris.dts
rename to arch/arm/dts/tegra20-colibri.dts
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index a14d55a..af8e435 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -2,4 +2,4 @@ CONFIG_ARM=y
 CONFIG_TEGRA=y
 CONFIG_TEGRA20=y
 CONFIG_TARGET_COLIBRI_T20_IRIS=y
-CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri_t20_iris"
+CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
-- 
1.9.3

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


[U-Boot] [PATCH 4/5] ARM: tegra: rename colibri_t20 board folder

2015-03-23 Thread Marcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed
for Apalis/Colibri T30 get rid of the carrier board in the board folder
naming.

Please note that this temporarily breaks the build as Kconfig within
this folder will require changing as well.
---
 arch/arm/mach-tegra/tegra20/Kconfig| 2 +-
 board/toradex/{colibri_t20_iris => colibri_t20}/Kconfig| 0
 board/toradex/{colibri_t20_iris => colibri_t20}/MAINTAINERS| 0
 board/toradex/{colibri_t20_iris => colibri_t20}/Makefile   | 0
 board/toradex/{colibri_t20_iris => colibri_t20}/colibri_t20_iris.c | 0
 5 files changed, 1 insertion(+), 1 deletion(-)
 rename board/toradex/{colibri_t20_iris => colibri_t20}/Kconfig (100%)
 rename board/toradex/{colibri_t20_iris => colibri_t20}/MAINTAINERS (100%)
 rename board/toradex/{colibri_t20_iris => colibri_t20}/Makefile (100%)
 rename board/toradex/{colibri_t20_iris => colibri_t20}/colibri_t20_iris.c 
(100%)

diff --git a/arch/arm/mach-tegra/tegra20/Kconfig 
b/arch/arm/mach-tegra/tegra20/Kconfig
index a354e2a..e88ac16 100644
--- a/arch/arm/mach-tegra/tegra20/Kconfig
+++ b/arch/arm/mach-tegra/tegra20/Kconfig
@@ -47,6 +47,6 @@ source "board/avionic-design/tec/Kconfig"
 source "board/compulab/trimslice/Kconfig"
 source "board/nvidia/ventana/Kconfig"
 source "board/nvidia/whistler/Kconfig"
-source "board/toradex/colibri_t20_iris/Kconfig"
+source "board/toradex/colibri_t20/Kconfig"
 
 endif
diff --git a/board/toradex/colibri_t20_iris/Kconfig 
b/board/toradex/colibri_t20/Kconfig
similarity index 100%
rename from board/toradex/colibri_t20_iris/Kconfig
rename to board/toradex/colibri_t20/Kconfig
diff --git a/board/toradex/colibri_t20_iris/MAINTAINERS 
b/board/toradex/colibri_t20/MAINTAINERS
similarity index 100%
rename from board/toradex/colibri_t20_iris/MAINTAINERS
rename to board/toradex/colibri_t20/MAINTAINERS
diff --git a/board/toradex/colibri_t20_iris/Makefile 
b/board/toradex/colibri_t20/Makefile
similarity index 100%
rename from board/toradex/colibri_t20_iris/Makefile
rename to board/toradex/colibri_t20/Makefile
diff --git a/board/toradex/colibri_t20_iris/colibri_t20_iris.c 
b/board/toradex/colibri_t20/colibri_t20_iris.c
similarity index 100%
rename from board/toradex/colibri_t20_iris/colibri_t20_iris.c
rename to board/toradex/colibri_t20/colibri_t20_iris.c
-- 
1.9.3

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


Re: [U-Boot] [PATCH v5 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture

2015-03-23 Thread York Sun


On 03/23/2015 11:02 AM, Kim Phillips wrote:
> On Fri, 20 Mar 2015 19:28:18 -0700
> York Sun  wrote:
> 
>> From: "J. German Rivera" 
>>
>> Changed MC firmware loading to comply with the new MC boot architecture.
>> Flush D-cache hierarchy after loading MC images. Add environment
>> variables "mcboottimeout" for MC boot timeout in milliseconds,
>> "mcmemsize" for MC DRAM block size. Check MC boot status before calling
>> flib functions.
>>
>> Signed-off-by: J. German Rivera 
>> Signed-off-by: York Sun 
>> ---
>>
>> Changes in v5: None
>> Changes in v4: None
>> Changes in v3: None
>> Changes in v2: None
> 
> Hi, I made comments to v1 of this patch - why is it being
> resubmitted without them being addressed?
> 

Kim,

Your comment was not addressed. I am hoping German can respond.
I upreved the patch set due to many of them have been updated. The change log
shows what has been changed.

York

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


Re: [U-Boot] [PATCH v5 14/28] drivers/fsl-mc: Changed MC firmware loading for new boot architecture

2015-03-23 Thread Kim Phillips
On Fri, 20 Mar 2015 19:28:18 -0700
York Sun  wrote:

> From: "J. German Rivera" 
> 
> Changed MC firmware loading to comply with the new MC boot architecture.
> Flush D-cache hierarchy after loading MC images. Add environment
> variables "mcboottimeout" for MC boot timeout in milliseconds,
> "mcmemsize" for MC DRAM block size. Check MC boot status before calling
> flib functions.
> 
> Signed-off-by: J. German Rivera 
> Signed-off-by: York Sun 
> ---
> 
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None

Hi, I made comments to v1 of this patch - why is it being
resubmitted without them being addressed?

Thanks,

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


Re: [U-Boot] [PATCH V2] Document config_distro_bootcmd environment variables for interactive booting.

2015-03-23 Thread Stephen Warren

On 03/21/2015 07:15 AM, Karsten Merker wrote:

config_distro_bootcmd.h defines a common boot environment for multiple
platforms, including several environment variables that are intended for
interactive use by an end-user.  Document which variables are considered
public interfaces that must remain compatible in future u-boot versions.


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


Re: [U-Boot] [PATCH] ARM: tegra: fix colibri_t20 machine type

2015-03-23 Thread Stephen Warren

On 03/23/2015 11:43 AM, Marcel Ziswiler wrote:

A while ago I got Russell to change the machine type of our Colibri T20
from COLIBRI_TEGRA2 to COLIBRI_T20 which is also reflected in his
machine registry:

http://www.arm.linux.org.uk/developer/machines/list.php?id=3323


Only "half" of the references there seem to be updated; there are still 
some mentions of e.g. CONFIG_MACH_COLIBRI_TEGRA2, 
MACH_TYPE_COLIBRI_TEGRA2. Perhaps it's still in flux?


Even so, this change seems fine since it does better represent the name 
of the board.


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


Re: [U-Boot] [PATCH 4/5] ARM: tegra: rename colibri_t20 board folder

2015-03-23 Thread Stephen Warren

On 03/23/2015 11:28 AM, Marcel Ziswiler wrote:

In accordance with our other modules supported by U-Boot and as agreed
for Apalis/Colibri T30 get rid of the carrier board in the board folder
naming.

Please note that this temporarily breaks the build as Kconfig within
this folder will require changing as well.


Conceptually this series seems fine to me, but I'd recommend squashing 
some/all of the patches together in order to avoid any intermediate 
breakage and "git bisect" issues.

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


Re: [U-Boot] [PATCH 3/5] ARM: tegra: get rid of colibri_t20-common

2015-03-23 Thread Stephen Warren

On 03/23/2015 11:28 AM, Marcel Ziswiler wrote:

As a preparatory step to renaming the board folder as well first get
rid of the colibri_t20-common after having integrated it into
colibri_t20_iris for now.

While at it also migrate to using NVIDIA's common.mk magic.


Is it possible to separate the removal of colibri_t20-common into a 
separate commit from the renames, so that the two are lumped together.


I'd rather expect this series to have two commits:

1) Remove colibri_t20-common and move the C code into the board file.

2) Everything related to the rename.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] config: Use booti instead of bootz on 64-bit ARM

2015-03-23 Thread Stephen Warren

On 03/20/2015 11:07 AM, Tom Rini wrote:

On Fri, Mar 20, 2015 at 10:17:00AM -0600, Stephen Warren wrote:

On 03/20/2015 05:56 AM, Thierry Reding wrote:

From: Thierry Reding 

The bootz command doesn't work with Linux kernel images on 64-bit ARM.
The replacement command with the same interface and functionality is
booti.


Uggh. Why can't bootz work everywhere, or why can't bootz be an
alias to booti on ARM64? Are the command-line parameters different?
It'd be really nice to be able to create one boot.scr.uimg file that
just works everywhere, and having different command names will
scupper that.


So, a long while back I asked about maybe adding a
"bootSOMETHING-THAT-GUESSES-YOUR-FORMAT" command to help here.  The
issue is that "bootz" means "boot an ARM Linux Kernel with the kernel's
decompressor that's at the front".  It's not even (sadly, arg) what
"boot an x86 Linux Kernel with the kernel's decompressor that's at the
front" is, that's zboot.  In the kernel (today), there's no desire to
add the decompressor "arm" has to "aarch64" and instead leave
decompression to the loader (And compression to the user).  So we have
to handle the Image format that aarch64 uses.

Frankly I've always looked at the distro work here as the
"boot-do-what-I-mean" stuff where we hide that the common multi-platform
image types aren't popular and just let people boot the "normal" kernel
for their architecture.


Ah yes, I guess that's true. A hypothetical universal "boot this image" 
function would be nice to enable everywhere. IIRC, bootm does some image 
format detection (uimage vs. FIT) so perhaps it could just grow the 
ability to boot anything?


I suppose it isn't too hard for a distro to detect ARM vs. ARM64 vs. x86 
and select bootz/booti/zboot for those cases, so long as all boards of 
an architecture are consistent.

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


Re: [U-Boot] Rework the network stack

2015-03-23 Thread Simon Glass
Hi,

On 23 March 2015 at 13:55, Jörg Krause  wrote:
>
> Joe, Simon,
>
> On Mo, 2015-03-23 at 10:46 -0600, Simon Glass wrote:
> > Hi Jörg,
> >
> > On 22 March 2015 at 14:37, Jörg Krause  wrote:
> > > Hi Joe,
> > >
> > > On Sa, 2015-03-21 at 22:59 -0500, Joe Hershberger wrote:
> > >> Hi Jörg,
> > >>
> > >> On Sat, Mar 21, 2015 at 3:33 AM, Jörg Krause 
> > >> 
> > >> wrote:
> > >> >
> > >> > Hi all,
> > >> >
> > >> > there is an issue with the current network stack using netconsole. It's
> > >> > impossible to use network commands as TFTP inside netconsole, because
> > >> > they try to run as atomic network commands.
> > >> >
> > >> > The issue was already reported by Stefano Babic in 2010:
> > >> > [U-Boot] NetConsole and network API
> > >> > http://lists.denx.de/pipermail/u-boot/2010-August/075535.html
> > >>
> > >> I worked around this problem here:
> > >>
> > >> http://lists.denx.de/pipermail/u-boot/2012-August/129913.html
> > >
> > > I know about this patch, and I understand the problem it tries to
> > > workaround. But it does not work for using netconsole with another
> > > protocol like ping. When for example ping enters the NetLoop() it will
> > > halt the network device.
> > >
> > > The problem for this is here:
> > > if (eth_is_on_demand_init() || protocol != NETCONS) {
> > > eth_halt();
> > > ...
> > > }
> > >
> > > eth_is_on_demand_init() returns correctly with false, because PING !=
> > > NETCONS. But the second expression results in true, because PING !=
> > > NETCONS.
> > >
> > >> > I run into the same problem:
> > >> > [U-Boot] netconsole: USB Ethernet connection dropping with ping or
> > >> > tftpboot
> > >> > http://lists.denx.de/pipermail/u-boot/2015-February/203838.html
> > >>
> > >> I didn't understand what about your case was not able to work given the
> > >> workaround I implemented previously. What was different about it?
> > >>
> > >> > I have looked at the current network stack. The stack is based on the
> > >> > concept of atomic network commands. The implementation for netconsole
> > >> > looks very confusing.
> > >>
> > >> There is no doubt that netconsole is quite confusing as it exists today.
> > >
> > > I tried to fix the issue, but it did not work properly.
> > >
> > >> > Sascha Hauer has reimplemented the network stack for Barebox:
> > >> > http://www.spinics.net/lists/u-boot-v2/msg00914.html
> > >> >
> > >> > Looking at the current implementation of net.c looks very clean and
> > >> > well-designed.
> > >>
> > >> Thanks for pointing this out. I hadn't gone to look at the network stack 
> > >> in
> > >> barebox.
> > >>
> > >> > What do you think about porting this to U-Boot?
> > >>
> > >> I can look into this. Naturally there are many other changes to u-boot
> > >> network stack since the time barebox forked, so I expect such a port to 
> > >> be
> > >> very intensive... most likely a near complete rewrite of Sascha's series,
> > >> but I will investigate further.
> > >
> > > I had a look at the patches and the code base is not entirely the same.
> > > But maybe we should just stick to the crucial points of the new network
> > > stack:
> > >
> > > 1) A network device gets initialized when it becomes the current one and
> > > gets brought down when it's not used anymore or prior booting to Linux
> > > so the connection remains active all the time.
> > >
> > > My thoughts about this one:
> > > Bringing the device down can be done in eth_unregister(). Initializing
> > > for the current device can be done in eth_current_changed(). What I like
> > > even better is to make eth_current_changed() the sole place for calling
> > > init() and halt(). It would have to be extend to take at least two
> > > parameters, eth_current and new_current. If eth_current is null just
> > > bring up the new device, if new_current is null just bring down the
> > > current device.
> > >
> > > 2) Replace the NetLoop by a connection list where each protocol uses a
> > > connection to send and receive packets.
> > >
> > > This induce to port all protocols to use the new network, of cause.
> > >
> > > In my opinion it would be also good to do some clean ups and
> > > restructuring of code. Put more functions into net-utils, is there a
> > > need for eth_init and so on.
> >
> > Joe has done a lot of work to move U-Boot's network stack over to
> > driver model. This is now at u-boot-dm/next waiting for the merge
> > window to open.
> >
> > The connection list idea does not sound like a hugely complex change.
> > Are you thinking of trying it out?
>
> I have just noticed today the big series of u-boot-dm patches of Joe. I
> will try it out. But before I will start I want to discuss the concept.
> What do you think about my thoughts about bringing up and down a network
> device?

Joe is the expert here.

With driver model the actual bring-up should be automatic (i.e. it is
probed as soon as it is used).

Regards,
Simon
___

Re: [U-Boot] [PATCH] config: Define BOOTP client architecture and VCI for ARMv8

2015-03-23 Thread Stephen Warren

On 03/20/2015 11:08 AM, Tom Rini wrote:

On Fri, Mar 20, 2015 at 10:22:59AM -0600, Stephen Warren wrote:

On 03/20/2015 06:11 AM, Thierry Reding wrote:

From: Thierry Reding 

Reuse the 32-bit ARM client architecture and identify ARMv8 specifically
by setting the BOOTP VCI string.


Is there a newer version of
https://www.rfc-editor.org/rfc/rfc4578.txt that says what this value
should be? Even 32-bit ARM isn't in that document, so I'm not sure
where 0x100 came from.


I wonder if 0x100 is treated by the PXE implementations as "set but
invalid, don't use".  Digging into some PXE servers would shed some
light here.


I can't actually find any use of this in ISC DHCPd. At most, it might be 
a value that user config files can match against if they want. I guess 
it's not worth worrying about?

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


  1   2   >