[U-Boot] [PATCH] drivers:usb:common:fsl-dt-fixup: Fix the dt for all type of usb controllers

2016-06-19 Thread Sriram Dash
Currently, U-boot doesn't allow to compile more than one type of USB protocol
simultaneously. Hence, EHCI and XHCI controllers cannot co-exist and
CONFIG_USB_MAX_CONTROLLER_COUNT macro represents count of only one type of
controller.

For the Socs which have more than one type of controller e.g. EHCI and XHCI,
and the device tree has to support both of them, the macro
CONFIG_USB_MAX_CONTROLLER_COUNT will not work for fixing dt from u boot.

So, instead of taking the hard coded number of controller from U boot,
count the total number of controller present in dt and then fix the dt
accordingly.

Signed-off-by: Sriram Dash 
Signed-off-by: Rajesh Bhagat 
---
 drivers/usb/common/fsl-dt-fixup.c | 27 ++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/common/fsl-dt-fixup.c 
b/drivers/usb/common/fsl-dt-fixup.c
index 9c48852..1edf146 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -131,10 +131,29 @@ static int fdt_fixup_erratum(int *usb_erratum_off, void 
*blob,
return 0;
 }
 
+static int fdt_max_controller_count(void *blob)
+{
+   int count = 0;
+   int node_offset = -1;
+   int i;
+
+   for (i = 0; compat_usb_fsl[i]; i++) {
+   do {
+   node_offset = fdt_node_offset_by_compatible
+   (blob, node_offset,
+compat_usb_fsl[i]);
+   if (node_offset >= 0)
+   count++;
+   } while (node_offset != -FDT_ERR_NOTFOUND);
+   }
+   return count;
+}
+
 void fdt_fixup_dr_usb(void *blob, bd_t *bd)
 {
static const char * const modes[] = { "host", "peripheral", "otg" };
static const char * const phys[] = { "ulpi", "utmi", "utmi_dual" };
+   unsigned int usb_max_controller_count;
int usb_erratum_a006261_off = -1;
int usb_erratum_a007075_off = -1;
int usb_erratum_a007792_off = -1;
@@ -146,7 +165,13 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
int i, j;
int ret;
 
-   for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
+   usb_max_controller_count = fdt_max_controller_count(blob);
+   if (!usb_max_controller_count) {
+   printf("ERROR: FDT fixup erratum fail.\n");
+   return;
+   }
+
+   for (i = 1; i <= usb_max_controller_count; i++) {
const char *dr_mode_type = NULL;
const char *dr_phy_type = NULL;
int mode_idx = -1, phy_idx = -1;
-- 
2.1.0

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


Re: [U-Boot] [PATCH v5 1/2] powerpc/mpc85xx: SECURE BOOT- Enable chain of trust in SPL

2016-06-19 Thread Sumit Garg
Hi Simon,

> -Original Message-
> From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
> Sent: Friday, June 17, 2016 9:22 AM
> To: Sumit Garg 
> Cc: U-Boot Mailing List ; york sun
> ; Ruchika Gupta ; Prabhakar
> Kushwaha ; Tom Rini ;
> Teddy Reed V ; Andreas Dannenberg
> ; Aneesh Bansal 
> Subject: Re: [PATCH v5 1/2] powerpc/mpc85xx: SECURE BOOT- Enable chain of
> trust in SPL
> 
> Hi,
> 
> On 14 June 2016 at 11:21, Sumit Garg  wrote:
> > As part of Chain of Trust for Secure boot, the SPL U-Boot will
> > validate the next level U-boot image. Add a new function
> > spl_validate_uboot to perform the validation.
> >
> > Enable hardware crypto operations in SPL using SEC block.
> > In case of Secure Boot, PAMU is not bypassed. For allowing SEC block
> > access to CPC configured as SRAM, configure PAMU.
> >
> > Reviewed-by: Ruchika Gupta 
> > Signed-off-by: Aneesh Bansal 
> > Signed-off-by: Sumit Garg 
> > ---
> > Changes in v2:
> > Patches rebased
> >
> > Changes in v3:
> > Patches rebased
> >
> > Changes in v4:
> > Generic changes in lib, drivers, common Makefiles removed from this
> > patchset. Rebased this patchset on top of patch [1], so this patchset
> > is dependent on patch [1].
> >
> > [1]https://patchwork.ozlabs.org/patch/627664/
> >
> > Changes in v5:
> > Check for def CONFIG_SPL_DM and ndef CONFIG_SPL_FRAMEWORK instead
> of
> > def CONFIG_DM macro to include call to dm_init_and_scan().
> > As dm_init_and_scan() is called as part of common SPL framework, so no
> > need to call it again but in case of powerpc platforms which currently
> > do not use common SPL framework, so need to include this function call
> > here.
> >
> >  arch/powerpc/cpu/mpc8xxx/fsl_pamu.c |  8 +
> >  arch/powerpc/cpu/mpc8xxx/pamu_table.c   |  8 +
> >  arch/powerpc/include/asm/fsl_secure_boot.h  | 28 +++
> > board/freescale/common/fsl_chain_of_trust.c | 54
> +
> >  drivers/crypto/fsl/jr.c | 16 +
> >  drivers/mtd/nand/fsl_ifc_spl.c  | 24 +
> >  include/fsl_validate.h  |  1 +
> >  7 files changed, 139 insertions(+)
> 
> This looks OK to me, but please can you add a small README explaining how to
> use these feature?
> 
> >
> > diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
> > b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
> > index 9421f1e..ede8e66 100644
> > --- a/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
> > +++ b/arch/powerpc/cpu/mpc8xxx/fsl_pamu.c
> > @@ -239,15 +239,23 @@ int pamu_init(void)
> > spaact_size = sizeof(struct paace) * NUM_SPAACT_ENTRIES;
> >
> > /* Allocate space for Primary PAACT Table */
> > +#if (defined(CONFIG_SPL_BUILD) &&
> defined(CONFIG_SPL_PPAACT_ADDR))
> > +   ppaact = (void *)CONFIG_SPL_PPAACT_ADDR; #else
> > ppaact = memalign(PAMU_TABLE_ALIGNMENT, ppaact_size);
> > if (!ppaact)
> > return -1;
> > +#endif
> > memset(ppaact, 0, ppaact_size);
> >
> > /* Allocate space for Secondary PAACT Table */
> > +#if (defined(CONFIG_SPL_BUILD) &&
> defined(CONFIG_SPL_SPAACT_ADDR))
> > +   sec = (void *)CONFIG_SPL_SPAACT_ADDR; #else
> > sec = memalign(PAMU_TABLE_ALIGNMENT, spaact_size);
> > if (!sec)
> > return -1;
> > +#endif
> > memset(sec, 0, spaact_size);
> >
> > ppaact_phys = virt_to_phys((void *)ppaact); diff --git
> > a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
> > b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
> > index 26c5ea4..a8e6f51 100644
> > --- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
> > +++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
> > @@ -28,6 +28,14 @@ void construct_pamu_addr_table(struct
> pamu_addr_tbl
> > *tbl, int *num_entries)
> >
> > i++;
> >  #endif
> > +#if (defined(CONFIG_SPL_BUILD) && (CONFIG_SYS_INIT_L3_VADDR))
> > +   tbl->start_addr[i] =
> > +   (uint64_t)virt_to_phys((void *)CONFIG_SYS_INIT_L3_VADDR);
> > +   tbl->size[i] = 256 * 1024; /* 256K CPC flash */
> > +   tbl->end_addr[i] = tbl->start_addr[i] +  tbl->size[i] - 1;
> > +
> > +   i++;
> > +#endif
> > debug("PAMU address\t\t\tsize\n");
> > for (j = 0; j < i ; j++)
> > debug("%llx \t\t\t%llx\n",  tbl->start_addr[j],
> > tbl->size[j]); diff --git a/arch/powerpc/include/asm/fsl_secure_boot.h
> > b/arch/powerpc/include/asm/fsl_secure_boot.h
> > index 826f9c9..99eec7f 100644
> > --- a/arch/powerpc/include/asm/fsl_secure_boot.h
> > +++ b/arch/powerpc/include/asm/fsl_secure_boot.h
> > @@ -72,6 +72,32 @@
> >
> >  #ifdef CONFIG_CHAIN_OF_TRUST
> >
> > +#ifdef CONFIG_SPL_BUILD
> > +#define CONFIG_SPL_DM  1
> > +#define 

Re: [U-Boot] [PATCH 2/5] arm: Don't invalidate unaligned cache regions

2016-06-19 Thread Marek Vasut
On 06/20/2016 03:43 AM, Simon Glass wrote:
> At present armv7 will unhappily invalidate a cache region and print an
> error message. Make it skip the operation instead, as it does with other
> cache operations.
> 
> Signed-off-by: Simon Glass 

Reviewed-by: Marek Vasut 

> ---
> 
>  arch/arm/cpu/armv7/cache_v7.c | 23 ++-
>  1 file changed, 2 insertions(+), 21 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
> index 823a156..e59597e 100644
> --- a/arch/arm/cpu/armv7/cache_v7.c
> +++ b/arch/arm/cpu/armv7/cache_v7.c
> @@ -44,27 +44,8 @@ static void v7_dcache_inval_range(u32 start, u32 stop, u32 
> line_len)
>  {
>   u32 mva;
>  
> - /*
> -  * If start address is not aligned to cache-line do not
> -  * invalidate the first cache-line
> -  */
> - if (start & (line_len - 1)) {
> - printf("ERROR: %s - start address is not aligned - 0x%08x\n",
> - __func__, start);
> - /* move to next cache line */
> - start = (start + line_len - 1) & ~(line_len - 1);
> - }
> -
> - /*
> -  * If stop address is not aligned to cache-line do not
> -  * invalidate the last cache-line
> -  */
> - if (stop & (line_len - 1)) {
> - printf("ERROR: %s - stop address is not aligned - 0x%08x\n",
> - __func__, stop);
> - /* align to the beginning of this cache line */
> - stop &= ~(line_len - 1);
> - }
> + if (!check_cache_range(start, stop))
> + return;
>  
>   for (mva = start; mva < stop; mva = mva + line_len) {
>   /* DCIMVAC - Invalidate data cache by MVA to PoC */
> 


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


Re: [U-Boot] [PATCH 1/5] arm: Move check_cache_range() into a common place

2016-06-19 Thread Marek Vasut
On 06/20/2016 03:43 AM, Simon Glass wrote:
> This code is common, so move it into a common file.
> 
> Signed-off-by: Simon Glass 

Reviewed-by: Marek Vasut 

> ---
> 
>  arch/arm/cpu/arm11/cpu.c   | 17 -
>  arch/arm/cpu/arm926ejs/cache.c | 17 -
>  arch/arm/cpu/armv7/cache_v7.c  | 17 -
>  arch/arm/include/asm/cache.h   |  2 ++
>  arch/arm/lib/cache.c   | 22 ++
>  5 files changed, 24 insertions(+), 51 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
> index 1e4c214..7244c2e 100644
> --- a/arch/arm/cpu/arm11/cpu.c
> +++ b/arch/arm/cpu/arm11/cpu.c
> @@ -69,23 +69,6 @@ void flush_dcache_all(void)
>   asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
>  }
>  
> -static int check_cache_range(unsigned long start, unsigned long stop)
> -{
> - int ok = 1;
> -
> - if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (!ok)
> - debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
> - start, stop);
> -
> - return ok;
> -}
> -
>  void invalidate_dcache_range(unsigned long start, unsigned long stop)
>  {
>   if (!check_cache_range(start, stop))
> diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
> index 2839c86..2119382 100644
> --- a/arch/arm/cpu/arm926ejs/cache.c
> +++ b/arch/arm/cpu/arm926ejs/cache.c
> @@ -29,23 +29,6 @@ void flush_dcache_all(void)
>   );
>  }
>  
> -static int check_cache_range(unsigned long start, unsigned long stop)
> -{
> - int ok = 1;
> -
> - if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (!ok)
> - debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
> - start, stop);
> -
> - return ok;
> -}
> -
>  void invalidate_dcache_range(unsigned long start, unsigned long stop)
>  {
>   if (!check_cache_range(start, stop))
> diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
> index dc309da..823a156 100644
> --- a/arch/arm/cpu/armv7/cache_v7.c
> +++ b/arch/arm/cpu/armv7/cache_v7.c
> @@ -19,23 +19,6 @@
>  void v7_flush_dcache_all(void);
>  void v7_invalidate_dcache_all(void);
>  
> -static int check_cache_range(unsigned long start, unsigned long stop)
> -{
> - int ok = 1;
> -
> - if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
> - ok = 0;
> -
> - if (!ok)
> - debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
> - start, stop);
> -
> - return ok;
> -}
> -
>  static u32 get_ccsidr(void)
>  {
>   u32 ccsidr;
> diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
> index 1f63127..16e65c3 100644
> --- a/arch/arm/include/asm/cache.h
> +++ b/arch/arm/include/asm/cache.h
> @@ -29,6 +29,8 @@ static inline void invalidate_l2_cache(void)
>  }
>  #endif
>  
> +int check_cache_range(unsigned long start, unsigned long stop);
> +
>  void l2_cache_enable(void);
>  void l2_cache_disable(void);
>  void set_section_dcache(int section, enum dcache_option option);
> diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
> index 3bd8710..642a952 100644
> --- a/arch/arm/lib/cache.c
> +++ b/arch/arm/lib/cache.c
> @@ -10,6 +10,10 @@
>  #include 
>  #include 
>  
> +#ifndef CONFIG_SYS_CACHELINE_SIZE
> +#define CONFIG_SYS_CACHELINE_SIZE 32
> +#endif
> +
>  /*
>   * Flush range from all levels of d-cache/unified-cache.
>   * Affects the range [start, start + size - 1].
> @@ -46,6 +50,24 @@ __weak void flush_dcache_range(unsigned long start, 
> unsigned long stop)
>   /* An empty stub, real implementation should be in platform code */
>  }
>  
> +int check_cache_range(unsigned long start, unsigned long stop)
> +{
> + int ok = 1;
> +
> + if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
> + ok = 0;
> +
> + if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
> + ok = 0;
> +
> + if (!ok) {
> + debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
> +   start, stop);
> + }
> +
> + return ok;
> +}
> +
>  #ifdef CONFIG_SYS_NONCACHED_MEMORY
>  /*
>   * Reserve one MMU section worth of address space below the malloc() area 
> that
> 


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


[U-Boot] Please pull u-boot-dm

2016-06-19 Thread Simon Glass
Hi Tom,

This includes changes to the clock API so I'd like to get this into
this release to avoid too much churn.


The following changes since commit 9ab165d8b05706284de0ee9bd402346c54ae6b15:

  SPL ext: cosmetic: correct error message in spl_load_image_ext()
(2016-06-19 09:57:48 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-dm.git

for you to fetch changes up to 135aa95002646c46e89de93fa36adad1b010548f:

  clk: convert API to match reset/mailbox style (2016-06-19 17:05:55 -0600)


Angelo Dureghello (1):
  dm: add manual relocation for devices

Robert P. J. Day (1):
  lib/libfdt/: General aesthetic/style fixes.

Stephen Warren (5):
  mailbox: rename headers
  mailbox: add Tegra186 HSP driver
  Add a reset driver framework/uclass
  reset: implement a reset test
  clk: convert API to match reset/mailbox style

mario@gdsys.cc (2):
  gpio: pca953x: Fix register reading past 8th GPIO
  sandbox: gpio: doc: Fix parameter documentation

 arch/arm/dts/tegra186.dtsi |  13 +++
 arch/arm/include/asm/arch-rockchip/clock.h |  12 ---
 arch/arm/mach-rockchip/board.c |  39 +++-
 arch/arm/mach-rockchip/rk3288/sdram_rk3288.c   |  15 ++-
 arch/arm/mach-snapdragon/clock-apq8016.c   |  10 +-
 arch/arm/mach-tegra/Kconfig|   2 +
 arch/arm/mach-zynq/clk.c   |   1 -
 arch/mips/mach-pic32/cpu.c |  45 +
 arch/sandbox/dts/test.dts  |  28 +-
 arch/sandbox/include/asm/clk.h | 111 +
 arch/sandbox/include/asm/gpio.h|  16 +--
 arch/sandbox/include/asm/reset.h   |  21 
 arch/sandbox/include/asm/test.h|   9 --
 board/microchip/pic32mzda/pic32mzda.c  |  21 +++-
 configs/sandbox_defconfig  |  10 +-
 doc/device-tree-bindings/reset/reset.txt   |  75 ++
 drivers/Kconfig|   2 +
 drivers/Makefile   |   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/clk-uclass.c   | 202
+++---
 drivers/clk/clk_fixed_rate.c   |  13 +--
 drivers/clk/clk_pic32.c|  32 +++---
 drivers/clk/clk_rk3036.c   |  83 
 drivers/clk/clk_rk3288.c   | 143
+--
 drivers/clk/clk_sandbox.c  |  85 ++--
 drivers/clk/clk_sandbox_test.c | 101 +++
 drivers/clk/exynos/clk-exynos7420.c|  42 
 drivers/clk/uniphier/clk-uniphier-core.c   |  26 ++---
 drivers/clk/uniphier/clk-uniphier-mio.c|   1 -
 drivers/core/root.c|  15 +++
 drivers/gpio/pca953x_gpio.c|   4 +-
 drivers/i2c/rk_i2c.c   |   6 +-
 drivers/mailbox/Kconfig|   7 ++
 drivers/mailbox/Makefile   |   1 +
 drivers/mailbox/mailbox-uclass.c   |   4 +-
 drivers/mailbox/sandbox-mbox-test.c|   2 +-
 drivers/mailbox/sandbox-mbox.c |   2 +-
 drivers/mailbox/tegra-hsp.c| 163
+++
 drivers/mmc/msm_sdhci.c|  13 ++-
 drivers/mmc/rockchip_dw_mmc.c  |   6 +-
 drivers/mmc/uniphier-sd.c  |  15 +--
 drivers/reset/Kconfig  |  23 +
 drivers/reset/Makefile |   7 ++
 drivers/reset/reset-uclass.c   | 131 +
 drivers/reset/sandbox-reset-test.c |  55 +++
 drivers/reset/sandbox-reset.c  | 108 +
 drivers/serial/serial_msm.c|  13 ++-
 drivers/serial/serial_pic32.c  |   7 +-
 drivers/serial/serial_s5p.c|   6 +-
 drivers/spi/rk_spi.c   |   6 +-
 drivers/usb/host/ehci-generic.c|  14 +--
 drivers/video/rockchip/rk_edp.c|  11 +--
 drivers/video/rockchip/rk_hdmi.c   |  12 +--
 drivers/video/rockchip/rk_lvds.c   |   1 -
 drivers/video/rockchip/rk_vop.c|  11 ++-
 include/clk-uclass.h   |  95 ++
 include/clk.h  | 220
+-
 include/dm/uclass-id.h |   1 +
 include/dt-bindings/mailbox/tegra-hsp.h|  14 +++
 include/{mailbox_uclass.h => mailbox-uclass.h} |   4 +-
 include/{mailbox_client.h => mailbox.h}|   6 +-
 include/reset-uclass.h |  81 
 include/reset.h| 135 

[U-Boot] [PATCH v2] dm: atmel: Add driver model support for the ehci driver

2016-06-19 Thread Wenyou Yang
Add driver model support while retaining the existing legacy code.
This allows the driver to support boards that have converted to
driver model as well as those that have not.

Signed-off-by: Wenyou Yang 
Acked-by: Simon Glass 
---

Changes in v2:
 - Collect Acked-by tag.
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).

 drivers/usb/host/Kconfig  |   7 +++
 drivers/usb/host/ehci-atmel.c | 116 ++
 2 files changed, 123 insertions(+)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 89580cc..b8dd18e 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -60,6 +60,13 @@ config USB_EHCI
 
 if USB_EHCI_HCD
 
+config USB_EHCI_ATMEL
+   bool  "Support for Atmel on-chip EHCI USB controller"
+   depends on ARCH_AT91
+   default y
+   ---help---
+ Enables support for the on-chip EHCI controller on Atmel chips.
+
 config USB_EHCI_MARVELL
bool "Support for MVEBU (AXP / A38x) on-chip EHCI USB controller"
depends on ARCH_MVEBU
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 1d7d280..5d0e9ad 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -7,12 +7,18 @@
  */
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 
 #include "ehci.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifndef CONFIG_DM_USB
+
 int ehci_hcd_init(int index, enum usb_init_type init,
struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
@@ -41,3 +47,113 @@ int ehci_hcd_stop(int index)
 
return 0;
 }
+
+#else
+
+struct ehci_atmel_priv {
+   struct ehci_ctrl ehci;
+};
+
+static int ehci_atmel_enable_clk(struct udevice *dev)
+{
+   struct udevice *dev_clk;
+   struct clk clk;
+   int periph;
+   int ret;
+
+   ret = clk_get_by_index(dev, 0, );
+   if (ret)
+   return ret;
+
+   ret = clk_enable();
+   if (ret)
+   return ret;
+
+   ret = clk_get_by_index(dev, 1, );
+   if (ret)
+   return -EINVAL;
+
+   periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1);
+   if (periph < 0)
+   return -EINVAL;
+
+   dev_clk = dev_get_parent(clk.dev);
+   if (!dev_clk)
+   return -ENODEV;
+
+   ret = clk_request(dev_clk, );
+   if (ret)
+   return ret;
+
+   clk.id = periph;
+   ret = clk_enable();
+   if (ret)
+   return ret;
+
+   clk_free();
+
+   return 0;
+}
+
+static int ehci_atmel_probe(struct udevice *dev)
+{
+   struct ehci_hccr *hccr;
+   struct ehci_hcor *hcor;
+   fdt_addr_t hcd_base;
+   int ret;
+
+   ret = ehci_atmel_enable_clk(dev);
+   if (ret) {
+   debug("Failed to enable USB Host clock\n");
+   return ret;
+   }
+
+   /*
+* Get the base address for EHCI controller from the device node
+*/
+   hcd_base = dev_get_addr(dev);
+   if (hcd_base == FDT_ADDR_T_NONE) {
+   debug("Can't get the EHCI register base address\n");
+   return -ENXIO;
+   }
+
+   hccr = (struct ehci_hccr *)hcd_base;
+   hcor = (struct ehci_hcor *)
+   ((u32)hccr + HC_LENGTH(ehci_readl(>cr_capbase)));
+
+   debug("echi-atmel: init hccr %x and hcor %x hc_length %d\n",
+ (u32)hccr, (u32)hcor,
+ (u32)HC_LENGTH(ehci_readl(>cr_capbase)));
+
+   return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
+}
+
+static int ehci_atmel_remove(struct udevice *dev)
+{
+   int ret;
+
+   ret = ehci_deregister(dev);
+   if (ret)
+   return ret;
+
+   return 0;
+}
+
+static const struct udevice_id ehci_usb_ids[] = {
+   { .compatible = "atmel,at91sam9g45-ehci", },
+   { }
+};
+
+U_BOOT_DRIVER(ehci_atmel) = {
+   .name   = "ehci_atmel",
+   .id = UCLASS_USB,
+   .of_match   = ehci_usb_ids,
+   .probe  = ehci_atmel_probe,
+   .remove = ehci_atmel_remove,
+   .ops= _usb_ops,
+   .platdata_auto_alloc_size = sizeof(struct usb_platdata),
+   .priv_auto_alloc_size = sizeof(struct ehci_atmel_priv),
+   .flags  = DM_FLAG_ALLOC_PRIV_DMA,
+};
+
+#endif
-- 
2.7.4

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


[U-Boot] [PATCH v4] mmc: atmel_sdhci: Convert to the driver model support

2016-06-19 Thread Wenyou Yang
Convert the driver to the driver model while retaining the existing
legacy code. This allows the driver to support boards that have
converted to driver model as well as those that have not.

Signed-off-by: Wenyou Yang 
---

Changes in v4:
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
 - Remove check on dev_get_parent() return.
 - Fixed the return value, such as -ENODEV->-EINVAL.

Changes in v3:
 - Remove the redundant log print.

Changes in v2:
 - Add clock support, include enabling peripheral clock and
   generated clock.
 - Retain the existing legacy code to support boards which have not
   converted to driver model.

 drivers/mmc/Kconfig   | 10 +
 drivers/mmc/atmel_sdhci.c | 99 +++
 2 files changed, 109 insertions(+)

diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index c80efc3..518c624 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -25,6 +25,16 @@ config MSM_SDHCI
   SD 3.0 specifications. Both SD and eMMC devices are supported.
  Card-detect gpios are not supported.
 
+config ATMEL_SDHCI
+   bool "Atmel SDHCI controller support"
+   depends on DM_MMC && ARCH_AT91
+   help
+ This enables support for the Atmel SDHCI controller, which supports
+ the embedded MultiMedia Card (e.MMC) Specification V4.51, the SD
+ Memory Card Specification V3.0, and the SDIO V3.0 specification.
+ It is compliant with the SD Host Controller Standard V3.0
+ specification.
+
 config ROCKCHIP_DWMMC
bool "Rockchip SD/MMC controller support"
depends on DM_MMC && OF_CONTROL
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index 24b68b6..a68d192 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -6,12 +6,16 @@
  */
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
 
 #define ATMEL_SDHC_MIN_FREQ40
 
+#ifndef CONFIG_DM_MMC
+
 int atmel_sdhci_init(void *regbase, u32 id)
 {
struct sdhci_host *host;
@@ -38,3 +42,98 @@ int atmel_sdhci_init(void *regbase, u32 id)
 
return 0;
 }
+
+#else
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static int atmel_sdhci_probe(struct udevice *dev)
+{
+   struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
+   struct sdhci_host *host = dev_get_priv(dev);
+   u32 max_clk, min_clk = ATMEL_SDHC_MIN_FREQ;
+   u32 caps0, caps1;
+   u32 clk_base, clk_mul;
+   u32 gck_rate;
+   struct udevice *dev_clk;
+   struct clk clk;
+   int periph, ret;
+
+   ret = clk_get_by_index(dev, 0, );
+   if (ret)
+   return ret;
+
+   periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1);
+   if (periph < 0)
+   return -EINVAL;
+
+   dev_clk = dev_get_parent(clk.dev);
+   ret = clk_request(dev_clk, );
+   if (ret)
+   return ret;
+
+   clk.id = periph;
+   ret = clk_enable();
+   if (ret)
+   return ret;
+
+   host->name = (char *)dev->name;
+   host->ioaddr = (void *)dev_get_addr(dev);
+
+   host->quirks = 0;
+   host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
+
+   host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
+"bus-width", 4);
+
+   caps0 = readl(host->ioaddr + SDHCI_CAPABILITIES);
+   caps1 = readl(host->ioaddr + SDHCI_CAPABILITIES_1);
+   clk_base = (caps0 & SDHCI_CLOCK_V3_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
+   clk_mul = (caps1 & SDHCI_CLOCK_MUL_MASK) >> SDHCI_CLOCK_MUL_SHIFT;
+   gck_rate = clk_base * 100 * (clk_mul + 1);
+
+   ret = clk_get_by_index(dev, 1, );
+   if (ret)
+   return ret;
+
+   periph = fdtdec_get_uint(gd->fdt_blob, clk.dev->of_offset, "reg", -1);
+   if (periph < 0)
+   return -EINVAL;
+
+   dev_clk = dev_get_parent(clk.dev);
+   ret = clk_request(dev_clk, );
+   if (ret)
+   return ret;
+
+   clk.id = periph;
+   ret = clk_set_rate(, gck_rate);
+   if (ret)
+   return ret;
+
+   max_clk = clk_get_rate();
+   if (!max_clk)
+   return -EINVAL;
+
+   add_sdhci(host, max_clk, min_clk);
+
+   upriv->mmc = host->mmc;
+
+   clk_free();
+
+   return 0;
+}
+
+static const struct udevice_id atmel_sdhci_ids[] = {
+   { .compatible = "atmel,sama5d2-sdhci" },
+   { }
+};
+
+U_BOOT_DRIVER(atmel_sdhci_drv) = {
+   .name   = "atmel_sdhci",
+   .id = UCLASS_MMC,
+   .of_match   = atmel_sdhci_ids,
+   .probe  = atmel_sdhci_probe,
+   .priv_auto_alloc_size = sizeof(struct sdhci_host),
+};
+
+#endif
-- 
2.7.4

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


[U-Boot] [PATCH v4] dm: at91: Add driver model support for the spi driver

2016-06-19 Thread Wenyou Yang
Add driver model support while retaining the existing legacy code.
This allows the driver to support boards that have converted to
driver model as well as those that have not.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v4:
 - Collect Reviewed-by tag.
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
 - Remove check on dev_get_parent() return.
 - Fixed the return value, -ENODEV->-EINVAL.
 - Retain #include  line.

Changes in v3:
 - Remove redundant log print.

Changes in v2:
 - Add clock support.

 drivers/spi/Kconfig |   9 ++
 drivers/spi/atmel_spi.c | 303 
 2 files changed, 312 insertions(+)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index b7fd8e5..2ac145c 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -32,6 +32,15 @@ config ATH79_SPI
  uses driver model and requires a device tree binding to operate.
  please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
 
+config ATMEL_SPI
+   bool "Atmel SPI driver"
+   depends on ARCH_AT91
+   select SPI_FLASH
+   select SPI_FLASH_ATMEL
+   help
+ Enable the Atmel SPI driver. This driver can be used to access
+ the SPI Flash, such as AT25DF321.
+
 config CADENCE_QSPI
bool "Cadence QSPI driver"
help
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index ed6278b..b7f1aa6 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -4,6 +4,9 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 #include 
+#include 
+#include 
+#include 
 #include 
 #include 
 
@@ -11,9 +14,15 @@
 
 #include 
 #include 
+#include 
+#include 
 
 #include "atmel_spi.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifndef CONFIG_DM_SPI
+
 static int spi_has_wdrbt(struct atmel_spi_slave *slave)
 {
unsigned int ver;
@@ -209,3 +218,297 @@ out:
 
return 0;
 }
+
+#else
+
+#define MAX_CS_COUNT   4
+
+struct atmel_spi_platdata {
+   struct at91_spi *regs;
+};
+
+struct atmel_spi_priv {
+   unsigned int freq;  /* Default frequency */
+   unsigned int mode;
+   ulong bus_clk_rate;
+   struct gpio_desc cs_gpios[MAX_CS_COUNT];
+};
+
+static int atmel_spi_claim_bus(struct udevice *dev)
+{
+   struct udevice *bus = dev_get_parent(dev);
+   struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
+   struct atmel_spi_priv *priv = dev_get_priv(bus);
+   struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+   struct at91_spi *reg_base = bus_plat->regs;
+   u32 cs = slave_plat->cs;
+   u32 freq = priv->freq;
+   u32 scbr, csrx, mode;
+
+   scbr = (priv->bus_clk_rate + freq - 1) / freq;
+   if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
+   return -EINVAL;
+
+   if (scbr < 1)
+   scbr = 1;
+
+   csrx = ATMEL_SPI_CSRx_SCBR(scbr);
+   csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
+
+   if (!(priv->mode & SPI_CPHA))
+   csrx |= ATMEL_SPI_CSRx_NCPHA;
+   if (priv->mode & SPI_CPOL)
+   csrx |= ATMEL_SPI_CSRx_CPOL;
+
+   writel(csrx, _base->csr[cs]);
+
+   mode = ATMEL_SPI_MR_MSTR |
+  ATMEL_SPI_MR_MODFDIS |
+  ATMEL_SPI_MR_WDRBT |
+  ATMEL_SPI_MR_PCS(~(1 << cs));
+
+   writel(mode, _base->mr);
+
+   writel(ATMEL_SPI_CR_SPIEN, _base->cr);
+
+   return 0;
+}
+
+static int atmel_spi_release_bus(struct udevice *dev)
+{
+   struct udevice *bus = dev_get_parent(dev);
+   struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
+
+   writel(ATMEL_SPI_CR_SPIDIS, _plat->regs->cr);
+
+   return 0;
+}
+
+static void atmel_spi_cs_activate(struct udevice *dev)
+{
+   struct udevice *bus = dev_get_parent(dev);
+   struct atmel_spi_priv *priv = dev_get_priv(bus);
+   struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+   u32 cs = slave_plat->cs;
+
+   dm_gpio_set_value(>cs_gpios[cs], 0);
+}
+
+static void atmel_spi_cs_deactivate(struct udevice *dev)
+{
+   struct udevice *bus = dev_get_parent(dev);
+   struct atmel_spi_priv *priv = dev_get_priv(bus);
+   struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
+   u32 cs = slave_plat->cs;
+
+   dm_gpio_set_value(>cs_gpios[cs], 1);
+}
+
+static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
+ const void *dout, void *din, unsigned long flags)
+{
+   struct udevice *bus = dev_get_parent(dev);
+   struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
+   struct at91_spi *reg_base = bus_plat->regs;
+
+   u32 len_tx, len_rx, len;
+   u32 status;
+   const u8 *txp = dout;
+   u8 *rxp = din;
+   u8 value;
+
+   if (bitlen == 0)
+   goto out;
+
+   /*
+* The 

Re: [U-Boot] [RFC 5/9] arm: omap5: add secure ROM signature verify API

2016-06-19 Thread Tom Rini
On Thu, Jun 16, 2016 at 09:52:40PM -0600, Simon Glass wrote:
> On 15 June 2016 at 13:26, Andreas Dannenberg  wrote:
> > From: Daniel Allred 
> >
> > Adds an API that verifies a signature attached to an image (binary
> > blob). This API is basically a entry to a secure ROM service provided by
> > the device and accessed via an SMC call, using a particular calling
> > convention.
> >
> > Signed-off-by: Daniel Allred 
> > Signed-off-by: Andreas Dannenberg 
> > ---
> >  arch/arm/cpu/armv7/omap5/Makefile   |  1 +
> >  arch/arm/cpu/armv7/omap5/sec_fxns.c | 70 
> > +
> >  arch/arm/include/asm/arch-omap5/sys_proto.h |  4 ++
> >  3 files changed, 75 insertions(+)
> >  create mode 100644 arch/arm/cpu/armv7/omap5/sec_fxns.c
> 
> Reviewed-by: Simon Glass 
> 
> Please see below.
> 
> >
> > diff --git a/arch/arm/cpu/armv7/omap5/Makefile 
> > b/arch/arm/cpu/armv7/omap5/Makefile
> > index 3caba86..d373bf4 100644
> > --- a/arch/arm/cpu/armv7/omap5/Makefile
> > +++ b/arch/arm/cpu/armv7/omap5/Makefile
> > @@ -14,3 +14,4 @@ obj-y += hw_data.o
> >  obj-y  += abb.o
> >  obj-y  += fdt.o
> >  obj-$(CONFIG_IODELAY_RECALIBRATION) += dra7xx_iodelay.o
> > +obj-$(CONFIG_TI_SECURE_DEVICE) += sec_fxns.o
> > diff --git a/arch/arm/cpu/armv7/omap5/sec_fxns.c 
> > b/arch/arm/cpu/armv7/omap5/sec_fxns.c
> > new file mode 100644
> > index 000..766333a
> > --- /dev/null
> > +++ b/arch/arm/cpu/armv7/omap5/sec_fxns.c
> > @@ -0,0 +1,70 @@
> > +/*
> > + *
> > + * Common security functions that rely on secure ROM services
> > + *
> > + * (C) Copyright 2016
> > + * Texas Instruments, 
> > + *
> > + * Daniel Allred
> > + *
> > + * SPDX-License-Identifier: GPL-2.0+
> > + */
> > +
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#define SIGNATURE_LENGTH   (0x118)
> > +
> > +/* API Index for OMAP5, DRA7xx */
> > +#define API_HAL_KM_VERIFYCERTIFICATESIGNATURE_INDEX(0x000E)
> > +
> > +int secure_boot_verify_image(void **image, size_t *size)
> > +{
> > +   int result = 1;
> > +   u32 cert_addr, sig_addr;
> > +   size_t cert_size;
> > +
> > +#ifndef CONFIG_SYS_DCACHE_OFF
> > +   /* Perform cache writeback on input buffer */
> > +   flush_dcache_range(
> > +   (u32)*image,
> > +   (u32)*image + roundup(*size, ARCH_DMA_MINALIGN));
> > +#endif
> > +   cert_addr = (uint32_t)*image;
> > +   *size -= SIGNATURE_LENGTH;   /* Subtract out the signature size */
> > +   cert_size = *size;
> > +   sig_addr = cert_addr + cert_size;
> > +
> > +   /* Check if image load address is 32-bit aligned */
> > +   if (0 != (0x3 & cert_addr)) {
> > +   puts("Image is not 4-byte aligned.\n");
> > +   result = 1;
> > +   goto auth_exit;
> > +   }
> > +
> > +   /* Image size also should be multiple of 4 */
> > +   if (0 != (0x3 & cert_size)) {
> > +   puts("Image size is not 4-byte aligned.\n");
> > +   result = 1;
> > +   goto auth_exit;
> > +   }
> > +
> > +   /* Call ROM HAL API to verify certificate signature */
> > +   debug("%s: load_addr = %x, size = %x, sig_addr = %x\n", __func__,
> > + cert_addr, cert_size, sig_addr);
> > +
> > +   result = secure_rom_call(
> > +   API_HAL_KM_VERIFYCERTIFICATESIGNATURE_INDEX, 0, 0,
> > +   4, cert_addr, cert_size, sig_addr, 0x);
> > +auth_exit:
> > +   if (result != 0) {
> > +   puts("Authentication failed!\n");
> > +   printf("Return Value = %08X\n", result);
> > +   hang();
> > +   }
> > +
> > +   printf("Authentication passed: %s\n", (char *)sig_addr);
> > +
> > +   return result;
> > +}
> > diff --git a/arch/arm/include/asm/arch-omap5/sys_proto.h 
> > b/arch/arm/include/asm/arch-omap5/sys_proto.h
> > index ab0e7fa..b175124 100644
> > --- a/arch/arm/include/asm/arch-omap5/sys_proto.h
> > +++ b/arch/arm/include/asm/arch-omap5/sys_proto.h
> > @@ -84,4 +84,8 @@ static inline u32 usec_to_32k(u32 usec)
> >  #define OMAP5_SERVICE_L2ACTLR_SET0x104
> >  #define OMAP5_SERVICE_ACR_SET0x107
> >
> > +#ifdef CONFIG_TI_SECURE_DEVICE
> > +int secure_boot_verify_image(void **p_image, size_t *p_size);
> 
> Function comment please.

And no ifdef/endif (here and later in the series when adding other
calls), thanks!

-- 
Tom


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


[U-Boot] [PATCH v5 5/5] configs: sama5d2_xplained: Add #ifndef before CONFIG_ATMEL_PIO4

2016-06-19 Thread Wenyou Yang
Since CONFIG_ATMEL_PIO4 options is added to Kconfig, to avoid
compilation warnings when the option is enabled,
add #ifndef CONFIG_DM_GPIO before #define CONFIG_ATMEL_PIO4
to avoid compilation warnings.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5:
 - Collect Reviewed-by tags.

Changes in v4: None
Changes in v3: None
Changes in v2:
 - integrate the gpio rework patch into this patch series.
 - add the new patch to move the PIO4 definitions to head file
   and rephrase them.
 - add the new patch to add #ifndef before CONFIG_ATMEL_PIO4
   in configs/sama5d2_xplained.h

 include/configs/sama5d2_xplained.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/sama5d2_xplained.h 
b/include/configs/sama5d2_xplained.h
index f9a8f6f..d477ff8 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -34,8 +34,10 @@
 
 #define CONFIG_SYS_LOAD_ADDR   0x2200 /* load address */
 
+#ifndef CONFIG_DM_GPIO
 #undef CONFIG_AT91_GPIO
 #define CONFIG_ATMEL_PIO4
+#endif
 
 /* SerialFlash */
 #ifdef CONFIG_CMD_SF
-- 
2.7.4

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


Re: [U-Boot] pull request: u-boot-uniphier/master

2016-06-19 Thread Tom Rini
On Mon, Jun 20, 2016 at 07:27:54AM +0900, Masahiro Yamada wrote:

> Hi Tom,
> 
> Please pull some more patches for UniPhier SoCs!
> 
> 
> The following changes since commit 9ab165d8b05706284de0ee9bd402346c54ae6b15:
> 
>   SPL ext: cosmetic: correct error message in spl_load_image_ext()
> (2016-06-19 09:57:48 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-uniphier master
> 
> for you to fetch changes up to 7c8ef0feb97586d35b0296b48903daef8c06ab21:
> 
>   ARM: uniphier: use the default CONFIG_BOOTDELAY=2 (2016-06-20 07:15:39 
> +0900)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2] rtc: Tidy up the code style

2016-06-19 Thread Bin Meng
On Mon, Jun 20, 2016 at 9:51 AM, Simon Glass  wrote:
> This code generates lots of checkpatch errors. Fix them.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v2:
> - Fix the double-space problems that I introduced!
>
>  drivers/rtc/date.c | 71 
> --
>  1 file changed, 32 insertions(+), 39 deletions(-)
>

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


Re: [U-Boot] [RFC 2/9] arm: cache: add missing dummy functions for when dcache disabled

2016-06-19 Thread Tom Rini
On Wed, Jun 15, 2016 at 02:26:34PM -0500, Andreas Dannenberg wrote:

> From: Daniel Allred 
> 
> Adds missing flush_dcache_range and invalidate_dcache_range dummy
> (empty) placeholder functions to the #else portion of the #ifndef
> CONFIG_SYS_DCACHE_OFF, where full implementations of these functions
> are defined.
> 
> Signed-off-by: Daniel Allred 
> Signed-off-by: Andreas Dannenberg 

Reviewed-by: Tom Rini 

-- 
Tom


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


[U-Boot] [PATCH v5 4/5] atmel: Bring in at91 pio4 device tree file and bindings

2016-06-19 Thread Wenyou Yang
Bring in required device tree file and bindings from Linux.

Signed-off-by: Wenyou Yang 
Reviewed-by: Andreas Bießmann 
Reviewed-by: Simon Glass 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
 - add detailed example to show how to configure pinctrl for device.
 - remove interrupt and gpio property description.
 - add reviewed-by tag.

 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 2 files changed, 946 insertions(+)
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt

diff --git a/arch/arm/dts/sama5d2-pinfunc.h b/arch/arm/dts/sama5d2-pinfunc.h
new file mode 100644
index 000..b0c912f
--- /dev/null
+++ b/arch/arm/dts/sama5d2-pinfunc.h
@@ -0,0 +1,880 @@
+#define PINMUX_PIN(no, func, ioset) \
+(((no) & 0x) | (((func) & 0xf) << 16) | (((ioset) & 0xff) << 20))
+
+#define PIN_PA00
+#define PIN_PA0__GPIO  PINMUX_PIN(PIN_PA0, 0, 0)
+#define PIN_PA0__SDMMC0_CK PINMUX_PIN(PIN_PA0, 1, 1)
+#define PIN_PA0__QSPI0_SCK PINMUX_PIN(PIN_PA0, 2, 1)
+#define PIN_PA0__D0PINMUX_PIN(PIN_PA0, 6, 2)
+#define PIN_PA11
+#define PIN_PA1__GPIO  PINMUX_PIN(PIN_PA1, 0, 0)
+#define PIN_PA1__SDMMC0_CMDPINMUX_PIN(PIN_PA1, 1, 1)
+#define PIN_PA1__QSPI0_CS  PINMUX_PIN(PIN_PA1, 2, 1)
+#define PIN_PA1__D1PINMUX_PIN(PIN_PA1, 6, 2)
+#define PIN_PA22
+#define PIN_PA2__GPIO  PINMUX_PIN(PIN_PA2, 0, 0)
+#define PIN_PA2__SDMMC0_DAT0   PINMUX_PIN(PIN_PA2, 1, 1)
+#define PIN_PA2__QSPI0_IO0 PINMUX_PIN(PIN_PA2, 2, 1)
+#define PIN_PA2__D2PINMUX_PIN(PIN_PA2, 6, 2)
+#define PIN_PA33
+#define PIN_PA3__GPIO  PINMUX_PIN(PIN_PA3, 0, 0)
+#define PIN_PA3__SDMMC0_DAT1   PINMUX_PIN(PIN_PA3, 1, 1)
+#define PIN_PA3__QSPI0_IO1 PINMUX_PIN(PIN_PA3, 2, 1)
+#define PIN_PA3__D3PINMUX_PIN(PIN_PA3, 6, 2)
+#define PIN_PA44
+#define PIN_PA4__GPIO  PINMUX_PIN(PIN_PA4, 0, 0)
+#define PIN_PA4__SDMMC0_DAT2   PINMUX_PIN(PIN_PA4, 1, 1)
+#define PIN_PA4__QSPI0_IO2 PINMUX_PIN(PIN_PA4, 2, 1)
+#define PIN_PA4__D4PINMUX_PIN(PIN_PA4, 6, 2)
+#define PIN_PA55
+#define PIN_PA5__GPIO  PINMUX_PIN(PIN_PA5, 0, 0)
+#define PIN_PA5__SDMMC0_DAT3   PINMUX_PIN(PIN_PA5, 1, 1)
+#define PIN_PA5__QSPI0_IO3 PINMUX_PIN(PIN_PA5, 2, 1)
+#define PIN_PA5__D5PINMUX_PIN(PIN_PA5, 6, 2)
+#define PIN_PA66
+#define PIN_PA6__GPIO  PINMUX_PIN(PIN_PA6, 0, 0)
+#define PIN_PA6__SDMMC0_DAT4   PINMUX_PIN(PIN_PA6, 1, 1)
+#define PIN_PA6__QSPI1_SCK PINMUX_PIN(PIN_PA6, 2, 1)
+#define PIN_PA6__TIOA5 PINMUX_PIN(PIN_PA6, 4, 1)
+#define PIN_PA6__FLEXCOM2_IO0  PINMUX_PIN(PIN_PA6, 5, 1)
+#define PIN_PA6__D6PINMUX_PIN(PIN_PA6, 6, 2)
+#define PIN_PA77
+#define PIN_PA7__GPIO  PINMUX_PIN(PIN_PA7, 0, 0)
+#define PIN_PA7__SDMMC0_DAT5   PINMUX_PIN(PIN_PA7, 1, 1)
+#define PIN_PA7__QSPI1_IO0 PINMUX_PIN(PIN_PA7, 2, 1)
+#define PIN_PA7__TIOB5 PINMUX_PIN(PIN_PA7, 4, 1)
+#define PIN_PA7__FLEXCOM2_IO1  PINMUX_PIN(PIN_PA7, 5, 1)
+#define PIN_PA7__D7PINMUX_PIN(PIN_PA7, 6, 2)
+#define PIN_PA88
+#define PIN_PA8__GPIO  PINMUX_PIN(PIN_PA8, 0, 0)
+#define PIN_PA8__SDMMC0_DAT6   PINMUX_PIN(PIN_PA8, 1, 1)
+#define PIN_PA8__QSPI1_IO1 PINMUX_PIN(PIN_PA8, 2, 1)
+#define PIN_PA8__TCLK5 PINMUX_PIN(PIN_PA8, 4, 1)
+#define PIN_PA8__FLEXCOM2_IO2  PINMUX_PIN(PIN_PA8, 5, 1)
+#define PIN_PA8__NWE_NANDWEPINMUX_PIN(PIN_PA8, 6, 2)
+#define PIN_PA99
+#define PIN_PA9__GPIO  PINMUX_PIN(PIN_PA9, 0, 0)
+#define PIN_PA9__SDMMC0_DAT7   PINMUX_PIN(PIN_PA9, 1, 1)
+#define PIN_PA9__QSPI1_IO2 PINMUX_PIN(PIN_PA9, 2, 1)
+#define PIN_PA9__TIOA4 PINMUX_PIN(PIN_PA9, 4, 1)
+#define PIN_PA9__FLEXCOM2_IO3  PINMUX_PIN(PIN_PA9, 5, 1)
+#define PIN_PA9__NCS3  PINMUX_PIN(PIN_PA9, 6, 2)
+#define PIN_PA10   10
+#define PIN_PA10__GPIO PINMUX_PIN(PIN_PA10, 0, 0)
+#define PIN_PA10__SDMMC0_RSTN  PINMUX_PIN(PIN_PA10, 1, 1)
+#define PIN_PA10__QSPI1_IO3PINMUX_PIN(PIN_PA10, 2, 1)
+#define PIN_PA10__TIOB4   

[U-Boot] [PATCH v5 1/5] gpio: atmel_pio4: Move PIO4 definitions to head file

2016-06-19 Thread Wenyou Yang
In order to make these PIO4 definitions shared with AT91 PIO4
pinctrl driver, move them from the existing gpio driver to the
head file, and rephrase them.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/mach-at91/include/mach/atmel_pio4.h | 35 ++
 drivers/gpio/atmel_pio4.c| 71 +++-
 2 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h 
b/arch/arm/mach-at91/include/mach/atmel_pio4.h
index 8bb4b12..6760bec 100644
--- a/arch/arm/mach-at91/include/mach/atmel_pio4.h
+++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h
@@ -29,6 +29,41 @@ struct atmel_pio4_port {
 
 #endif
 
+/*
+ * PIO Configuration Register Fields
+ */
+#define ATMEL_PIO_CFGR_FUNC_MASK   GENMASK(2, 0)
+#define ATMEL_PIO_CFGR_FUNC_GPIO   (0x0 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_A   (0x1 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_B   (0x2 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_C   (0x3 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_D   (0x4 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_E   (0x5 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_F   (0x6 << 0)
+#define ATMEL_PIO_CFGR_FUNC_PERIPH_G   (0x7 << 0)
+#define ATMEL_PIO_DIR_MASK BIT(8)
+#define ATMEL_PIO_PUEN_MASKBIT(9)
+#define ATMEL_PIO_PDEN_MASKBIT(10)
+#define ATMEL_PIO_IFEN_MASKBIT(12)
+#define ATMEL_PIO_IFSCEN_MASK  BIT(13)
+#define ATMEL_PIO_OPD_MASK BIT(14)
+#define ATMEL_PIO_SCHMITT_MASK BIT(15)
+#define ATMEL_PIO_CFGR_EVTSEL_MASK GENMASK(26, 24)
+#define ATMEL_PIO_CFGR_EVTSEL_FALLING  (0 << 24)
+#define ATMEL_PIO_CFGR_EVTSEL_RISING   (1 << 24)
+#define ATMEL_PIO_CFGR_EVTSEL_BOTH (2 << 24)
+#define ATMEL_PIO_CFGR_EVTSEL_LOW  (3 << 24)
+#define ATMEL_PIO_CFGR_EVTSEL_HIGH (4 << 24)
+
+#define ATMEL_PIO_NPINS_PER_BANK   32
+#define ATMEL_PIO_BANK(pin_id) (pin_id / ATMEL_PIO_NPINS_PER_BANK)
+#define ATMEL_PIO_LINE(pin_id) (pin_id % ATMEL_PIO_NPINS_PER_BANK)
+#define ATMEL_PIO_BANK_OFFSET  0x40
+
+#define ATMEL_GET_PIN_NO(pinfunc)  ((pinfunc) & 0xff)
+#define ATMEL_GET_PIN_FUNC(pinfunc)((pinfunc >> 16) & 0xf)
+#define ATMEL_GET_PIN_IOSET(pinfunc)   ((pinfunc >> 20) & 0xf)
+
 #define AT91_PIO_PORTA 0x0
 #define AT91_PIO_PORTB 0x1
 #define AT91_PIO_PORTC 0x2
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index d71f525..84e8cc5 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -12,41 +12,6 @@
 #include 
 #include 
 
-#define ATMEL_PIO4_PINS_PER_BANK   32
-
-/*
- * Register Field Definitions
- */
-#define ATMEL_PIO4_CFGR_FUNC   (0x7 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_GPIO   (0x0 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_A   (0x1 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_B   (0x2 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_C   (0x3 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_D   (0x4 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_E   (0x5 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_F   (0x6 << 0)
-#defineATMEL_PIO4_CFGR_FUNC_PERIPH_G   (0x7 << 0)
-#define ATMEL_PIO4_CFGR_DIR(0x1 << 8)
-#define ATMEL_PIO4_CFGR_PUEN   (0x1 << 9)
-#define ATMEL_PIO4_CFGR_PDEN   (0x1 << 10)
-#define ATMEL_PIO4_CFGR_IFEN   (0x1 << 12)
-#define ATMEL_PIO4_CFGR_IFSCEN (0x1 << 13)
-#define ATMEL_PIO4_CFGR_OPD(0x1 << 14)
-#define ATMEL_PIO4_CFGR_SCHMITT(0x1 << 15)
-#define ATMEL_PIO4_CFGR_DRVSTR (0x3 << 16)
-#defineATMEL_PIO4_CFGR_DRVSTR_LOW0 (0x0 << 16)
-#defineATMEL_PIO4_CFGR_DRVSTR_LOW1 (0x1 << 16)
-#defineATMEL_PIO4_CFGR_DRVSTR_MEDIUM   (0x2 << 16)
-#defineATMEL_PIO4_CFGR_DRVSTR_HIGH (0x3 << 16)
-#define ATMEL_PIO4_CFGR_EVTSEL (0x7 << 24)
-#defineATMEL_PIO4_CFGR_EVTSEL_FALLING  (0x0 << 24)
-#defineATMEL_PIO4_CFGR_EVTSEL_RISING   (0x1 << 24)
-#defineATMEL_PIO4_CFGR_EVTSEL_BOTH (0x2 << 24)
-#defineATMEL_PIO4_CFGR_EVTSEL_LOW  (0x3 << 24)
-#defineATMEL_PIO4_CFGR_EVTSEL_HIGH (0x4 << 24)
-#define ATMEL_PIO4_CFGR_PCFS   (0x1 << 29)
-#define ATMEL_PIO4_CFGR_ICFS   (0x1 << 30)
-
 static struct atmel_pio4_port *atmel_pio4_port_base(u32 port)
 {
struct atmel_pio4_port *base = NULL;
@@ -79,7 +44,7 @@ static int atmel_pio4_config_io_func(u32 port, u32 pin,
struct atmel_pio4_port *port_base;
u32 reg, mask;
 
-   if (pin >= ATMEL_PIO4_PINS_PER_BANK)
+   if (pin >= ATMEL_PIO_NPINS_PER_BANK)
return -ENODEV;
 
port_base = atmel_pio4_port_base(port);
@@ -88,7 +53,7 @@ static int atmel_pio4_config_io_func(u32 port, u32 pin,
 
 

[U-Boot] [PATCH v5 2/5] gpio: atmel_pio4: Rework to support DM & DT

2016-06-19 Thread Wenyou Yang
Rework the driver to support driver model and device tree, and
support to regard the pio4 pinctrl device as a child of
atmel_pio4 device.

Signed-off-by: Wenyou Yang 
---

Changes in v5:
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
 - Use clrbits_le32() to replace readl()/writel().
 - Fixed the return value, -ENODEV->-EINVAL.
 - Remove check on dev_get_parent() return.

Changes in v4:
 - Remove the redundant log print.

Changes in v3:
 - Add bind callback to support the pinctl device regarding as
   a child of atmel_pio4 device.
 - Add clock support.

Changes in v2: None

 drivers/gpio/Kconfig  |   2 +-
 drivers/gpio/atmel_pio4.c | 138 ++
 2 files changed, 117 insertions(+), 23 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 73b862d..3332dab 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -30,7 +30,7 @@ config DWAPB_GPIO
 
 config ATMEL_PIO4
bool "ATMEL PIO4 driver"
-   depends on DM
+   depends on DM_GPIO
default n
help
  Say yes here to support the Atmel PIO4 driver.
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index 84e8cc5..d1a59ba 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -7,11 +7,17 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 #include 
+#include 
 #include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 
+DECLARE_GLOBAL_DATA_PTR;
+
 static struct atmel_pio4_port *atmel_pio4_port_base(u32 port)
 {
struct atmel_pio4_port *base = NULL;
@@ -165,15 +171,37 @@ int atmel_pio4_get_pio_input(u32 port, u32 pin)
 }
 
 #ifdef CONFIG_DM_GPIO
+
+struct atmel_pioctrl_data {
+   u32 nbanks;
+};
+
+struct atmel_pio4_platdata {
+   struct atmel_pio4_port *reg_base;
+};
+
+static struct atmel_pio4_port *atmel_pio4_bank_base(struct udevice *dev,
+   u32 bank)
+{
+   struct atmel_pio4_platdata *plat = dev_get_platdata(dev);
+   struct atmel_pio4_port *port_base =
+   (struct atmel_pio4_port *)((u32)plat->reg_base +
+   ATMEL_PIO_BANK_OFFSET * bank);
+
+   return port_base;
+}
+
 static int atmel_pio4_direction_input(struct udevice *dev, unsigned offset)
 {
-   struct at91_port_platdata *plat = dev_get_platdata(dev);
-   struct atmel_pio4_port *port_base = (atmel_pio4_port *)plat->base_addr;
-   u32 mask = 0x01 << offset;
-   u32 reg = ATMEL_PIO_CFGR_FUNC_GPIO;
+   u32 bank = ATMEL_PIO_BANK(offset);
+   u32 line = ATMEL_PIO_LINE(offset);
+   struct atmel_pio4_port *port_base = atmel_pio4_bank_base(dev, bank);
+   u32 mask = BIT(line);
 
writel(mask, _base->mskr);
-   writel(reg, _base->cfgr);
+
+   clrbits_le32(_base->cfgr,
+ATMEL_PIO_CFGR_FUNC_MASK | ATMEL_PIO_DIR_MASK);
 
return 0;
 }
@@ -181,13 +209,15 @@ static int atmel_pio4_direction_input(struct udevice 
*dev, unsigned offset)
 static int atmel_pio4_direction_output(struct udevice *dev,
   unsigned offset, int value)
 {
-   struct at91_port_platdata *plat = dev_get_platdata(dev);
-   struct atmel_pio4_port *port_base = (atmel_pio4_port *)plat->base_addr;
-   u32 mask = 0x01 << offset;
-   u32 reg = ATMEL_PIO_CFGR_FUNC_GPIO | ATMEL_PIO_DIR_MASK;
+   u32 bank = ATMEL_PIO_BANK(offset);
+   u32 line = ATMEL_PIO_LINE(offset);
+   struct atmel_pio4_port *port_base = atmel_pio4_bank_base(dev, bank);
+   u32 mask = BIT(line);
 
writel(mask, _base->mskr);
-   writel(reg, _base->cfgr);
+
+   clrsetbits_le32(_base->cfgr,
+   ATMEL_PIO_CFGR_FUNC_MASK, ATMEL_PIO_DIR_MASK);
 
if (value)
writel(mask, _base->sodr);
@@ -199,9 +229,10 @@ static int atmel_pio4_direction_output(struct udevice *dev,
 
 static int atmel_pio4_get_value(struct udevice *dev, unsigned offset)
 {
-   struct at91_port_platdata *plat = dev_get_platdata(dev);
-   struct atmel_pio4_port *port_base = (atmel_pio4_port *)plat->base_addr;
-   u32 mask = 0x01 << offset;
+   u32 bank = ATMEL_PIO_BANK(offset);
+   u32 line = ATMEL_PIO_LINE(offset);
+   struct atmel_pio4_port *port_base = atmel_pio4_bank_base(dev, bank);
+   u32 mask = BIT(line);
 
return (readl(_base->pdsr) & mask) ? 1 : 0;
 }
@@ -209,9 +240,10 @@ static int atmel_pio4_get_value(struct udevice *dev, 
unsigned offset)
 static int atmel_pio4_set_value(struct udevice *dev,
unsigned offset, int value)
 {
-   struct at91_port_platdata *plat = dev_get_platdata(dev);
-   struct atmel_pio4_port *port_base = (atmel_pio4_port *)plat->base_addr;
-   u32 mask = 0x01 << offset;
+   u32 bank = ATMEL_PIO_BANK(offset);
+   u32 line = 

[U-Boot] [PATCH v5 3/5] pinctrl: at91-pio4: Add pinctrl driver

2016-06-19 Thread Wenyou Yang
AT91 PIO4 controller is a combined gpio-controller, pin-mux and
pin-config module. The peripheral's pins are assigned through
per-pin based muxing logic.

The pin configuration is performed on specific registers which
are shared along with the gpio controller. So regard the pinctrl
device as a child of atmel_pio4 device.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v5:
 - Fixed the return value, -ENODEV->-EINVAL.
 - Remove check on dev_get_parent() return.

Changes in v4: None
Changes in v3:
 - Rework due to the pinctrl device is regarded as atmel_pio4
   device's child.

Changes in v2:
 - remove meaningless comment.
 - add else path for argument of pinconf.
 - add inline attribute for atmel_pio4_bank_base().
 - add handle if the pinmux entries is greater maximum value.

 drivers/pinctrl/Kconfig |   7 ++
 drivers/pinctrl/Makefile|   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c | 182 
 3 files changed, 190 insertions(+)
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 1785e3b..01ce740 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -123,6 +123,13 @@ config QCA953X_PINCTRL
  both the GPIO definitions and pin control functions for each
  available multiplex function.
 
+config PINCTRL_AT91PIO4
+   bool "AT91 PIO4 pinctrl driver"
+   depends on DM
+   help
+ This option is to enable the AT91 pinctrl driver for AT91 PIO4
+ controller which is available on SAMA5D2 SoC.
+
 config ROCKCHIP_PINCTRL
bool "Rockchip pin control driver"
depends on DM
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 7f94681..c92ab8c 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -5,6 +5,7 @@
 obj-y  += pinctrl-uclass.o
 obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC)   += pinctrl-generic.o
 
+obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o
 obj-y  += nxp/
 obj-$(CONFIG_ARCH_ATH79) += ath79/
 obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c 
b/drivers/pinctrl/pinctrl-at91-pio4.c
new file mode 100644
index 000..6d4aadc
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -0,0 +1,182 @@
+/*
+ * Atmel PIO4 pinctrl driver
+ *
+ * Copyright (C) 2016 Atmel Corporation
+ *   Wenyou.Yang 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Warning:
+ * In order to not introduce confusion between Atmel PIO groups and pinctrl
+ * framework groups, Atmel PIO groups will be called banks.
+ */
+
+struct atmel_pio4_platdata {
+   struct atmel_pio4_port *reg_base;
+};
+
+static const struct pinconf_param conf_params[] = {
+   { "bias-disable", PIN_CONFIG_BIAS_DISABLE, 0 },
+   { "bias-pull-up", PIN_CONFIG_BIAS_PULL_UP, 1 },
+   { "bias-pull-down", PIN_CONFIG_BIAS_PULL_DOWN, 1 },
+   { "drive-open-drain", PIN_CONFIG_DRIVE_OPEN_DRAIN, 0 },
+   { "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
+   { "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
+   { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
+};
+
+static u32 atmel_pinctrl_get_pinconf(const void *blob, int node)
+{
+   const struct pinconf_param *params;
+   u32 param, arg, conf = 0;
+   u32 i;
+
+   for (i = 0; i < ARRAY_SIZE(conf_params); i++) {
+   params = _params[i];
+   if (!fdt_get_property(blob, node, params->property, NULL))
+   continue;
+
+   param = params->param;
+   arg = params->default_value;
+
+   switch (param) {
+   case PIN_CONFIG_BIAS_DISABLE:
+   conf &= (~ATMEL_PIO_PUEN_MASK);
+   conf &= (~ATMEL_PIO_PDEN_MASK);
+   break;
+   case PIN_CONFIG_BIAS_PULL_UP:
+   conf |= ATMEL_PIO_PUEN_MASK;
+   break;
+   case PIN_CONFIG_BIAS_PULL_DOWN:
+   conf |= ATMEL_PIO_PDEN_MASK;
+   break;
+   case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+   if (arg == 0)
+   conf &= (~ATMEL_PIO_OPD_MASK);
+   else
+   conf |= ATMEL_PIO_OPD_MASK;
+   break;
+   case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
+   if (arg == 0)
+   conf |= ATMEL_PIO_SCHMITT_MASK;
+   else
+   conf &= (~ATMEL_PIO_SCHMITT_MASK);
+   break;
+   case PIN_CONFIG_INPUT_DEBOUNCE:
+ 

[U-Boot] [PATCH v5 0/5] ARM: AT91: Add AT91 PIO4 pinctrl driver and gpio driver with DM

2016-06-19 Thread Wenyou Yang
AT91 PIO4 controller is a combined gpio-controller, pin-mux and
pin-config module.

This patch is to add the pinctrl driver, and rework the atmel-pio4
gpio driver to support driver model and device tree.

Changes in v5:
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
 - Use clrbits_le32() to replace readl()/writel().
 - Fixed the return value, -ENODEV->-EINVAL.
 - Remove check on dev_get_parent() return.
 - Fixed the return value, -ENODEV->-EINVAL.
 - Remove check on dev_get_parent() return.
 - Collect Reviewed-by tags.

Changes in v4:
 - Remove the redundant log print.

Changes in v3:
 - Add bind callback to support the pinctl device regarding as
   a child of atmel_pio4 device.
 - Add clock support.
 - Rework due to the pinctrl device is regarded as atmel_pio4
   device's child.

Changes in v2:
 - remove meaningless comment.
 - add else path for argument of pinconf.
 - add inline attribute for atmel_pio4_bank_base().
 - add handle if the pinmux entries is greater maximum value.
 - add detailed example to show how to configure pinctrl for device.
 - remove interrupt and gpio property description.
 - add reviewed-by tag.
 - integrate the gpio rework patch into this patch series.
 - add the new patch to move the PIO4 definitions to head file
   and rephrase them.
 - add the new patch to add #ifndef before CONFIG_ATMEL_PIO4
   in configs/sama5d2_xplained.h

Wenyou Yang (5):
  gpio: atmel_pio4: Move PIO4 definitions to head file
  gpio: atmel_pio4: Rework to support DM & DT
  pinctrl: at91-pio4: Add pinctrl driver
  atmel: Bring in at91 pio4 device tree file and bindings
  configs: sama5d2_xplained: Add #ifndef before CONFIG_ATMEL_PIO4

 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 arch/arm/mach-at91/include/mach/atmel_pio4.h   |  35 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 drivers/gpio/Kconfig   |   2 +-
 drivers/gpio/atmel_pio4.c  | 201 +++--
 drivers/pinctrl/Kconfig|   7 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c| 182 +
 include/configs/sama5d2_xplained.h |   2 +
 9 files changed, 1304 insertions(+), 72 deletions(-)
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c

-- 
2.7.4

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


[U-Boot] [PATCH] mmc: sdhci: Add the programmable clock mode support

2016-06-19 Thread Wenyou Yang
Add the programmable clock mode for the clock generator.

Signed-off-by: Wenyou Yang 
---

 drivers/mmc/sdhci.c | 49 +++--
 include/sdhci.h | 15 +++
 2 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 5c71ab8..ee6d4a1 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -286,7 +286,7 @@ static int sdhci_send_command(struct mmc *mmc, struct 
mmc_cmd *cmd,
 static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
 {
struct sdhci_host *host = mmc->priv;
-   unsigned int div, clk, timeout, reg;
+   unsigned int div, clk = 0, timeout, reg;
 
/* Wait max 20 ms */
timeout = 200;
@@ -310,14 +310,35 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int 
clock)
return 0;
 
if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
-   /* Version 3.00 divisors must be a multiple of 2. */
-   if (mmc->cfg->f_max <= clock)
-   div = 1;
-   else {
-   for (div = 2; div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
-   if ((mmc->cfg->f_max / div) <= clock)
+   /*
+* Check if the Host Controller supports Programmable Clock
+* Mode.
+*/
+   if (host->clk_mul) {
+   for (div = 1; div <= 1024; div++) {
+   if ((mmc->cfg->f_max * host->clk_mul / div)
+   <= clock)
break;
}
+
+   /*
+* Set Programmable Clock Mode in the Clock
+* Control register.
+*/
+   clk = SDHCI_PROG_CLOCK_MODE;
+   div--;
+   } else {
+   /* Version 3.00 divisors must be a multiple of 2. */
+   if (mmc->cfg->f_max <= clock) {
+   div = 1;
+   } else {
+   for (div = 2;
+div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
+   if ((mmc->cfg->f_max / div) <= clock)
+   break;
+   }
+   }
+   div >>= 1;
}
} else {
/* Version 2.00 divisors must be a power of 2. */
@@ -325,13 +346,13 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int 
clock)
if ((mmc->cfg->f_max / div) <= clock)
break;
}
+   div >>= 1;
}
-   div >>= 1;
 
if (host->set_clock)
host->set_clock(host->index, div);
 
-   clk = (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
+   clk |= (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
clk |= ((div & SDHCI_DIV_HI_MASK) >> SDHCI_DIV_MASK_LEN)
<< SDHCI_DIVIDER_HI_SHIFT;
clk |= SDHCI_CLOCK_INT_EN;
@@ -480,7 +501,7 @@ static const struct mmc_ops sdhci_ops = {
 
 int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
 {
-   unsigned int caps;
+   unsigned int caps, caps_1;
 
host->cfg.name = host->name;
host->cfg.ops = _ops;
@@ -546,6 +567,14 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 
min_clk)
 
host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 
+   /*
+* In case of Host Controller v3.00, find out whether clock
+* multiplier is supported.
+*/
+   caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
+   host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
+   SDHCI_CLOCK_MUL_SHIFT;
+
sdhci_reset(host, SDHCI_RESET_ALL);
 
host->mmc = mmc_create(>cfg, host);
diff --git a/include/sdhci.h b/include/sdhci.h
index e0f6667..5abe0a2 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -97,6 +97,7 @@
 #define  SDHCI_DIV_MASK0xFF
 #define  SDHCI_DIV_MASK_LEN8
 #define  SDHCI_DIV_HI_MASK 0x300
+#define  SDHCI_PROG_CLOCK_MODE  0x0020
 #define  SDHCI_CLOCK_CARD_EN   0x0004
 #define  SDHCI_CLOCK_INT_STABLE0x0002
 #define  SDHCI_CLOCK_INT_EN0x0001
@@ -166,6 +167,19 @@
 #define  SDHCI_CAN_64BIT   0x1000
 
 #define SDHCI_CAPABILITIES_1   0x44
+#define  SDHCI_SUPPORT_SDR50   0x0001
+#define  SDHCI_SUPPORT_SDR104  0x0002
+#define  SDHCI_SUPPORT_DDR50   0x0004
+#define  SDHCI_DRIVER_TYPE_A   0x0010
+#define  SDHCI_DRIVER_TYPE_C   0x0020
+#define  SDHCI_DRIVER_TYPE_D   0x0040
+#define  SDHCI_RETUNING_TIMER_COUNT_MASK   0x0F00
+#define  SDHCI_RETUNING_TIMER_COUNT_SHIFT  8
+#define  SDHCI_USE_SDR50_TUNING0x2000

[U-Boot] [PATCH v3] clk: at91: Add clock driver

2016-06-19 Thread Wenyou Yang
The patch is referred to at91 clock driver of Linux, to make
the clock node descriptions in DT aligned with the Linux's.

Signed-off-by: Wenyou Yang 
---

Changes in v3:
 - Update based on [PATCH] clk: convert API to match reset/mailbox
   style (http://patchwork.ozlabs.org/patch/625342/).
 - Remove [PATCH] clk: clk-uclass: Add post binding for CLK uclass,
   add bind() method to bind the clk node without compatible.
 - Add help for Kconfig HAVE_AT91_XX option.
 - Add ofdata_to_platdata() method for generated clock driver
   to handle the device tree.
 - Use setbits_le32() to replace readl()/writel().
 - Fixed the return value, -ENODEV->-EINVAL.
 - Use dev_get_addr_ptr() to replace dev_get_addr().
 - Remove check on dev_get_parent() return.

Changes in v2:
 - Remove the redundant log print.

 arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
 drivers/clk/Kconfig|   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/at91/Kconfig   |  23 
 drivers/clk/at91/Makefile  |  11 ++
 drivers/clk/at91/clk-generated.c   | 162 +
 drivers/clk/at91/clk-h32mx.c   |  56 ++
 drivers/clk/at91/clk-main.c|  55 ++
 drivers/clk/at91/clk-master.c  |  33 ++
 drivers/clk/at91/clk-peripheral.c  |  60 +++
 drivers/clk/at91/clk-plla.c|  55 ++
 drivers/clk/at91/clk-slow.c|  37 +++
 drivers/clk/at91/clk-system.c  |  76 ++
 drivers/clk/at91/clk-utmi.c|  67 
 drivers/clk/at91/pmc.c |  71 +
 drivers/clk/at91/pmc.h |  18 
 drivers/clk/at91/sckc.c|  30 ++
 17 files changed, 764 insertions(+), 3 deletions(-)
 create mode 100644 drivers/clk/at91/Kconfig
 create mode 100644 drivers/clk/at91/Makefile
 create mode 100644 drivers/clk/at91/clk-generated.c
 create mode 100644 drivers/clk/at91/clk-h32mx.c
 create mode 100644 drivers/clk/at91/clk-main.c
 create mode 100644 drivers/clk/at91/clk-master.c
 create mode 100644 drivers/clk/at91/clk-peripheral.c
 create mode 100644 drivers/clk/at91/clk-plla.c
 create mode 100644 drivers/clk/at91/clk-slow.c
 create mode 100644 drivers/clk/at91/clk-system.c
 create mode 100644 drivers/clk/at91/clk-utmi.c
 create mode 100644 drivers/clk/at91/pmc.c
 create mode 100644 drivers/clk/at91/pmc.h
 create mode 100644 drivers/clk/at91/sckc.c

diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h 
b/arch/arm/mach-at91/include/mach/at91_pmc.h
index 680ceb0..2875ff2 100644
--- a/arch/arm/mach-at91/include/mach/at91_pmc.h
+++ b/arch/arm/mach-at91/include/mach/at91_pmc.h
@@ -149,6 +149,9 @@ typedef struct at91_pmc {
 
 #define AT91_PMC_PCR_PID_MASK  (0x3f)
 #define AT91_PMC_PCR_GCKCSS(0x7 << 8)
+#define AT91_PMC_PCR_GCKCSS_MASK   0x07
+#define AT91_PMC_PCR_GCKCSS_OFFSET 8
+#define AT91_PMC_PCR_GCKCSS_(x)((x & 0x07) << 8)
 #defineAT91_PMC_PCR_GCKCSS_SLOW_CLK(0x0 << 8)
 #defineAT91_PMC_PCR_GCKCSS_MAIN_CLK(0x1 << 8)
 #defineAT91_PMC_PCR_GCKCSS_PLLA_CLK(0x2 << 8)
@@ -158,8 +161,9 @@ typedef struct at91_pmc {
 #define AT91_PMC_PCR_CMD_WRITE (0x1 << 12)
 #define AT91_PMC_PCR_DIV   (0x3 << 16)
 #define AT91_PMC_PCR_GCKDIV(0xff << 20)
-#defineAT91_PMC_PCR_GCKDIV_(x) (((x) & 0xff) << 20)
-#defineAT91_PMC_PCR_GCKDIV_OFFSET  20
+#define AT91_PMC_PCR_GCKDIV_MASK   0xff
+#define AT91_PMC_PCR_GCKDIV_OFFSET 20
+#define AT91_PMC_PCR_GCKDIV_(x)((x & 0xff) << 20)
 #define AT91_PMC_PCR_EN(0x1 << 28)
 #define AT91_PMC_PCR_GCKEN (0x1 << 29)
 
@@ -243,8 +247,9 @@ typedef struct at91_pmc {
 #defineAT91_PMC_PCK1RDY(1 <<  9)   /* 
Programmable Clock 1 */
 #defineAT91_PMC_PCK2RDY(1 << 10)   /* 
Programmable Clock 2 */
 #defineAT91_PMC_PCK3RDY(1 << 11)   /* 
Programmable Clock 3 */
+#defineAT91_PMC_MOSCSELS   BIT(16) /* Main 
Oscillator Selection Status */
+#defineAT91_PMC_MOSCRCSBIT(17) /* 12 
MHz RC Oscillator Status */
 #defineAT91_PMC_GCKRDY (1 << 24)
-
 #defineAT91_PMC_PROTKEY0x504d4301  /* Activation 
Code */
 
 /* PLL Charge Pump Current Register (PMC_PLLICPR) */
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 6eee8eb..3da63c0 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -22,5 +22,6 @@ config SPL_CLK
 
 source "drivers/clk/uniphier/Kconfig"
 source "drivers/clk/exynos/Kconfig"
+source "drivers/clk/at91/Kconfig"
 
 endmenu
diff --git a/drivers/clk/Makefile 

[U-Boot] [PATCH v2] rtc: Tidy up the code style

2016-06-19 Thread Simon Glass
This code generates lots of checkpatch errors. Fix them.

Signed-off-by: Simon Glass 
---

Changes in v2:
- Fix the double-space problems that I introduced!

 drivers/rtc/date.c | 71 --
 1 file changed, 32 insertions(+), 39 deletions(-)

diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
index 8c643a0..bfa2e13 100644
--- a/drivers/rtc/date.c
+++ b/drivers/rtc/date.c
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 
-/*
- * Date & Time support for Philips PCF8563 RTC
- */
-
 #include 
 #include 
 #include 
@@ -28,53 +24,52 @@ static int month_days[12] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
 };
 
+static int month_offset[] = {
+   0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
+};
+
 /*
  * This only works for the Gregorian calendar - i.e. after 1752 (in the UK)
  */
 int rtc_calc_weekday(struct rtc_time *tm)
 {
-   int leapsToDate;
-   int lastYear;
+   int leaps_to_date;
+   int last_year;
int day;
-   int MonthOffset[] = { 0,31,59,90,120,151,181,212,243,273,304,334 };
 
if (tm->tm_year < 1753)
-   return -EINVAL;
-   lastYear=tm->tm_year-1;
+   return -1;
+   last_year = tm->tm_year - 1;
 
-   /*
-* Number of leap corrections to apply up to end of last year
-*/
-   leapsToDate = lastYear/4 - lastYear/100 + lastYear/400;
+   /* Number of leap corrections to apply up to end of last year */
+   leaps_to_date = last_year / 4 - last_year / 100 + last_year / 400;
 
/*
 * This year is a leap year if it is divisible by 4 except when it is
 * divisible by 100 unless it is divisible by 400
 *
-* e.g. 1904 was a leap year, 1900 was not, 1996 is, and 2000 will be
+* e.g. 1904 was a leap year, 1900 was not, 1996 is, and 2000 is.
 */
-   if((tm->tm_year%4==0) &&
-  ((tm->tm_year%100!=0) || (tm->tm_year%400==0)) &&
-  (tm->tm_mon>2)) {
-   /*
-* We are past Feb. 29 in a leap year
-*/
-   day=1;
+   if (tm->tm_year % 4 == 0 &&
+   ((tm->tm_year % 100 != 0) || (tm->tm_year % 400 == 0)) &&
+   tm->tm_mon > 2) {
+   /* We are past Feb. 29 in a leap year */
+   day = 1;
} else {
-   day=0;
+   day = 0;
}
 
-   day += lastYear*365 + leapsToDate + MonthOffset[tm->tm_mon-1] + 
tm->tm_mday;
-
-   tm->tm_wday=day%7;
+   day += last_year * 365 + leaps_to_date + month_offset[tm->tm_mon - 1] +
+   tm->tm_mday;
+   tm->tm_wday = day % 7;
 
return 0;
 }
 
 int rtc_to_tm(int tim, struct rtc_time *tm)
 {
-   register inti;
-   register long   hms, day;
+   register int i;
+   register long hms, day;
 
day = tim / SECDAY;
hms = tim % SECDAY;
@@ -85,22 +80,19 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
tm->tm_sec = (hms % 3600) % 60;
 
/* Number of years in days */
-   for (i = STARTOFTIME; day >= days_in_year(i); i++) {
+   for (i = STARTOFTIME; day >= days_in_year(i); i++)
day -= days_in_year(i);
-   }
tm->tm_year = i;
 
/* Number of months in days left */
-   if (leapyear(tm->tm_year)) {
+   if (leapyear(tm->tm_year))
days_in_month(FEBRUARY) = 29;
-   }
-   for (i = 1; day >= days_in_month(i); i++) {
+   for (i = 1; day >= days_in_month(i); i++)
day -= days_in_month(i);
-   }
days_in_month(FEBRUARY) = 28;
tm->tm_mon = i;
 
-   /* Days are what is left over (+1) from all that. */
+   /* Days are what is left over (+1) from all that */
tm->tm_mday = day + 1;
 
/* Zero unused fields */
@@ -113,19 +105,20 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
return rtc_calc_weekday(tm);
 }
 
-/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
+/*
+ * Converts Gregorian date to seconds since 1970-01-01 00:00:00.
  * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
  * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
  *
  * [For the Julian calendar (which was used in Russia before 1917,
  * Britain & colonies before 1752, anywhere else before 1582,
  * and is still in use by some communities) leave out the
- * -year/100+year/400 terms, and add 10.]
+ * -year / 100 + year / 400 terms, and add 10.]
  *
  * This algorithm was first published by Gauss (I think).
  *
  * WARNING: this function will overflow on 2106-02-07 06:28:16 on
- * machines were long is 32-bit! (However, as time_t is signed, we
+ * machines where long is 32-bit! (However, as time_t is signed, we
  * will already get problems at other places on 2038-01-19 03:14:08)
  */
 unsigned long rtc_mktime(const struct rtc_time *tm)
@@ -135,8 +128,8 @@ unsigned long rtc_mktime(const struct 

Re: [U-Boot] [PATCH v3 4/5] fdt: x86: Tidy up a few COMPAT string definitions

2016-06-19 Thread Bin Meng
On Mon, Jun 20, 2016 at 7:33 AM, Simon Glass  wrote:
> The 'COMPAT_' part should appear only once so drop the duplicate part. It is
> ignored anyway, but let's keep things consistent.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v3:
> - Add new patch to tidy up a few COMPAT string definitions
>
>  lib/fdtdec.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>

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


Re: [U-Boot] [PATCH v3 3/5] fdt: Add a note to avoid adding new compatible strings

2016-06-19 Thread Bin Meng
On Mon, Jun 20, 2016 at 7:33 AM, Simon Glass  wrote:
> The list is shrinking and we should avoid adding new things. Instead, a
> proper driver should be created with driver model.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v3:
> - Add new patch to request people avoid adding new compatible strings
>
>  lib/fdtdec.c | 5 +
>  1 file changed, 5 insertions(+)
>

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


Re: [U-Boot] [PATCH] dm: ehci-mx6: support driver model

2016-06-19 Thread Peng Fan
Hi Simon,

On Fri, Jun 17, 2016 at 04:59:49PM -0600, Simon Glass wrote:
>Hi Peng,
>
>On 17 June 2016 at 00:19, Peng Fan  wrote:
>> Support driver model for ehci mx6 driver.
>> Consolidate code to be shared between DM and non-DM, such as
>> introducing ehci_mx6_common_init.
>> For simplicity, some old fasion code are keeped for DM usage,
>> such as board_ehci_power and board_usb_phy_mode. And 'dr-mode',
>> usbphy and vbus handling code for DM is not added now.
>> These will be added in future patches.
>>
>> Signed-off-by: Peng Fan 
>> Cc: Marek Vasut 
>> Cc: Mateusz Kulikowski 
>> Cc: Stefan Agner 
>> Cc: Simon Glass 
>> ---
>>  drivers/usb/host/ehci-mx6.c | 144 
>> +++-
>>  1 file changed, 130 insertions(+), 14 deletions(-)
>
>Reviewed-by: Simon Glass 
>
>Good start. Do you have a plan to drop the board_...() functions?

Yeah. I'll drop the board_ functions for dt+dm for ehci-mx6 in following
up patches.

Thanks,
Peng.

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


Re: [U-Boot] [PATCH] rtc: Tidy up the code style

2016-06-19 Thread Bin Meng
Hi Simon,

On Mon, Jun 20, 2016 at 7:25 AM, Simon Glass  wrote:
> This code generates lots of checkpatch errors. Fix them.
>
> Signed-off-by: Simon Glass 
> ---
>
>  drivers/rtc/date.c | 79 
> +-
>  1 file changed, 36 insertions(+), 43 deletions(-)
>
> diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
> index 8c643a0..5ab6770 100644
> --- a/drivers/rtc/date.c
> +++ b/drivers/rtc/date.c
> @@ -5,10 +5,6 @@
>   * SPDX-License-Identifier:GPL-2.0+
>   */
>
> -/*
> - * Date & Time support for Philips PCF8563 RTC
> - */
> -
>  #include 
>  #include 
>  #include 
> @@ -25,7 +21,11 @@
>  #definedays_in_month(a)(month_days[(a) - 1])
>
>  static int month_days[12] = {
> -   31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
> +   31,  28,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31

What's this change for? The original one looks good to me.

> +};
> +
> +static int month_offset[] = {
> +   0,  31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334

Looks there are two spaces between 0 and 31

>  };
>
>  /*
> @@ -33,48 +33,43 @@ static int month_days[12] = {
>   */
>  int rtc_calc_weekday(struct rtc_time *tm)
>  {
> -   int leapsToDate;
> +   int leaps_to_date;
> int lastYear;

last_year?

> int day;
> -   int MonthOffset[] = { 0,31,59,90,120,151,181,212,243,273,304,334 };
>
> if (tm->tm_year < 1753)
> -   return -EINVAL;
> -   lastYear=tm->tm_year-1;
> +   return -1;
> +   lastYear = tm->tm_year - 1;
>
> -   /*
> -* Number of leap corrections to apply up to end of last year
> -*/
> -   leapsToDate = lastYear/4 - lastYear/100 + lastYear/400;
> +   /* Number of leap corrections to apply up to end of last year */
> +   leaps_to_date = lastYear / 4 - lastYear / 100 + lastYear / 400;
>
> /*
>  * This year is a leap year if it is divisible by 4 except when it is
>  * divisible by 100 unless it is divisible by 400
>  *
> -* e.g. 1904 was a leap year, 1900 was not, 1996 is, and 2000 will be
> +* e.g. 1904 was a leap year,  1900 was not,  1996 is, and 2000 is.

Two spaces before 1900, 1996? Is this a must to make checkpatch happy?

>  */
> -   if((tm->tm_year%4==0) &&
> -  ((tm->tm_year%100!=0) || (tm->tm_year%400==0)) &&
> -  (tm->tm_mon>2)) {
> -   /*
> -* We are past Feb. 29 in a leap year
> -*/
> -   day=1;
> +   if (tm->tm_year % 4 == 0 &&
> +   ((tm->tm_year % 100 != 0) || (tm->tm_year % 400 == 0)) &&
> +   tm->tm_mon > 2) {
> +   /* We are past Feb. 29 in a leap year */
> +   day = 1;
> } else {
> -   day=0;
> +   day = 0;
> }
>
> -   day += lastYear*365 + leapsToDate + MonthOffset[tm->tm_mon-1] + 
> tm->tm_mday;
> -
> -   tm->tm_wday=day%7;
> +   day += lastYear * 365 + leaps_to_date + month_offset[tm->tm_mon - 1] +
> +   tm->tm_mday;
> +   tm->tm_wday = day % 7;
>
> return 0;
>  }
>
>  int rtc_to_tm(int tim, struct rtc_time *tm)
>  {
> -   register inti;
> -   register long   hms, day;
> +   register int i;
> +   register long hms, day;
>
> day = tim / SECDAY;
> hms = tim % SECDAY;
> @@ -85,22 +80,19 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
> tm->tm_sec = (hms % 3600) % 60;
>
> /* Number of years in days */
> -   for (i = STARTOFTIME; day >= days_in_year(i); i++) {
> +   for (i = STARTOFTIME; day >= days_in_year(i); i++)
> day -= days_in_year(i);
> -   }
> tm->tm_year = i;
>
> /* Number of months in days left */
> -   if (leapyear(tm->tm_year)) {
> +   if (leapyear(tm->tm_year))
> days_in_month(FEBRUARY) = 29;
> -   }
> -   for (i = 1; day >= days_in_month(i); i++) {
> +   for (i = 1; day >= days_in_month(i); i++)
> day -= days_in_month(i);
> -   }
> days_in_month(FEBRUARY) = 28;
> tm->tm_mon = i;
>
> -   /* Days are what is left over (+1) from all that. */
> +   /* Days are what is left over (+1) from all that */
> tm->tm_mday = day + 1;
>
> /* Zero unused fields */
> @@ -113,30 +105,31 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
> return rtc_calc_weekday(tm);
>  }
>
> -/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
> - * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
> - * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
> +/*
> + * Converts Gregorian date to seconds since 1970-01-01 00:00:00.
> + * Assumes input in normal date format,  i.e. 1980-12-31 23:59:59
> + * => year=1980,  mon=12,  day=31,  hour=23,  min=59,  sec=59.
>   *
>   * [For the Julian calendar (which was used in Russia before 

[U-Boot] [PATCH V2 1/2] ehci: mx7: fix usbnc_regs

2016-06-19 Thread Peng Fan
There is a 4 bytes hole between phy_cfg2 and phy_status, fix the
usbnc_regs structure to include the hole.

Signed-off-by: Ye Li 
Signed-off-by: Peng Fan 
---

V2:
 Split from V1 to a single patch.

 drivers/usb/host/ehci-mx6.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index bb48d0d..cc3b11c 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -194,8 +194,9 @@ struct usbnc_regs {
u32 reserve1[10];
u32 phy_cfg1;
u32 phy_cfg2;
+   u32 reserve2;
u32 phy_status;
-   u32 reserve2[4];
+   u32 reserve3[4];
u32 adp_cfg1;
u32 adp_cfg2;
u32 adp_status;
-- 
2.6.2

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


[U-Boot] [PATCH V2 2/2] ehci: mx7: fix otg id detection

2016-06-19 Thread Peng Fan
The USBNC_PHYCFG2_ACAENB bit should be cleared to enable the
OTG ID detection, not set it. When the bit is set, the ACA
Resistance Detection is enabled, which disables the OTG ID
detection, because the internal pull up is off.

Signed-off-by: Ye Li 
Signed-off-by: Peng Fan 
---

V2:
 split from V1 to a single patch.

 drivers/usb/host/ehci-mx6.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index cc3b11c..069f116 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -208,8 +208,11 @@ static void usb_power_config(int index)
(0x1 * index) + USBNC_OFFSET);
void __iomem *phy_cfg2 = (void __iomem *)(>phy_cfg2);
 
-   /* Enable usb_otg_id detection */
-   setbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB);
+   /*
+* Clear the ACAENB to enable usb_otg_id detection,
+* otherwise it is the ACA detection enabled.
+*/
+   clrbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB);
 }
 
 int usb_phy_mode(int port)
-- 
2.6.2

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


[U-Boot] [PATCH 3/5] Add comments for debug() and pr_fmt

2016-06-19 Thread Simon Glass
Add a note to each of these so it is more obvious how they work.

Signed-off-by: Simon Glass 
---

 include/common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/common.h b/include/common.h
index f9f4605..a425dd9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -100,6 +100,7 @@ typedef volatile unsigned char  vu_char;
 #define _DEBUG 0
 #endif
 
+/* Define this at the top of a file to add a prefix to debug messages */
 #ifndef pr_fmt
 #define pr_fmt(fmt) fmt
 #endif
@@ -115,6 +116,7 @@ typedef volatile unsigned char  vu_char;
printf(pr_fmt(fmt), ##args);\
} while (0)
 
+/* Show a message if DEBUG is defined in a file */
 #define debug(fmt, args...)\
debug_cond(_DEBUG, fmt, ##args)
 
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 5/5] arm: Show cache warnings in U-Boot proper only

2016-06-19 Thread Simon Glass
Avoid bloating the SPL image size.

Signed-off-by: Simon Glass 
---

 arch/arm/lib/cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 642a952..d330b09 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -61,8 +61,8 @@ int check_cache_range(unsigned long start, unsigned long stop)
ok = 0;
 
if (!ok) {
-   debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
- start, stop);
+   warn_non_spl("CACHE: Misaligned operation at range [%08lx, 
%08lx]\n",
+start, stop);
}
 
return ok;
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 4/5] Add warn_non_spl() to show a message in U-Boot proper

2016-06-19 Thread Simon Glass
SPL tends to be more space-constrained that U-Boot proper. Some error
messages are best suppressed in SPL. Add a macros to make this easy.

warn_non_spl() does nothing when built in SPL code.

Signed-off-by: Simon Glass 
---

 include/common.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/include/common.h b/include/common.h
index a425dd9..b779f60 100644
--- a/include/common.h
+++ b/include/common.h
@@ -100,6 +100,12 @@ typedef volatile unsigned char vu_char;
 #define _DEBUG 0
 #endif
 
+#ifdef CONFIG_SPL_BUILD
+#define _SPL_BUILD 1
+#else
+#define _SPL_BUILD 0
+#endif
+
 /* Define this at the top of a file to add a prefix to debug messages */
 #ifndef pr_fmt
 #define pr_fmt(fmt) fmt
@@ -120,6 +126,10 @@ typedef volatile unsigned char vu_char;
 #define debug(fmt, args...)\
debug_cond(_DEBUG, fmt, ##args)
 
+/* Show a message if not in SPL */
+#define warn_non_spl(fmt, args...) \
+   debug_cond(!_SPL_BUILD, fmt, ##args)
+
 /*
  * An assertion is run-time check done in debug mode only. If DEBUG is not
  * defined then it is skipped. If DEBUG is defined and the assertion fails,
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 0/5] arm: Tidy up the cache aligning warning code

2016-06-19 Thread Simon Glass
This series consolidates the code that warns about cache line alignment
problems (with flush and invalidate). It adjusts it so that a warning is
always displayed, except when building for SPL (since that bloats the code).

It is assumed that the cache is off in SPL.


Simon Glass (5):
  arm: Move check_cache_range() into a common place
  arm: Don't invalidate unaligned cache regions
  Add comments for debug() and pr_fmt
  Add warn_non_spl() to show a message in U-Boot proper
  arm: Show cache warnings in U-Boot proper only

 arch/arm/cpu/arm11/cpu.c   | 17 -
 arch/arm/cpu/arm926ejs/cache.c | 17 -
 arch/arm/cpu/armv7/cache_v7.c  | 40 ++--
 arch/arm/include/asm/cache.h   |  2 ++
 arch/arm/lib/cache.c   | 22 ++
 include/common.h   | 12 
 6 files changed, 38 insertions(+), 72 deletions(-)

-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 2/5] arm: Don't invalidate unaligned cache regions

2016-06-19 Thread Simon Glass
At present armv7 will unhappily invalidate a cache region and print an
error message. Make it skip the operation instead, as it does with other
cache operations.

Signed-off-by: Simon Glass 
---

 arch/arm/cpu/armv7/cache_v7.c | 23 ++-
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 823a156..e59597e 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -44,27 +44,8 @@ static void v7_dcache_inval_range(u32 start, u32 stop, u32 
line_len)
 {
u32 mva;
 
-   /*
-* If start address is not aligned to cache-line do not
-* invalidate the first cache-line
-*/
-   if (start & (line_len - 1)) {
-   printf("ERROR: %s - start address is not aligned - 0x%08x\n",
-   __func__, start);
-   /* move to next cache line */
-   start = (start + line_len - 1) & ~(line_len - 1);
-   }
-
-   /*
-* If stop address is not aligned to cache-line do not
-* invalidate the last cache-line
-*/
-   if (stop & (line_len - 1)) {
-   printf("ERROR: %s - stop address is not aligned - 0x%08x\n",
-   __func__, stop);
-   /* align to the beginning of this cache line */
-   stop &= ~(line_len - 1);
-   }
+   if (!check_cache_range(start, stop))
+   return;
 
for (mva = start; mva < stop; mva = mva + line_len) {
/* DCIMVAC - Invalidate data cache by MVA to PoC */
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH 1/5] arm: Move check_cache_range() into a common place

2016-06-19 Thread Simon Glass
This code is common, so move it into a common file.

Signed-off-by: Simon Glass 
---

 arch/arm/cpu/arm11/cpu.c   | 17 -
 arch/arm/cpu/arm926ejs/cache.c | 17 -
 arch/arm/cpu/armv7/cache_v7.c  | 17 -
 arch/arm/include/asm/cache.h   |  2 ++
 arch/arm/lib/cache.c   | 22 ++
 5 files changed, 24 insertions(+), 51 deletions(-)

diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c
index 1e4c214..7244c2e 100644
--- a/arch/arm/cpu/arm11/cpu.c
+++ b/arch/arm/cpu/arm11/cpu.c
@@ -69,23 +69,6 @@ void flush_dcache_all(void)
asm volatile("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
 }
 
-static int check_cache_range(unsigned long start, unsigned long stop)
-{
-   int ok = 1;
-
-   if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (!ok)
-   debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
-   start, stop);
-
-   return ok;
-}
-
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
if (!check_cache_range(start, stop))
diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 2839c86..2119382 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -29,23 +29,6 @@ void flush_dcache_all(void)
);
 }
 
-static int check_cache_range(unsigned long start, unsigned long stop)
-{
-   int ok = 1;
-
-   if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (!ok)
-   debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
-   start, stop);
-
-   return ok;
-}
-
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
if (!check_cache_range(start, stop))
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index dc309da..823a156 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -19,23 +19,6 @@
 void v7_flush_dcache_all(void);
 void v7_invalidate_dcache_all(void);
 
-static int check_cache_range(unsigned long start, unsigned long stop)
-{
-   int ok = 1;
-
-   if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
-   ok = 0;
-
-   if (!ok)
-   debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
-   start, stop);
-
-   return ok;
-}
-
 static u32 get_ccsidr(void)
 {
u32 ccsidr;
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index 1f63127..16e65c3 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -29,6 +29,8 @@ static inline void invalidate_l2_cache(void)
 }
 #endif
 
+int check_cache_range(unsigned long start, unsigned long stop);
+
 void l2_cache_enable(void);
 void l2_cache_disable(void);
 void set_section_dcache(int section, enum dcache_option option);
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 3bd8710..642a952 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -10,6 +10,10 @@
 #include 
 #include 
 
+#ifndef CONFIG_SYS_CACHELINE_SIZE
+#define CONFIG_SYS_CACHELINE_SIZE 32
+#endif
+
 /*
  * Flush range from all levels of d-cache/unified-cache.
  * Affects the range [start, start + size - 1].
@@ -46,6 +50,24 @@ __weak void flush_dcache_range(unsigned long start, unsigned 
long stop)
/* An empty stub, real implementation should be in platform code */
 }
 
+int check_cache_range(unsigned long start, unsigned long stop)
+{
+   int ok = 1;
+
+   if (start & (CONFIG_SYS_CACHELINE_SIZE - 1))
+   ok = 0;
+
+   if (stop & (CONFIG_SYS_CACHELINE_SIZE - 1))
+   ok = 0;
+
+   if (!ok) {
+   debug("CACHE: Misaligned operation at range [%08lx, %08lx]\n",
+ start, stop);
+   }
+
+   return ok;
+}
+
 #ifdef CONFIG_SYS_NONCACHED_MEMORY
 /*
  * Reserve one MMU section worth of address space below the malloc() area that
-- 
2.8.0.rc3.226.g39d4020

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


Re: [U-Boot] [PATCH v2 05/18] net: macb: Prepare for driver-model conversion

2016-06-19 Thread Simon Glass
Hi Andreas,

On 28 May 2016 at 16:32, Andreas Bießmann  wrote:
> Hi Simon,
>
> On 05.05.16 15:28, Simon Glass wrote:
>> Adjust this driver to avoid using struct netdev in functions that driver
>> model will call. Also refactor the receive function to be compatible with
>> driver model.
>>
>> Signed-off-by: Simon Glass 
>> Reviewed-by: Heiko Schocher 
>> Tested-on: smartweb, corvus, taurus, axm
>> Tested-by: Heiko Schocher 
>> Reviewed-by: Joe Hershberger 
>> ---
>>
>> Changes in v2: None
>>
>>  drivers/net/macb.c | 199 
>> +
>>  1 file changed, 124 insertions(+), 75 deletions(-)
>
> 
>
>> -static int macb_phy_init(struct macb_device *macb)
>> +static int macb_phy_init(struct macb_device *macb, const char *name)
>>  {
>> - struct eth_device *netdev = >netdev;
>>  #ifdef CONFIG_PHYLIB
>>   struct phy_device *phydev;
>>  #endif
>> @@ -452,7 +450,7 @@ static int macb_phy_init(struct macb_device *macb)
>>   int media, speed, duplex;
>>   int i;
>>
>> - arch_get_mdio_control(netdev->name);
>> + arch_get_mdio_control(name);
>>  #ifdef CONFIG_MACB_SEARCH_PHY
>>   /* Auto-detect phy_addr */
>>   if (!macb_phy_find(macb))
>> @@ -462,13 +460,13 @@ static int macb_phy_init(struct macb_device *macb)
>>   /* Check if the PHY is up to snuff... */
>>   phy_id = macb_mdio_read(macb, MII_PHYSID1);
>>   if (phy_id == 0x) {
>> - printf("%s: No PHY present\n", netdev->name);
>> + printf("%s: No PHY present\n", name);
>>   return 0;
>>   }
>>
>>  #ifdef CONFIG_PHYLIB
>>   /* need to consider other phy interface mode */
>> - phydev = phy_connect(macb->bus, macb->phy_addr, netdev,
>> + phydev = phy_connect(macb->bus, macb->phy_addr, >netdev,
>
> is this intentional? You removed every reference to netdev but retained
> this one.
> Well, it's clear to me that you have to provide an eth_device to
> phy_connect() but why change the function then and add the *name to
> function parameters?
>
>>PHY_INTERFACE_MODE_RGMII);
>>   if (!phydev) {
>>   printf("phy_connect failed\n");
>
> No more questions ...
>
> Reviewed-by: Andreas Bießmann 

Sorry for missing this. Actually this will need tweaking - I think Joe
pointed out that CONFIG_PHYLIB should not be used in modern code. But
in any case it is closer to converted (to driver model) than it was. I
think when something tries this out on a board that uses that they can
fix it and test. It will need to call phy_connect_dev() instead.

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


[U-Boot] [PATCH v3] mtd: nand: Drop a blank line in nand_wait()

2016-06-19 Thread Simon Glass
From: Andre Renaud 

This empty line should not be there. Remove it.
Signed-off-by: Andre Renaud 
Reviewed-by: Andreas Bießmann 
Signed-off-by: Simon Glass 
---

Changes in v3:
- Rebase to master

Changes in v2:
- Correct commit author in several cases
- Rebase to master

 drivers/mtd/nand/nand_base.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 74c563c..6897167 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -862,7 +862,6 @@ static void panic_nand_wait(struct mtd_info *mtd, struct 
nand_chip *chip,
  */
 static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
 {
-
int status;
unsigned long timeo = 400;
 
-- 
2.8.0.rc3.226.g39d4020

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


Re: [U-Boot] [U-Boot,v3,2/2] nand: extend nand torture

2016-06-19 Thread Scott Wood
On Mon, Jun 13, 2016 at 10:15:48AM +0200, Max Krummenacher wrote:
> nand torture currently works on exactly one nand block which is specified
> by giving the byteoffset to the beginning of the block.
> 
> Extend this by allowing for a second parameter specifying the byte size
> to be tested.
> 
> e.g.
> ==> nand torture 100
> 
> NAND torture: device 0 offset 0x100 size 0x2 (block size 0x2)
>  Passed: 1, failed: 0
> 
> ==> nand torture 100 4
> 
> NAND torture: device 0 offset 0x100 size 0x4 (block size 0x2)
>  Passed: 2, failed: 0
> 
> Signed-off-by: Max Krummenacher 
> Reviewed-by: Benoît Thébaudeau 
> ---

Applying with these changes:

diff --git a/cmd/nand.c b/cmd/nand.c
index 6d239a3..ffdeea4 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -659,11 +659,12 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
}
 
size = mtd->erasesize;
-   if (argc > 3)
+   if (argc > 3) {
if (!str2off(argv[3], )) {
puts("Size is not a valid number\n");
return 1;
}
+   }
 
endoff = off + size;
if (endoff > mtd->size) {
@@ -803,7 +804,7 @@ static char nand_help_text[] =
"nand dump[.oob] off - dump page\n"
 #ifdef CONFIG_CMD_NAND_TORTURE
"nand torture off - torture one block at offset\n"
-   "nand torture off size - torture blocks from off to off+size\n"
+   "nand torture off [size] - torture blocks from off to off+size\n"
 #endif
"nand scrub [-y] off size | scrub.part partition | scrub.chip\n"
"really clean NAND erasing bad blocks (UNSAFE)\n"

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


Re: [U-Boot] [U-Boot,1/1] common: fb_nand: won't compile

2016-06-19 Thread Scott Wood
On Tue, Jun 07, 2016 at 02:22:59PM -0700, Sergey Kubushyn wrote:
> Somehow this got overlooked when getting rid of nand_info.
> 
> Small patch, won't affect anything else, no reason to wait for the
> next cycle.
> 
> Signed-off-by: Sergey Kubushyn 
> ---

"Somehow" would be that there is no board that enables this code in order
to get build coverage...

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


Re: [U-Boot] [U-Boot, v3, 3/7] spl: nand: support redundant u-boot image

2016-06-19 Thread Scott Wood
On Mon, Jun 06, 2016 at 10:16:58AM +0200, Boris Brezillon wrote:
> On modern NAND it's more than recommended to have a backup copy of the
> u-boot binary to recover from corruption: bitflips are quite common on
> MLC NANDs, and the read-disturbance will corrupt your u-boot partitition
> more quickly than what you would see on an SLC NAND.
> 
> Add an extra Kconfig option to specify the offset of the redundant u-boot
> image.
> 
> Signed-off-by: Boris Brezillon 
> Acked-by: Hans de Goede 
> 
> # Conflicts:
> # common/spl/spl_nand.c
> # drivers/mtd/nand/Kconfig
> ---
>  common/spl/spl_nand.c| 5 +
>  drivers/mtd/nand/Kconfig | 8 
>  2 files changed, 13 insertions(+)
> 
> diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
> index bbd9546..d8c5b9e 100644
> --- a/common/spl/spl_nand.c
> +++ b/common/spl/spl_nand.c
> @@ -107,6 +107,11 @@ int spl_nand_load_image(void)
>  #endif
>   /* Load u-boot */
>   err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS, header);
> +#if CONFIG_SYS_NAND_U_BOOT_OFFS != CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
> + if (err)
> + err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND,
> + header);
> +#endif
>   nand_deselect();
>   return err;
>  }
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 5fe169f..8c46a2f 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -117,6 +117,14 @@ config SYS_NAND_U_BOOT_OFFS
>   Set the offset from the start of the nand where u-boot should be
>   loaded from.
>  
> +config SYS_NAND_U_BOOT_OFFS_REDUND
> + hex "Location in NAND to read U-Boot from"
> + default SYS_NAND_U_BOOT_OFFS
> + depends on SYS_NAND_U_BOOT_LOCATIONS
> + help
> + Set the offset from the start of the nand where the redundant u-boot
> + should be loaded from.
> +
>  config SPL_NAND_DENALI
>   bool "Support Denali NAND controller for SPL"
>   help

I'm adding the below ifdef while applying, so that the build doesn't
break on targets that don't define CONFIG_SYS_NAND_U_BOOT_LOCATIONS.

diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 952f644..0e35e0f 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -134,11 +134,13 @@ int spl_nand_load_image(void)
 #endif
/* Load u-boot */
err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS, header);
+#ifdef CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
 #if CONFIG_SYS_NAND_U_BOOT_OFFS != CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND
if (err)
err = spl_nand_load_element(CONFIG_SYS_NAND_U_BOOT_OFFS_REDUND,
header);
 #endif
+#endif
nand_deselect();
return err;
 }


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


[U-Boot] [PATCH v3 3/5] fdt: Add a note to avoid adding new compatible strings

2016-06-19 Thread Simon Glass
The list is shrinking and we should avoid adding new things. Instead, a
proper driver should be created with driver model.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Add new patch to request people avoid adding new compatible strings

 lib/fdtdec.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 59b75f0..668acca 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -19,6 +19,11 @@ DECLARE_GLOBAL_DATA_PTR;
  * Here are the type we know about. One day we might allow drivers to
  * register. For now we just put them here. The COMPAT macro allows us to
  * turn this into a sparse list later, and keeps the ID with the name.
+ *
+ * NOTE: This list is basically a TODO list for things that need to be
+ * converted to driver model. So don't add new things here unless there is a
+ * good reason why driver-model conversion is infeasible. Examples include
+ * things which are used before driver model is available.
  */
 #define COMPAT(id, name) name
 static const char * const compat_names[COMPAT_COUNT] = {
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH v3 1/5] x86: fdt: Drop the unused compatible strings in fdtdec

2016-06-19 Thread Simon Glass
We have drivers for several more devices now, so drop the strings which are
no-longer used.

Signed-off-by: Simon Glass 
Reviewed-by: Bin Meng 

---

Changes in v3:
- Rebase to master

 arch/x86/cpu/ivybridge/lpc.c | 6 --
 include/fdtdec.h | 5 -
 lib/fdtdec.c | 5 -
 3 files changed, 16 deletions(-)

diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index ff1faa5..4e0be2a 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -424,8 +424,6 @@ static void set_spi_speed(void)
 static int lpc_init_extra(struct udevice *dev)
 {
struct udevice *pch = dev->parent;
-   const void *blob = gd->fdt_blob;
-   int node;
 
debug("pch: lpc_init\n");
dm_pci_write_bar32(pch, 0, 0);
@@ -434,10 +432,6 @@ static int lpc_init_extra(struct udevice *dev)
dm_pci_write_bar32(pch, 3, 0x800);
dm_pci_write_bar32(pch, 4, 0x900);
 
-   node = fdtdec_next_compatible(blob, 0, COMPAT_INTEL_PCH);
-   if (node < 0)
-   return -ENOENT;
-
/* Set the value for PCI command register. */
dm_pci_write_config16(pch, PCI_COMMAND, 0x000f);
 
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 54e3d81..ae30b8a 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -153,14 +153,9 @@ enum fdt_compat_id {
COMPAT_SAMSUNG_EXYNOS5_I2C, /* Exynos5 High Speed I2C Controller */
COMPAT_SAMSUNG_EXYNOS_SYSMMU,   /* Exynos sysmmu */
COMPAT_INTEL_MICROCODE, /* Intel microcode update */
-   COMPAT_INTEL_PANTHERPOINT_AHCI, /* Intel Pantherpoint AHCI */
-   COMPAT_INTEL_MODEL_206AX,   /* Intel Model 206AX CPU */
-   COMPAT_INTEL_GMA,   /* Intel Graphics Media Accelerator */
COMPAT_AMS_AS3722,  /* AMS AS3722 PMIC */
-   COMPAT_INTEL_ICH_SPI,   /* Intel ICH7/9 SPI controller */
COMPAT_INTEL_QRK_MRC,   /* Intel Quark MRC */
COMPAT_SOCIONEXT_XHCI,  /* Socionext UniPhier xHCI */
-   COMPAT_INTEL_PCH,   /* Intel PCH */
COMPAT_ALTERA_SOCFPGA_DWMAC,/* SoCFPGA Ethernet controller */
COMPAT_ALTERA_SOCFPGA_DWMMC,/* SoCFPGA DWMMC controller */
COMPAT_ALTERA_SOCFPGA_DWC2USB,  /* SoCFPGA DWC2 USB controller */
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 686b89d..2f54d71 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -58,14 +58,9 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(SAMSUNG_EXYNOS5_I2C, "samsung,exynos5-hsi2c"),
COMPAT(SAMSUNG_EXYNOS_SYSMMU, "samsung,sysmmu-v3.3"),
COMPAT(INTEL_MICROCODE, "intel,microcode"),
-   COMPAT(INTEL_PANTHERPOINT_AHCI, "intel,pantherpoint-ahci"),
-   COMPAT(INTEL_MODEL_206AX, "intel,model-206ax"),
-   COMPAT(INTEL_GMA, "intel,gma"),
COMPAT(AMS_AS3722, "ams,as3722"),
-   COMPAT(INTEL_ICH_SPI, "intel,ich-spi"),
COMPAT(INTEL_QRK_MRC, "intel,quark-mrc"),
COMPAT(SOCIONEXT_XHCI, "socionext,uniphier-xhci"),
-   COMPAT(COMPAT_INTEL_PCH, "intel,bd82x6x"),
COMPAT(ALTERA_SOCFPGA_DWMAC, "altr,socfpga-stmmac"),
COMPAT(ALTERA_SOCFPGA_DWMMC, "altr,socfpga-dw-mshc"),
COMPAT(ALTERA_SOCFPGA_DWC2USB, "snps,dwc2"),
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH v3 5/5] sandbox: Find keyboard driver using driver model

2016-06-19 Thread Simon Glass
The cros-ec keyboard is always a child of the cros-ec node. Rather than
searching the device tree, looking at the children. Remove the compat string
which is now unused.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Add new patch to find keyboard driver using driver model

 drivers/misc/cros_ec_sandbox.c | 11 ++-
 include/fdtdec.h   |  1 -
 lib/fdtdec.c   |  1 -
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 98f19a6..c4fbca0 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -517,6 +517,7 @@ int cros_ec_probe(struct udevice *dev)
struct ec_state *ec = dev->priv;
struct cros_ec_dev *cdev = dev->uclass_priv;
const void *blob = gd->fdt_blob;
+   struct udevice *keyb_dev;
int node;
int err;
 
@@ -525,7 +526,15 @@ int cros_ec_probe(struct udevice *dev)
if (err)
return err;
 
-   node = fdtdec_next_compatible(blob, 0, COMPAT_GOOGLE_CROS_EC_KEYB);
+   node = -1;
+   for (device_find_first_child(dev, _dev);
+keyb_dev;
+device_find_next_child(_dev)) {
+   if (device_get_uclass_id(keyb_dev) == UCLASS_KEYBOARD) {
+   node = keyb_dev->of_offset;
+   break;
+   }
+   }
if (node < 0) {
debug("%s: No cros_ec keyboard found\n", __func__);
} else if (keyscan_read_fdt_matrix(ec, blob, node)) {
diff --git a/include/fdtdec.h b/include/fdtdec.h
index 8ce98a3..1be87cd 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -137,7 +137,6 @@ enum fdt_compat_id {
COMPAT_SAMSUNG_S3C2440_I2C, /* Exynos I2C Controller */
COMPAT_SAMSUNG_EXYNOS5_SOUND,   /* Exynos Sound */
COMPAT_WOLFSON_WM8994_CODEC,/* Wolfson WM8994 Sound Codec */
-   COMPAT_GOOGLE_CROS_EC_KEYB, /* Google CROS_EC Keyboard */
COMPAT_SAMSUNG_EXYNOS_USB_PHY,  /* Exynos phy controller for usb2.0 */
COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller for usb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU,  /* Exynos TMU */
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index b79be59..eb2d508 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -47,7 +47,6 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(SAMSUNG_S3C2440_I2C, "samsung,s3c2440-i2c"),
COMPAT(SAMSUNG_EXYNOS5_SOUND, "samsung,exynos-sound"),
COMPAT(WOLFSON_WM8994_CODEC, "wolfson,wm8994-codec"),
-   COMPAT(GOOGLE_CROS_EC_KEYB, "google,cros-ec-keyb"),
COMPAT(SAMSUNG_EXYNOS_USB_PHY, "samsung,exynos-usb-phy"),
COMPAT(SAMSUNG_EXYNOS5_USB3_PHY, "samsung,exynos5250-usb3-phy"),
COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH v3 4/5] fdt: x86: Tidy up a few COMPAT string definitions

2016-06-19 Thread Simon Glass
The 'COMPAT_' part should appear only once so drop the duplicate part. It is
ignored anyway, but let's keep things consistent.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Add new patch to tidy up a few COMPAT string definitions

 lib/fdtdec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 668acca..b79be59 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -66,9 +66,9 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(ALTERA_SOCFPGA_DWMAC, "altr,socfpga-stmmac"),
COMPAT(ALTERA_SOCFPGA_DWMMC, "altr,socfpga-dw-mshc"),
COMPAT(ALTERA_SOCFPGA_DWC2USB, "snps,dwc2"),
-   COMPAT(COMPAT_INTEL_BAYTRAIL_FSP, "intel,baytrail-fsp"),
-   COMPAT(COMPAT_INTEL_BAYTRAIL_FSP_MDP, "intel,baytrail-fsp-mdp"),
-   COMPAT(COMPAT_INTEL_IVYBRIDGE_FSP, "intel,ivybridge-fsp"),
+   COMPAT(INTEL_BAYTRAIL_FSP, "intel,baytrail-fsp"),
+   COMPAT(INTEL_BAYTRAIL_FSP_MDP, "intel,baytrail-fsp-mdp"),
+   COMPAT(INTEL_IVYBRIDGE_FSP, "intel,ivybridge-fsp"),
 };
 
 const char *fdtdec_get_compatible(enum fdt_compat_id id)
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH v3 2/5] fdt: Drop unused exynos compatible strings

2016-06-19 Thread Simon Glass
A few drivers have moved to driver model, so we can drop these strings.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Add new patch to drop unused exynos compatible strings

 include/fdtdec.h | 3 ---
 lib/fdtdec.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/include/fdtdec.h b/include/fdtdec.h
index ae30b8a..8ce98a3 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -141,12 +141,9 @@ enum fdt_compat_id {
COMPAT_SAMSUNG_EXYNOS_USB_PHY,  /* Exynos phy controller for usb2.0 */
COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller for usb3.0 */
COMPAT_SAMSUNG_EXYNOS_TMU,  /* Exynos TMU */
-   COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
-   COMPAT_SAMSUNG_EXYNOS5_DP,  /* Exynos Display port controller */
COMPAT_SAMSUNG_EXYNOS_DWMMC,/* Exynos DWMMC controller */
COMPAT_SAMSUNG_EXYNOS_MMC,  /* Exynos MMC controller */
-   COMPAT_SAMSUNG_EXYNOS_SERIAL,   /* Exynos UART */
COMPAT_MAXIM_MAX77686_PMIC, /* MAX77686 PMIC */
COMPAT_GENERIC_SPI_FLASH,   /* Generic SPI Flash chip */
COMPAT_MAXIM_98095_CODEC,   /* MAX98095 Codec */
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 2f54d71..59b75f0 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -46,12 +46,9 @@ static const char * const compat_names[COMPAT_COUNT] = {
COMPAT(SAMSUNG_EXYNOS_USB_PHY, "samsung,exynos-usb-phy"),
COMPAT(SAMSUNG_EXYNOS5_USB3_PHY, "samsung,exynos5250-usb3-phy"),
COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
-   COMPAT(SAMSUNG_EXYNOS_FIMD, "samsung,exynos-fimd"),
COMPAT(SAMSUNG_EXYNOS_MIPI_DSI, "samsung,exynos-mipi-dsi"),
-   COMPAT(SAMSUNG_EXYNOS5_DP, "samsung,exynos5-dp"),
COMPAT(SAMSUNG_EXYNOS_DWMMC, "samsung,exynos-dwmmc"),
COMPAT(SAMSUNG_EXYNOS_MMC, "samsung,exynos-mmc"),
-   COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
COMPAT(MAXIM_MAX77686_PMIC, "maxim,max77686"),
COMPAT(GENERIC_SPI_FLASH, "spi-flash"),
COMPAT(MAXIM_98095_CODEC, "maxim,max98095-codec"),
-- 
2.8.0.rc3.226.g39d4020

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


[U-Boot] [PATCH] rtc: Tidy up the code style

2016-06-19 Thread Simon Glass
This code generates lots of checkpatch errors. Fix them.

Signed-off-by: Simon Glass 
---

 drivers/rtc/date.c | 79 +-
 1 file changed, 36 insertions(+), 43 deletions(-)

diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
index 8c643a0..5ab6770 100644
--- a/drivers/rtc/date.c
+++ b/drivers/rtc/date.c
@@ -5,10 +5,6 @@
  * SPDX-License-Identifier:GPL-2.0+
  */
 
-/*
- * Date & Time support for Philips PCF8563 RTC
- */
-
 #include 
 #include 
 #include 
@@ -25,7 +21,11 @@
 #definedays_in_month(a)(month_days[(a) - 1])
 
 static int month_days[12] = {
-   31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
+   31,  28,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31
+};
+
+static int month_offset[] = {
+   0,  31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
 };
 
 /*
@@ -33,48 +33,43 @@ static int month_days[12] = {
  */
 int rtc_calc_weekday(struct rtc_time *tm)
 {
-   int leapsToDate;
+   int leaps_to_date;
int lastYear;
int day;
-   int MonthOffset[] = { 0,31,59,90,120,151,181,212,243,273,304,334 };
 
if (tm->tm_year < 1753)
-   return -EINVAL;
-   lastYear=tm->tm_year-1;
+   return -1;
+   lastYear = tm->tm_year - 1;
 
-   /*
-* Number of leap corrections to apply up to end of last year
-*/
-   leapsToDate = lastYear/4 - lastYear/100 + lastYear/400;
+   /* Number of leap corrections to apply up to end of last year */
+   leaps_to_date = lastYear / 4 - lastYear / 100 + lastYear / 400;
 
/*
 * This year is a leap year if it is divisible by 4 except when it is
 * divisible by 100 unless it is divisible by 400
 *
-* e.g. 1904 was a leap year, 1900 was not, 1996 is, and 2000 will be
+* e.g. 1904 was a leap year,  1900 was not,  1996 is, and 2000 is.
 */
-   if((tm->tm_year%4==0) &&
-  ((tm->tm_year%100!=0) || (tm->tm_year%400==0)) &&
-  (tm->tm_mon>2)) {
-   /*
-* We are past Feb. 29 in a leap year
-*/
-   day=1;
+   if (tm->tm_year % 4 == 0 &&
+   ((tm->tm_year % 100 != 0) || (tm->tm_year % 400 == 0)) &&
+   tm->tm_mon > 2) {
+   /* We are past Feb. 29 in a leap year */
+   day = 1;
} else {
-   day=0;
+   day = 0;
}
 
-   day += lastYear*365 + leapsToDate + MonthOffset[tm->tm_mon-1] + 
tm->tm_mday;
-
-   tm->tm_wday=day%7;
+   day += lastYear * 365 + leaps_to_date + month_offset[tm->tm_mon - 1] +
+   tm->tm_mday;
+   tm->tm_wday = day % 7;
 
return 0;
 }
 
 int rtc_to_tm(int tim, struct rtc_time *tm)
 {
-   register inti;
-   register long   hms, day;
+   register int i;
+   register long hms, day;
 
day = tim / SECDAY;
hms = tim % SECDAY;
@@ -85,22 +80,19 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
tm->tm_sec = (hms % 3600) % 60;
 
/* Number of years in days */
-   for (i = STARTOFTIME; day >= days_in_year(i); i++) {
+   for (i = STARTOFTIME; day >= days_in_year(i); i++)
day -= days_in_year(i);
-   }
tm->tm_year = i;
 
/* Number of months in days left */
-   if (leapyear(tm->tm_year)) {
+   if (leapyear(tm->tm_year))
days_in_month(FEBRUARY) = 29;
-   }
-   for (i = 1; day >= days_in_month(i); i++) {
+   for (i = 1; day >= days_in_month(i); i++)
day -= days_in_month(i);
-   }
days_in_month(FEBRUARY) = 28;
tm->tm_mon = i;
 
-   /* Days are what is left over (+1) from all that. */
+   /* Days are what is left over (+1) from all that */
tm->tm_mday = day + 1;
 
/* Zero unused fields */
@@ -113,30 +105,31 @@ int rtc_to_tm(int tim, struct rtc_time *tm)
return rtc_calc_weekday(tm);
 }
 
-/* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
- * Assumes input in normal date format, i.e. 1980-12-31 23:59:59
- * => year=1980, mon=12, day=31, hour=23, min=59, sec=59.
+/*
+ * Converts Gregorian date to seconds since 1970-01-01 00:00:00.
+ * Assumes input in normal date format,  i.e. 1980-12-31 23:59:59
+ * => year=1980,  mon=12,  day=31,  hour=23,  min=59,  sec=59.
  *
  * [For the Julian calendar (which was used in Russia before 1917,
- * Britain & colonies before 1752, anywhere else before 1582,
+ * Britain & colonies before 1752,  anywhere else before 1582,
  * and is still in use by some communities) leave out the
- * -year/100+year/400 terms, and add 10.]
+ * -year / 100 + year / 400 terms,  and add 10.]
  *
  * This algorithm was first published by Gauss (I think).
  *
  * WARNING: this function will overflow on 2106-02-07 06:28:16 on
- * machines were long is 32-bit! (However, as time_t is signed, we
+ * machines where long is 32-bit! (However, as 

[U-Boot] pull request: u-boot-uniphier/master

2016-06-19 Thread Masahiro Yamada
Hi Tom,

Please pull some more patches for UniPhier SoCs!


The following changes since commit 9ab165d8b05706284de0ee9bd402346c54ae6b15:

  SPL ext: cosmetic: correct error message in spl_load_image_ext()
(2016-06-19 09:57:48 -0400)

are available in the git repository at:

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

for you to fetch changes up to 7c8ef0feb97586d35b0296b48903daef8c06ab21:

  ARM: uniphier: use the default CONFIG_BOOTDELAY=2 (2016-06-20 07:15:39 +0900)


Masahiro Yamada (5):
  ARM: uniphier: change CPU_RELEASE_ADDR to the head of DRAM space
  ARM: uniphier: introduce CONFIG_ARM_UNIPHIER_{32, 64}BIT
  ARM: uniphier: move CONFIG_ARMV8_MULTIENTRY to Kconfig
  ARM: uniphier: reserve memory for DRAM PHY training on PH1-LD20
  ARM: uniphier: use the default CONFIG_BOOTDELAY=2

 arch/arm/Kconfig |  1 +
 arch/arm/mach-uniphier/Kconfig   | 25 ++
 arch/arm/mach-uniphier/dram_init.c   | 40 
 configs/uniphier_ld11_defconfig  |  1 -
 configs/uniphier_ld20_defconfig  |  1 -
 configs/uniphier_ld4_sld8_defconfig  |  1 -
 configs/uniphier_pro4_defconfig  |  1 -
 configs/uniphier_pxs2_ld6b_defconfig |  1 -
 configs/uniphier_sld3_defconfig  |  1 -
 include/configs/uniphier.h   |  3 +--
 10 files changed, 59 insertions(+), 16 deletions(-)


-- 
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/4] ARM: uniphier: some more updates for UniPhier SoCs

2016-06-19 Thread Masahiro Yamada
2016-06-17 19:24 GMT+09:00 Masahiro Yamada :
>
>
>
> Masahiro Yamada (4):
>   ARM: uniphier: introduce CONFIG_ARM_UNIPHIER_{32,64}BIT
>   ARM: uniphier: move CONFIG_ARMV8_MULTIENTRY to Kconfig
>   ARM: uniphier: reserve memory for DRAM PHY training on PH1-LD20
>   ARM: uniphier: use the default CONFIG_BOOTDELAY=2


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] ARM: uniphier: change CPU_RELEASE_ADDR to the head of DRAM space

2016-06-19 Thread Masahiro Yamada
2016-06-15 14:46 GMT+09:00 Masahiro Yamada :
> At first, 256 byte of the head of DRAM space was reserved for some
> reasons.  However, as the progress of development, it turned out
> unnecessary, and it was never used in the end.  Move the CPU release
> address to leave no space.
>
> 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 1/5] ls2080: Exit dpaa only right before exiting U-Boot

2016-06-19 Thread Alexander Graf


On 07.06.16 03:28, Prabhakar Kushwaha wrote:
> Hi Alex,
> 
>> -Original Message-
>> From: Alexander Graf [mailto:ag...@suse.de]
>> Sent: Friday, May 27, 2016 7:58 PM
>> To: Prabhakar Kushwaha ; u-
>> b...@lists.denx.de
>> Cc: york sun 
>> Subject: Re: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before exiting
>> U-Boot
>>
>> On 05/18/2016 02:29 PM, Prabhakar Kushwaha wrote:
 -Original Message-
 From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of
 Alexander Graf
 Sent: Friday, May 13, 2016 5:52 PM
 To: u-boot@lists.denx.de
 Subject: [U-Boot] [PATCH 1/5] ls2080: Exit dpaa only right before
 exiting U- Boot

 On ls2080 we have a separate network fabric component which we need
 to shut down before we enter Linux (or any other OS). Along with that
 also comes configuration of the fabric using a description file.

 Today we always stop and configure the fabric in the boot script and
 (again) exit it on device tree generation. This works ok for the
 normal booti case, but with bootefi the payload we're running may
 still want to access the network.

 So let's add a new fsl_mc command that defers configuration and
 stopping the hardware to when we actually exit U-Boot, so that we can
 still use the fabric from an EFI payload.

 For existing boot scripts, nothing should change with this patch.

 Signed-off-by: Alexander Graf 
>>> With this patch.
>>>
>>> If I does not apply MC,  I am getting following crash:-
>>>
>>> Starting kernel ...
>>>
>>> "Synchronous Abort" handler, esr 0x9644
>>
>> So should we consider it a bug fix or regression then? :)
>>
>>
> 
> Are you planning to fix it?
> 
> If not let me know I will try to  work on it. 

The checks that determine whether we really want to exit ldpaa only work
if the argument to the function is non-NULL.

Can you please check if the patch below fixes it for you?


Alex

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 95037c1..233c94f 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -91,7 +91,7 @@ static void announce_and_cleanup(int fake)
 #endif

 #ifdef CONFIG_FSL_MC_ENET
-   if (!fsl_mc_ldpaa_exit(NULL))
+   if (!fsl_mc_ldpaa_exit(gd->bd))
mc_apply_dpl(0);
 #endif

diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 8d3943f..c1209b0 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -529,7 +529,7 @@ static efi_status_t EFIAPI
efi_exit_boot_services(void *image_handle,
EFI_ENTRY("%p, %ld", image_handle, map_key);

 #ifdef CONFIG_FSL_MC_ENET
-   if (!fsl_mc_ldpaa_exit(NULL))
+   if (!fsl_mc_ldpaa_exit(gd->bd))
mc_apply_dpl(0);
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2 5/5] clk: convert API to match reset/mailbox style

2016-06-19 Thread Simon Glass
On 17 June 2016 at 09:44, Stephen Warren  wrote:
> From: Stephen Warren 
>
> The following changes are made to the clock API:
> * The concept of "clocks" and "peripheral clocks" are unified; each clock
>   provider now implements a single set of clocks. This provides a simpler
>   conceptual interface to clients, and better aligns with device tree
>   clock bindings.
> * Clocks are now identified with a single "struct clk", rather than
>   requiring clients to store the clock provider device and clock identity
>   values separately. For simple clock consumers, this isolates clients
>   from internal details of the clock API.
> * clk.h is split so it only contains the client/consumer API, whereas
>   clk-uclass.h contains the provider API. This aligns with the recently
>   added reset and mailbox APIs.
> * clk_ops .of_xlate(), .request(), and .free() are added so providers
>   can customize these operations if needed. This also aligns with the
>   recently added reset and mailbox APIs.
> * clk_disable() is added.
> * All users of the current clock APIs are updated.
> * Sandbox clock tests are updated to exercise clock lookup via DT, and
>   clock enable/disable.
> * rkclk_get_clk() is removed and replaced with standard APIs.
>
> Buildman shows no clock-related errors for any board for which buildman
> can download a toolchain.
>
> test/py passes for sandbox (which invokes the dm clk test amongst
> others).
>
> Signed-off-by: Stephen Warren 
> Acked-by: Simon Glass 
> ---
> v2:
> * Renamed headers.
> * Added docs to arch/sandbox/include/asm/clk.h.
> * Fixed up a few more call-sites added in parallel to this patch.
> * Fixed a type typo in ehci-generic.c.
> ---
>  arch/arm/include/asm/arch-rockchip/clock.h   |  12 --
>  arch/arm/mach-rockchip/board.c   |  39 -
>  arch/arm/mach-rockchip/rk3288/sdram_rk3288.c |  15 +-
>  arch/arm/mach-snapdragon/clock-apq8016.c |  10 +-
>  arch/arm/mach-zynq/clk.c |   1 -
>  arch/mips/mach-pic32/cpu.c   |  45 +++---
>  arch/sandbox/dts/test.dts|  17 ++-
>  arch/sandbox/include/asm/clk.h   | 111 ++
>  arch/sandbox/include/asm/test.h  |   9 --
>  board/microchip/pic32mzda/pic32mzda.c|  21 ++-
>  drivers/clk/Makefile |   1 +
>  drivers/clk/clk-uclass.c | 202 +---
>  drivers/clk/clk_fixed_rate.c |  13 +-
>  drivers/clk/clk_pic32.c  |  32 ++--
>  drivers/clk/clk_rk3036.c |  83 +++---
>  drivers/clk/clk_rk3288.c | 143 -
>  drivers/clk/clk_sandbox.c|  85 +++
>  drivers/clk/clk_sandbox_test.c   | 101 
>  drivers/clk/exynos/clk-exynos7420.c  |  42 ++---
>  drivers/clk/uniphier/clk-uniphier-core.c |  26 ++--
>  drivers/clk/uniphier/clk-uniphier-mio.c  |   1 -
>  drivers/i2c/rk_i2c.c |   6 +-
>  drivers/mmc/msm_sdhci.c  |  13 +-
>  drivers/mmc/rockchip_dw_mmc.c|   6 +-
>  drivers/mmc/uniphier-sd.c|  15 +-
>  drivers/serial/serial_msm.c  |  13 +-
>  drivers/serial/serial_pic32.c|   7 +-
>  drivers/serial/serial_s5p.c  |   6 +-
>  drivers/spi/rk_spi.c |   6 +-
>  drivers/usb/host/ehci-generic.c  |  14 +-
>  drivers/video/rockchip/rk_edp.c  |  11 +-
>  drivers/video/rockchip/rk_hdmi.c |  12 +-
>  drivers/video/rockchip/rk_lvds.c |   1 -
>  drivers/video/rockchip/rk_vop.c  |  11 +-
>  include/clk-uclass.h |  95 
>  include/clk.h| 220 
> ---
>  test/dm/clk.c| 110 ++
>  37 files changed, 985 insertions(+), 570 deletions(-)
>  create mode 100644 arch/sandbox/include/asm/clk.h
>  create mode 100644 drivers/clk/clk_sandbox_test.c
>  create mode 100644 include/clk-uclass.h

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


Re: [U-Boot] [PATCH V2 3/5] Add a reset driver framework/uclass

2016-06-19 Thread Simon Glass
On 17 June 2016 at 09:43, Stephen Warren  wrote:
> From: Stephen Warren 
>
> A reset controller is a hardware module that controls reset signals that
> affect other hardware modules or chips.
>
> This patch defines a standard API that connects reset clients (i.e. the
> drivers for devices affected by reset signals) to drivers for reset
> controllers/providers. Initially, DT is the only supported method for
> connecting the two.
>
> The DT binding specification (reset.txt) was taken from Linux kernel
> v4.5's Documentation/devicetree/bindings/reset/reset.txt.
>
> Signed-off-by: Stephen Warren 
> Acked-by: Simon Glass 
> ---
> v2: Renamed header files.
> ---
>  doc/device-tree-bindings/reset/reset.txt |  75 +
>  drivers/Kconfig  |   2 +
>  drivers/Makefile |   1 +
>  drivers/reset/Kconfig|  15 
>  drivers/reset/Makefile   |   5 ++
>  drivers/reset/reset-uclass.c | 131 ++
>  include/dm/uclass-id.h   |   1 +
>  include/reset-uclass.h   |  81 +++
>  include/reset.h  | 135 
> +++
>  9 files changed, 446 insertions(+)
>  create mode 100644 doc/device-tree-bindings/reset/reset.txt
>  create mode 100644 drivers/reset/Kconfig
>  create mode 100644 drivers/reset/Makefile
>  create mode 100644 drivers/reset/reset-uclass.c
>  create mode 100644 include/reset-uclass.h
>  create mode 100644 include/reset.h

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


Re: [U-Boot] [PATCH V2 4/5] reset: implement a reset test

2016-06-19 Thread Simon Glass
On 17 June 2016 at 09:43, Stephen Warren  wrote:
> From: Stephen Warren 
>
> This adds a sandbox reset implementation (provider), a test client
> device, instantiates them both from Sandbox's DT, and adds a DM test
> that excercises everything.
>
> Signed-off-by: Stephen Warren 
> Acked-by: Simon Glass 
> ---
> v2: Renamed header files.
> ---
>  arch/sandbox/dts/test.dts  |  11 
>  arch/sandbox/include/asm/reset.h   |  21 
>  configs/sandbox_defconfig  |   2 +
>  drivers/reset/Kconfig  |   8 +++
>  drivers/reset/Makefile |   2 +
>  drivers/reset/sandbox-reset-test.c |  55 +++
>  drivers/reset/sandbox-reset.c  | 108 
> +
>  test/dm/Makefile   |   1 +
>  test/dm/reset.c|  39 ++
>  9 files changed, 247 insertions(+)
>  create mode 100644 arch/sandbox/include/asm/reset.h
>  create mode 100644 drivers/reset/sandbox-reset-test.c
>  create mode 100644 drivers/reset/sandbox-reset.c
>  create mode 100644 test/dm/reset.c

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


Re: [U-Boot] [PATCH V2 1/5] mailbox: rename headers

2016-06-19 Thread Simon Glass
On 17 June 2016 at 17:04, Simon Glass  wrote:
> On 17 June 2016 at 09:43, Stephen Warren  wrote:
>> From: Stephen Warren 
>>
>> Rename mailbox*.h to match the naming convention requested during review
>> of the new reset subsystem.
>>
>> Signed-off-by: Stephen Warren 
>> ---
>> v2: New patch.
>> ---
>>  drivers/mailbox/mailbox-uclass.c   | 4 ++--
>>  drivers/mailbox/sandbox-mbox-test.c| 2 +-
>>  drivers/mailbox/sandbox-mbox.c | 2 +-
>>  include/{mailbox_uclass.h => mailbox-uclass.h} | 4 ++--
>>  include/{mailbox_client.h => mailbox.h}| 6 +++---
>>  5 files changed, 9 insertions(+), 9 deletions(-)
>>  rename include/{mailbox_uclass.h => mailbox-uclass.h} (96%)
>>  rename include/{mailbox_client.h => mailbox.h} (98%)
>
> Acked-by: Simon Glass 

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


Re: [U-Boot] [PATCH V2 2/5] mailbox: add Tegra186 HSP driver

2016-06-19 Thread Simon Glass
On 17 June 2016 at 17:04, Simon Glass  wrote:
> +Tom
>
> On 17 June 2016 at 09:43, Stephen Warren  wrote:
>> From: Stephen Warren 
>>
>> Tegra186's HSP module implements doorbells, mailboxes, semaphores, and
>> shared interrupts. This patch provides a driver for HSP, and hooks it
>> into the mailbox API. Currently, only doorbells are supported.
>>
>> Signed-off-by: Stephen Warren 
>> Reviewed-by: Simon Glass 
>> ---
>> v2: Adapt to header rename.
>> ---
>>  arch/arm/dts/tegra186.dtsi  |  13 +++
>>  arch/arm/mach-tegra/Kconfig |   2 +
>>  drivers/mailbox/Kconfig |   7 ++
>>  drivers/mailbox/Makefile|   1 +
>>  drivers/mailbox/tegra-hsp.c | 163 
>> 
>>  include/dt-bindings/mailbox/tegra-hsp.h |  14 +++
>>  6 files changed, 200 insertions(+)
>>  create mode 100644 drivers/mailbox/tegra-hsp.c
>>  create mode 100644 include/dt-bindings/mailbox/tegra-hsp.h
>
> Acked-by: Simon Glass 
>
> I'll pick this up since it is part of the series. I assume Tom has no
> objections.
>
> - Simon

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


[U-Boot] [PATCH] dragonboard410c: Increase default environment size.

2016-06-19 Thread Mateusz Kulikowski
Due to changes in distro environment, ENV_SIZE limit was reached on Dragonboard.
This patch increases environment size to 8KiB.

Signed-off-by: Mateusz Kulikowski 

---
Hi all,

I'm back after a short break (sorry for that).

This patch fixes environment for dragonboard - it grew during
my absence beyond limit (0x1000). This caused rather nasty isuses:


U-Boot 2016.07-rc1-00222-g9ab165d (Jun 19 2016 - 22:59:30 +0200)
[...]
*** Error - default environment is too large
[...]
dragonboard410c => print

Environment size: 1/4092 bytes


There are still 2 issues pending for dragonboard:
- BOOTDELAY migration - I have to catch up with all the mails, but I
assume this will be fixed "globally"
- non-working MMC - will investigate that, and post patch in next days.

Of course patch was target tested.

Thanks,
Mateusz

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

diff --git a/include/configs/dragonboard410c.h 
b/include/configs/dragonboard410c.h
index d32889d..4b00922 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -129,7 +129,7 @@ REFLASH(dragonboard/u-boot.img, 8)\
BOOTENV
 
 #define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_SIZE0x1000
+#define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_VARS_UBOOT_CONFIG
 #define CONFIG_SYS_NO_FLASH
 
-- 
2.7.4

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


Re: [U-Boot] [U-Boot, v6, 2/2] armv8: s32v234: Introduce basic support for s32v234evb

2016-06-19 Thread Eddy Petrișor
Pe 19 iun. 2016 4:09 p.m., "Tom Rini"  a scris:
>
> On Sun, Jun 05, 2016 at 03:43:00AM +0300, Eddy Petrisor wrote:
>
> > From: Eddy Petrișor 
> >
> > Add initial support for NXP's S32V234 SoC and S32V234EVB board.
> >

> Applied to u-boot/master, thanks!

Will follow up with more patches for S32V234 after we align our vendor
branch with the merged changes.

Thanks.

> --
> Tom

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


Re: [U-Boot] [U-Boot, v6, 1/2] serial: Introduce linflex uart support

2016-06-19 Thread Eddy Petrișor
Pe 19 iun. 2016 4:09 p.m., "Tom Rini"  a scris:
>
> On Sun, Jun 05, 2016 at 03:42:59AM +0300, Eddy Petrisor wrote:
>
> > From: Stoica Cosmin-Stefan 
> >
> > The Linflex module is integrated on some NXP automotive SoCs part of
the former
> > Signed-off-by: Eddy Petrișor 
>
> Applied to u-boot/master, thanks!

Thanks, Tom.

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


[U-Boot] [PATCH 1/3] ARM: configs: cm_fx6: improve default environment

2016-06-19 Thread Christopher Spinrath
Currently, entire script segments have to be changed in the default
environment to change the kernel image location or to append kernel
cmdline parameters. In the later case this has to be changed for
every possible boot device.

Introduce new variables for kernel image locations and boot device
independent kernel parameters to make it easier to change these
settings.

Signed-off-by: Christopher Spinrath 
---
 include/configs/cm_fx6.h | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 1f20ec3..f054ca8 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -69,6 +69,8 @@
"stderr=serial,vga\0" \
"panel=HDMI\0" \
"autoload=no\0" \
+   "uImage=uImage-cm-fx6\0" \
+   "zImage=zImage-cm-fx6\0" \
"kernel=uImage-cm-fx6\0" \
"script=boot.scr\0" \
"dtb=cm-fx6.dtb\0" \
@@ -81,10 +83,10 @@
"video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
"doboot=bootm ${loadaddr}\0" \
"doloadfdt=false\0" \
-   "setboottypez=setenv kernel zImage-cm-fx6;" \
+   "setboottypez=setenv kernel ${zImage};" \
"setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
"setenv doloadfdt true;\0" \
-   "setboottypem=setenv kernel uImage-cm-fx6;" \
+   "setboottypem=setenv kernel ${uImage};" \
"setenv doboot bootm ${loadaddr};" \
"setenv doloadfdt false;\0"\
"mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
@@ -92,13 +94,13 @@
"nandroot=/dev/mtdblock4 rw\0" \
"nandrootfstype=ubifs\0" \
"mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
-   "${video}\0" \
+   "${video} ${extrabootargs}\0" \
"sataargs=setenv bootargs console=${console} root=${sataroot} " \
-   "${video}\0" \
+   "${video} ${extrabootargs}\0" \
"nandargs=setenv bootargs console=${console} " \
"root=${nandroot} " \
"rootfstype=${nandrootfstype} " \
-   "${video}\0" \
+   "${video} ${extrabootargs}\0" \
"nandboot=if run nandloadkernel; then " \
"run nandloadfdt;" \
"run setboottypem;" \
-- 
2.8.3

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


[U-Boot] [PATCH 0/3] ARM: imx: enhance support for the cm-fx6 module

2016-06-19 Thread Christopher Spinrath
Hi,

this series aims at enhancing support for the cm-fx6 module. In
particular, with respect to the upstream linux kernel.

The first patch improves the default environment. It is non-functional
but makes it more convenient to adapt certain settings.

The later two patches add mtd partition support for the on-board spi
flash chip. They pick up the discussion about specifying a default
partitioning in the device tree from here [1]. In short: adding the
default partitioning to the device tree was rejected by the linux/
device tree community during mainlining large parts of the device tree.
It was proposed to implement the partition/mtd handling in u-boot.
On the other hand, it was argued that the flash chip becomes some
kind of "black-box" since there will be no partition labeling (in
particular, with old u-boot versions).

IMHO defining the mtd partitioning has the following (dis-)advantages:

Advantages:
- It is easier for the user to change the partitioning (e.g. to use
  the unsued 1MB free space).

- The flash ship is used entirely for u-boot. So it is quite natural
  that u-boot manages it. Also, moving the partition table to it
  allows us to change the layout in future versions of u-boot (almost
  independently of the kernel - there are still non-device tree kernels).

- U-Boot becomes the single point of definition for all device tree
  kernels. Otherwise, each kernel (vendor vs. upstream + version)
  would ship its own partitioning. Moreover, u-boot has to know
  something about the partitioning, too, because it has to know where
  the environment is saved.

Disadvantages:
- Users of the upstream linux kernel have to use a recent u-boot
  version to avoid the "black box" effect. A concrete impact is
  that the update routine (described/proposed by CompuLab) does
  not work out of the box with older u-boot versions.

- Updating u-boot is something users might not want or miss to do.

However, I think nowadays it is ok to demand a recent u-boot in
combination with the upstream kernel. The cm-fx6 wouldn't be
the first board doing so. Hence, I propose these patches here.

Cheers,
Christopher

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/434562.html

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


[U-Boot] [PATCH 3/3] ARM: configs: cm_fx6: add mtd support

2016-06-19 Thread Christopher Spinrath
The cm-fx6 module has an on-board spi flash chip. Enable mtd support
and the mtdparts command. Also define a default partitioning, add
it to the default environment, and enable support to overwrite the
partitioning defined in a device tree by it.

These changes move the effective default partitioning from the device
tree shipped with the vendor kernels to u-boot which becomes the single
point of definition for the partitioning for all device tree based
kernels (in particular, for the upstream linux kernel which does not
have a default partitioning defined in its device tree).

Signed-off-by: Christopher Spinrath 
---
 include/configs/cm_fx6.h | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index f054ca8..c839b03 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -18,6 +18,7 @@
 #define CONFIG_MACH_TYPE   4273
 
 /* CMD */
+#define CONFIG_CMD_MTDPARTS
 
 /* MMC */
 #define CONFIG_SYS_FSL_USDHC_NUM   3
@@ -53,6 +54,20 @@
 #define CONFIG_SF_DEFAULT_SPEED2500
 #define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
 
+/* MTD support */
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_FDT_FIXUP_PARTITIONS
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_SPI_FLASH_MTD
+#endif
+
+#define MTDIDS_DEFAULT "nor0=spi0.0"
+#define MTDPARTS_DEFAULT   "mtdparts=spi0.0:" \
+   "768k(uboot)," \
+   "256k(uboot-environment)," \
+   "-(reserved)"
+
 /* Environment */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SPI_MAX_HZ  CONFIG_SF_DEFAULT_SPEED
@@ -83,6 +98,8 @@
"video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
"doboot=bootm ${loadaddr}\0" \
"doloadfdt=false\0" \
+   "mtdids=" MTDIDS_DEFAULT "\0" \
+   "mtdparts=" MTDPARTS_DEFAULT "\0" \
"setboottypez=setenv kernel ${zImage};" \
"setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
"setenv doloadfdt true;\0" \
@@ -157,7 +174,7 @@
"run setupnandboot;" \
"run nandboot;"
 
-#define CONFIG_PREBOOT "usb start"
+#define CONFIG_PREBOOT "usb start;sf probe"
 
 /* SPI */
 #define CONFIG_SPI
-- 
2.8.3

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


[U-Boot] [PATCH 2/3] ARM: board: cm_fx6: fixup mtd partitions in the fdt

2016-06-19 Thread Christopher Spinrath
The cm-fx6 module has an on-board st,m25p compatible spi flash chip
used for u-boot (binary & environment). Overwrite the partitions in
the device tree by the partition table provided in the mtdparts
environment variable, if it is set.

This allows to specify a kernel independent partitioning in the
environment and provides a convient way for the user to adapt the
partition table.

Signed-off-by: Christopher Spinrath 
---
 board/compulab/cm_fx6/cm_fx6.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 712057a..81a7ae2 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -28,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "common.h"
 #include "../common/eeprom.h"
 #include "../common/common.h"
@@ -581,6 +583,13 @@ int cm_fx6_setup_ecspi(void) { return 0; }
 
 #ifdef CONFIG_OF_BOARD_SETUP
 #define USDHC3_PATH"/soc/aips-bus@0210/usdhc@02198000/"
+
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+struct node_info nodes[] = {
+   { "st,m25p",MTD_DEV_TYPE_NOR,   },
+};
+#endif
+
 int ft_board_setup(void *blob, bd_t *bd)
 {
u32 baseboard_rev;
@@ -589,6 +598,8 @@ int ft_board_setup(void *blob, bd_t *bd)
char baseboard_name[16];
int err;
 
+   fdt_shrink_to_minimum(blob); /* Make room for new properties */
+
/* MAC addr */
if (eth_getenv_enetaddr("ethaddr", enetaddr)) {
fdt_find_and_setprop(blob,
@@ -607,7 +618,6 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0; /* Assume not an early revision SB-FX6m baseboard */
 
if (!strncmp("SB-FX6m", baseboard_name, 7) && baseboard_rev <= 120) {
-   fdt_shrink_to_minimum(blob); /* Make room for new properties */
nodeoffset = fdt_path_offset(blob, USDHC3_PATH);
fdt_delprop(blob, nodeoffset, "cd-gpios");
fdt_find_and_setprop(blob, USDHC3_PATH, "broken-cd",
@@ -616,6 +626,10 @@ int ft_board_setup(void *blob, bd_t *bd)
 NULL, 0, 1);
}
 
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+   fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
+
return 0;
 }
 #endif
-- 
2.8.3

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


Re: [U-Boot] [PATCH] test/py: fix printenv signon message disable code

2016-06-19 Thread Tom Rini
On Thu, Jun 16, 2016 at 12:59:34PM -0600, Stephen Warren wrote:

> From: Stephen Warren 
> 
> CONFIG_VERSION_VARIABLE isn't always defined, so we can't simply look up
> its value directly, or an exception will occur if it isn't defined.
> Instead, we must use .get() to supply a default value if the variable
> isn't defined.
> 
> Fixes: da37f006e7c5 ("tests: py: disable main_signon check for printenv cmd")
> Acked-by: Heiko Schocher 
> Signed-off-by: Stephen Warren 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-usb/master

2016-06-19 Thread Tom Rini
On Sat, Jun 18, 2016 at 02:42:45AM +0200, Marek Vasut wrote:

> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git master
> 
> for you to fetch changes up to 1e6fb0e367564d427d7c57fa7b3b972ecb7147a3:
> 
>   usb: ehci: only shutdown opened controller (2016-06-18 00:49:00 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2] SPL ext: cosmetic: correct error message in spl_load_image_ext()

2016-06-19 Thread Tom Rini
On Sat, Jun 18, 2016 at 12:21:17PM +0200, Petr Kulhavy wrote:

> Correct the error message in spl_load_image_ext() when image parsing
> fails. Instead of "ext4fs_read failed" print "failed to parse image
> header".
> 
> Signed-off-by: Petr Kulhavy 
> CC: Guillaume GARDET 
> CC: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-socfpga/master

2016-06-19 Thread Tom Rini
On Sat, Jun 18, 2016 at 02:43:59AM +0200, Marek Vasut wrote:

> The following changes since commit b104b3dc1dd90cdbf67ccf3c51b06e4f1592fe91:
> 
>   Prepare v2016.07-rc1 (2016-06-06 17:43:54 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-socfpga.git master
> 
> for you to fetch changes up to cf0a8dab8ee8c1eafbcd9ed081f5cab15e5a58a5:
> 
>   ARM: socfpga: Sort Kconfig entries (2016-06-08 02:57:06 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] Please pull u-boot-imx

2016-06-19 Thread Tom Rini
On Sat, Jun 18, 2016 at 11:14:48AM +0200, Stefano Babic wrote:

> Hi Tom,
> 
> please pull from u-boot-imx (master), thanks!
> 
> For i.MX contributors: I set a -next branch and I have applied what it
> is already ready to be merged. I will go on applying on -next until release.
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-imx.git master
> 
> for you to fetch changes up to 67ef2c133f099d3d719058eb73aeec8f1574655c:
> 
>   warp7: Fix DFU support (2016-06-18 10:37:22 +0200)
> 

On top of the last PR (sorry), applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] fs: cbfs: Fix build of fs/cbfs/cbfs.c when building u-boot sandbox on x86 32-bit

2016-06-19 Thread Tom Rini
On Fri, Jun 17, 2016 at 11:45:37AM +0200, Guillaume GARDET wrote:

> Fix the following build errors when building sandbox on x86 32-bit:
> 
>   In file included from fs/cbfs/cbfs.c:8:0:
>   include/malloc.h:364:7: error: conflicting types for 'memset'
>   void* memset(void*, int, size_t);
>   ^
>   In file included from include/compiler.h:123:0,
>   from include/cbfs.h:10,
>   from fs/cbfs/cbfs.c:7:
>   include/linux/string.h:78:15: note: previous declaration of 'memset' 
> was here
>   extern void * memset(void *,int,__kernel_size_t);
>   ^
>   In file included from fs/cbfs/cbfs.c:8:0:
>   include/malloc.h:365:7: error: conflicting types for 'memcpy'
>   void* memcpy(void*, const void*, size_t);
>   ^
>   In file included from include/compiler.h:123:0,
>   from include/cbfs.h:10,
>   from fs/cbfs/cbfs.c:7:
>   include/linux/string.h:81:15: note: previous declaration of 'memcpy' 
> was here
>   extern void * memcpy(void *,const void *,__kernel_size_t);
>   ^
>   scripts/Makefile.build:280: recipe for target 'fs/cbfs/cbfs.o' failed
> 
> 
> Signed-off-by: Guillaume GARDET 
> Cc: Tom Rini 
> Reviewed-by: Simon Glass 
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Orphan dbau1x00 boards

2016-06-19 Thread Tom Rini
On Tue, Jun 14, 2016 at 11:04:37AM +0200, Thomas Lange wrote:

> I no longer have access to such a board
> 
> Signed-off-by: Thomas Lange 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] common: image-fit: Cleanup spelling mistakes

2016-06-19 Thread Tom Rini
On Wed, Jun 15, 2016 at 05:00:19PM -0500, Andreas Dannenberg wrote:

> The comments in the source file are riddled with spelling mistakes. Be
> a good citizen and take a stab at cleaning up some of the more obvious
> ones.
> 
> Signed-off-by: Andreas Dannenberg 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v3] ARM: AM437x: Enable FIT for hs platforms

2016-06-19 Thread Tom Rini
On Thu, Jun 16, 2016 at 03:42:32PM -0400, Srinivas, Madan wrote:

> Adds FIT support to the SPL and u-boot for AM437x HS devices.
> 
> Signed-off-by: Madan Srinivas 
> Reviewed-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2] ARM: AM437x: Sync defconfig between GP and HS EVM

2016-06-19 Thread Tom Rini
On Thu, Jun 16, 2016 at 03:42:31PM -0400, Srinivas, Madan wrote:

> Adds missing NAND option to CONFIG_SYS_EXTRA_OPTIONS for
> AM437x HS EVMs. This syncs up the config options between
> GP and HS EVMs.
> 
> Signed-off-by: Madan Srinivas 
> Reviewed-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v1] OMAP3: fix twister board

2016-06-19 Thread Tom Rini
On Tue, Jun 14, 2016 at 09:13:37AM +0200, Stefano Babic wrote:

> twister board was not updated after changing
> SPL defines, resulting in a broken board.
> 
> Signed-off-by: Stefano Babic 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] SPL: ext: remove redundant ifdef statement

2016-06-19 Thread Tom Rini
On Tue, Jun 14, 2016 at 12:06:36PM +0200, Petr Kulhavy wrote:

> Remove redundant #if defined(CONFIG_SPL_OS_BOOT) statement around
> getenv() calls in spl_load_image_ext_os().
> 
> The whole function is surrounded by #ifdef CONFIG_SPL_OS_BOOT.
> 
> No functional change.
> 
> Signed-off-by: Petr Kulhavy 
> CC: Guillaume GARDET 
> Acked-by:  Guillaume GARDET 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 1/2] arm, am335x: siemens: update etamin defconfig

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 03:16:00PM +0200, Heiko Schocher wrote:

> add missing USB_MUSB_* and CONFIG_G_DNL_*
> board configuration.
> 
> Signed-off-by: Heiko Schocher 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v1] OMAP3: fix twister board

2016-06-19 Thread Tom Rini
On Tue, Jun 14, 2016 at 09:13:37AM +0200, Stefano Babic wrote:

> twister board was not updated after changing
> SPL defines, resulting in a broken board.
> 
> Signed-off-by: Stefano Babic 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 2/2] arm, am335x: siemens: enable DM/DTS support

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 03:16:01PM +0200, Heiko Schocher wrote:

> enable basic DM/DTS support for the siemens am335x based boards.
> 
> Signed-off-by: Heiko Schocher 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ARM: AM57xx: Enable FIT for HS Devices

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 06:25:16PM -0500, Andreas Dannenberg wrote:

> Enable FIT support for AM57xx platforms using the high-security (HS)
> device variant.
> 
> Signed-off-by: Andreas Dannenberg 
> Reviewed-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm: Fix setjmp

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 02:01:07PM +0200, Alexander Graf wrote:

> The setjmp/longjmp implementation did not work on thumb1 implementations
> because it used instruction encodings that don't exist on thumb1 yet.
> 
> This patch limits itself to thumb1 instruction set for 32bit arm and
> removes a superfluous printf along the way.
> 
> Signed-off-by: Alexander Graf 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-06-19 Thread Tom Rini
On Tue, Jun 14, 2016 at 12:51:48PM +0200, Heiko Schocher wrote:

> Hello Tom,
> 
> please pull from u-boot-ubi.git master
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-ubi.git master
> 
> for you to fetch changes up to 1cb075c6c6ce1a46c3423e63013686e74457275c:
> 
>   splash_source: add support for ubifs formatted nand (2016-06-14 05:33:02 
> +0200)
> 

Also applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] board: am437x-hs: spl: Select right dtb from fit

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 10:44:47AM +0530, Lokesh Vutla wrote:

> Select a right dtb from FIT for am437x-hs platform.
> 
> Reported-by: Madan Srinivas 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 09:05:16AM +0200, Heiko Schocher wrote:

> Hello Tom,
> 
> please pull from u-boot-ubi.git master
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-ubi.git master
> 
> for you to fetch changes up to c1f51e0f3edca57273ff524714b69345ce627996:
> 
>   common: env_ubi: Clear environment buffer before reading (2016-06-13 
> 06:41:20 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,4/5] ARM: dts: AM572x-IDK Initial Support

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:35:45AM +0530, Lokesh Vutla wrote:

> From: Schuyler Patton 
> 
> Add initial DTS support for AM572-IDK evm.
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Schuyler Patton 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,3/5] ARM: AM57xx: Enable FIT

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:35:44AM +0530, Lokesh Vutla wrote:

> Enable FIT support for AM57xx platforms
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 5/5] ti_omap5_common: Add right dtb file for AM572x-IDK

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:35:46AM +0530, Lokesh Vutla wrote:

> Add proper dtb file name for AM572x-IDK in env.
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 1/2] serial: Introduce linflex uart support

2016-06-19 Thread Tom Rini
On Sun, Jun 05, 2016 at 03:42:59AM +0300, Eddy Petrisor wrote:

> From: Stoica Cosmin-Stefan 
> 
> The Linflex module is integrated on some NXP automotive SoCs part of the 
> former
> Freescale portfolio, like S32V234, an SoC for Advanced Driver Assistance
> Systems.
> 
> Original-signed-off-by: Stoica Cosmin-Stefan 
> 
> Original-signed-off-by: Chircu Bogdan 
> Original-signed-off-by: Depons Eric 
> Original-signed-off-by: Eddy Petrișor 
> 
> Signed-off-by: Eddy Petrișor 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 2/5] board: am57xx: fit: add support for selecting dtb dynamically

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:35:43AM +0530, Lokesh Vutla wrote:

> FIT allows for a multiple dtb in a single image. SPL needs away to
> detect the right dtb to be used. Adding support for the same for am57xx
> platforms.
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2] Kconfig: Add a new DISTRO_DEFAULTS Kconfig option

2016-06-19 Thread Tom Rini
On Sun, Jun 12, 2016 at 11:36:34AM +0200, Hans de Goede wrote:

> DISTRO_DEFAULTS is intended to mirror / replace
> include/config_distro_defaults.h.
> 
> The intend is for boards which include this file to select this from
> their Kconfig files and when moving setting to Kconfig which are #define-ed
> in config_distro_defaults.h to select this from DISTRO_DEFAULTS so that
> boards which have selected DISTRO_DEFAULTS will keep the same configuration
> as before without needing any defconfig file changes.
> 
> The initial list of selected things matches all settings recently removed
> from config_distro_defaults.h because they have been converted to Kconfig,
> with the exception of CMD_ELF and CMD_NET, which have a default of y, if
> the default of these ever changes they should be selected by DISTRO_DEFAULTS
> too.
> 
> For testing and example purposes this commit also converts ARCH_SUNXI
> to use DISTRO_DEFAULT instead of selecting everything it needs itself.
> 
> Signed-off-by: Hans de Goede 

After dropping the BOOTDELAY change (default is now 2), applied to
u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] board: arm:: Add support for Broadcom BCM23550

2016-06-19 Thread Tom Rini
On Thu, Jun 02, 2016 at 03:10:56PM -0700, Steve Rae wrote:

> Add support for the Broadcom BCM23550 board.
> 
> Signed-off-by: Steve Rae 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 1/5] board: am57xx: Rename TARGET_BEAGLE_X15 as TARGET_AM57XX_EVM

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:35:42AM +0530, Lokesh Vutla wrote:

> board/am57xx supports all boards based on am57xx. Rename the taget
> as TARGET_AM57XX_EVM.
> 
> Fixes: 74cc8b097d9af ("board: ti: beagle_x15: Rename to indicate support for 
> TI am57xx evms")
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 2/2] armv8: s32v234: Introduce basic support for s32v234evb

2016-06-19 Thread Tom Rini
On Sun, Jun 05, 2016 at 03:43:00AM +0300, Eddy Petrisor wrote:

> From: Eddy Petrișor 
> 
> Add initial support for NXP's S32V234 SoC and S32V234EVB board.
> 
> The S32V230 family is designed to support computation-intensive applications
> for image processing. The S32V234, as part of the S32V230 family, is a
> high-performance automotive processor designed to support safe
> computation-intensive applications in the area of vision and sensor fusion.
> 
> Code originally writen by:
> Original-signed-off-by: Stoica Cosmin-Stefan 
> 
> Original-signed-off-by: Mihaela Martinas 
> Original-signed-off-by: Eddy Petrișor 
> 
> Signed-off-by: Eddy Petrișor 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 4/5] autoboot: fix a bunch of misconversion of CONFIG_BOOTDELAY

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 10:17:20AM +0200, Maxime Ripard wrote:
> Hi,
> 
> On Sat, Jun 11, 2016 at 01:31:29PM +0200, Hans de Goede wrote:
> > Hi,
> > 
> > On 11-06-16 11:44, Masahiro Yamada wrote:
> > >Commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY into
> > >a Kconfig option") made a number of misconversion.
> > >
> > >[1] CONFIG_BOOTDELAY=-1 all gone
> > >[2] CONFIG_BOOTDELAY=1 all gone
> > >[3] CONFIG_BOOTDELAY=2 all gone
> > >[4] Conditionally defined CONFIG_BOOTDELAY all gone
> > >
> > >All of the misconverted boards now use the default value,
> > >CONFIG_BOOTDELAY=0, which came from the Kconfig entry.
> > >
> > >I am imagining some reasons for this.
> > >
> > >For [1], due to the bug of tools/scripts/define2mk.sed (now fixed),
> > >  #define CONFIG_BOOTDELAY -1
> > >was converted to
> > >  CONFIG_BOOTDELAY="-1"
> > >in the include/autoconf.mk, so the tools/moveconfig.py regarded it
> > >as a string type option, and failed to move it.
> > >
> > >For [2], as you see in the comment block in the define2mk.sed,
> > >  #define CONFIG_BOOTDELAY 1
> > >is converted to
> > >  CONFIG_BOOTDELAY=y
> > >in the include/autoconf.mk.  This needs a special care because we do
> > >not know whether we are moving a bool option with value y or an
> > >integer option with value 1.  A recently-sent patch fixes this issue.
> > >
> > >I do not understand the reason for [3].
> > >
> > >[4] is another case the current moveconfig cannot handle correctly.
> > >If the define is surrounded by #ifndef CONFIG_BOOTDELAY like follows,
> > >the default value from Kconfig entry beats the define in C header.
> > >
> > >  #ifndef CONFIG_BOOTDELAY
> > >  #define CONFIG_BOOTDELAY  3
> > >  #endif
> > >
> > >Joe's patch can solve this issue.
> > >
> > >Anyway, I ran the newest moveconfig tool based on commit 3191d8408053
> > >(=immediately prior to the bad commit) to generate this patch.
> > >
> > >Signed-off-by: Masahiro Yamada 
> > >---
> > >
> > >Changes in v2:
> > >  - Fix case [4]
> > >
> > > configs/A10-OLinuXino-Lime_defconfig  | 1 +
> > > configs/A10s-OLinuXino-M_defconfig| 1 +
> > > configs/A13-OLinuXinoM_defconfig  | 1 +
> > > configs/A13-OLinuXino_defconfig   | 1 +
> > > configs/A20-OLinuXino-Lime2_defconfig | 1 +
> > > configs/A20-OLinuXino-Lime_defconfig  | 1 +
> > > configs/A20-OLinuXino_MICRO_defconfig | 1 +
> > > configs/A20-Olimex-SOM-EVB_defconfig  | 1 +
> > > configs/Ainol_AW1_defconfig   | 1 +
> > > configs/Ampe_A76_defconfig| 1 +
> > > configs/Auxtek-T003_defconfig | 1 +
> > > configs/Auxtek-T004_defconfig | 1 +
> > > configs/Bananapi_defconfig| 1 +
> > > configs/Bananapro_defconfig   | 1 +
> > > configs/C29XPCIE_NAND_defconfig   | 1 +
> > > configs/C29XPCIE_NOR_SECBOOT_defconfig| 1 +
> > > configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig   | 1 +
> > > configs/C29XPCIE_SPIFLASH_defconfig   | 1 +
> > > configs/C29XPCIE_defconfig| 1 +
> > > configs/CHIP_defconfig| 1 +
> > > configs/CSQ_CS908_defconfig   | 1 +
> > > configs/Chuwi_V7_CW0825_defconfig | 1 +
> > > configs/Colombus_defconfig| 1 +
> > > configs/Cubieboard2_defconfig | 1 +
> > > configs/Cubieboard_defconfig  | 1 +
> > > configs/Cubietruck_defconfig  | 1 +
> > > configs/Cubietruck_plus_defconfig | 1 +
> > > configs/Empire_electronix_d709_defconfig  | 1 +
> > > configs/Hummingbird_A31_defconfig | 1 +
> > > configs/Hyundai_A7HD_defconfig| 1 +
> > > configs/Itead_Ibox_A20_defconfig  | 1 +
> > > configs/Lamobo_R1_defconfig   | 1 +
> > > configs/Linksprite_pcDuino3_Nano_defconfig| 1 +
> > > configs/Linksprite_pcDuino3_defconfig | 1 +
> > > configs/Linksprite_pcDuino_defconfig  | 1 +
> > > configs/M5208EVBE_defconfig   | 1 +
> > > configs/M5235EVB_Flash32_defconfig| 1 +
> > > configs/M5235EVB_defconfig| 1 +
> > > configs/M53017EVB_defconfig   | 1 +
> > > configs/M5329AFEE_defconfig   | 1 +
> > > configs/M5329BFEE_defconfig   | 1 +
> > > configs/M5373EVB_defconfig| 1 +
> > > configs/M54418TWR_defconfig   | 1 +
> > > configs/M54418TWR_nand_mii_defconfig  | 1 +
> > > configs/M54418TWR_nand_rmii_defconfig | 1 +
> > > configs/M54418TWR_nand_rmii_lowfreq_defconfig | 1 +
> > > configs/M54418TWR_serial_mii_defconfig| 1 +
> > > configs/M54418TWR_serial_rmii_defconfig   | 1 +
> > > configs/M54451EVB_defconfig   | 1 +
> > > configs/M54451EVB_stmicro_defconfig   | 1 +
> > > configs/M54455EVB_a66_defconfig   | 1 +

Re: [U-Boot] pull request: u-boot-uniphier/master (moveconfig + misc)

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 08:03:34AM +0900, Masahiro Yamada wrote:

> Hi Tom,
> 
> A bunch of moveconfig updates + 3 commits you may need
> to fix BOOTDELAY migration.
> 
> I made sure to not pick up defconfig changes
> as you requested.
> 
> Also, if you decide that
> "autoboot: follow-up cleanup after CONFIG_BOOTDELAY moves" is unnecessary,
> you can easily drop it because it is at the tail of this pull request.
> 
> 
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-uniphier.git master
> 
> for you to fetch changes up to 3865b9ebe73eb6246ff2ab6ae7957f507eb539f7:
> 
>   autoboot: follow-up cleanup after CONFIG_BOOTDELAY moves (2016-06-13
> 07:46:29 +0900)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2] verified-boot: Minimal support for booting U-Boot proper from SPL

2016-06-19 Thread Tom Rini
On Thu, Jun 09, 2016 at 07:18:44PM -0700, Teddy Reed wrote:

> This allows a board to configure verified boot within the SPL using
> a FIT or FIT with external data. It also allows the SPL to perform
> signature verification without needing relocation.
> 
> The board configuration will need to add the following feature defines:
> CONFIG_SPL_CRYPTO_SUPPORT
> CONFIG_SPL_HASH_SUPPORT
> CONFIG_SPL_SHA256
> 
> In this example, SHA256 is the only selected hashing algorithm.
> 
> And the following booleans:
> CONFIG_SPL=y
> CONFIG_SPL_DM=y
> CONFIG_SPL_LOAD_FIT=y
> CONFIG_SPL_FIT=y
> CONFIG_SPL_OF_CONTROL=y
> CONFIG_SPL_OF_LIBFDT=y
> CONFIG_SPL_FIT_SIGNATURE=y
> 
> Signed-off-by: Teddy Reed 
> Acked-by: Simon Glass 
> Acked-by: Andreas Dannenberg 
> Acked-by: Sumit Garg 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull ARC changes

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 12:43:13PM +, Alexey Brodkin wrote:

> Hi Tom,
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-arc.git 
> 
> for you to fetch changes up to fc1e8fbbb2ea73139c2eadf2f174d6c3fc4ee03f:
> 
>   axs103: Bump CPU frequency from 50MHz to 100MHz (2016-06-13 14:38:05 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-06-19 Thread Tom Rini
On Mon, Jun 13, 2016 at 12:02:37AM +0200, Andreas Bießmann wrote:

> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-atmel.git master
> 
> for you to fetch changes up to c1631c8a04f53e694dd73bbb987b97eed5188517:
> 
>   serial: atmel_usart: Add device tree support (2016-06-12 23:49:38 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,RFC] cmd: gpt: add - partition size parsing

2016-06-19 Thread Tom Rini
On Wed, Jun 08, 2016 at 10:18:16AM +0200, Michael Trimarchi wrote:

> This patch try to parse name=userdata,size=-,uuid=${uuid_gpt_userdata};
> 
> gpt mmc write 0 $partitions
> gpt mmc verify 0 $partitions
> 
> Signed-off-by: Michael Trimarchi 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ti_armv7_common: env: Remove no longer needed mem_reserve

2016-06-19 Thread Tom Rini
On Wed, Jun 08, 2016 at 10:19:14AM -0500, Andrew F. Davis wrote:

> The kernel can now use DT to reserve memory carveouts and
> these areas are now the default for drivers that need reserved
> memory, so reserving more here is unneeded and any memory reserved
> this way will be wasted.
> 
> Signed-off-by: Andrew F. Davis 
> Reviewed-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull u-boot-sunxi master

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 09:25:59PM +0200, Hans de Goede wrote:

> Hi Tom,
> 
> Here is the second sunxi pull-req for v2016.07, it
> contains a few improvements and fixes, nothing special.
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   http://git.denx.de/u-boot-sunxi.git master
> 
> for you to fetch changes up to 1a83fb4a17d959d7b037999ab7ed7e62429abe34:
> 
>   sunxi: Move the SPL stack top to 0x1A000 on Allwinner A64/A80 (2016-06-10 
> 13:04:06 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm: dra7xx: Assign omap_vcores based on board type

2016-06-19 Thread Tom Rini
On Tue, Jun 07, 2016 at 04:05:25PM +0530, Keerthy wrote:

> Currently omap_vcores which holds pmic data is being assigned based
> on the SoC type. PMIC is not a part of SoC. It is logical to
> to assign omap_vcores based on board type. Hence over ride the
> vcores_init function and assign omap_vcores based on the board type.
> 
> Reported-by: Nishanth Menon 
> Signed-off-by: Keerthy 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-06-19 Thread Tom Rini
On Sun, Jun 12, 2016 at 12:38:56PM +0800, Bin Meng wrote:

> Hi Tom,
> 
> This includes a fix to acpi madt table, and fixes to card detect pin
> configuration of the SD controller on BayTrail SoC.
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-x86.git master
> 
> for you to fetch changes up to 9769e05bcf79939bad23a719982dd1f85a110f3c:
> 
>   x86: broadwell: gpio: Remove the codes to set up pin control
> (2016-06-12 12:19:35 +0800)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull u-boot-fsl-qoriq master

2016-06-19 Thread Tom Rini
On Fri, Jun 10, 2016 at 03:18:02PM -0700, York Sun wrote:

> Tom,
> 
> The following changes since commit 6b3943f1b04be60f147ee540fbd72c4c7ea89f80:
> 
>   siemens,am33x: add draco etamin board (2016-06-09 13:53:13 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-fsl-qoriq.git master
> 
> for you to fetch changes up to a646f6698173ef4ff34c414f91541b4b8f014de1:
> 
>   armv8: ls2080aqds: Enable QSPI boot support (2016-06-10 13:45:01 -0700)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


  1   2   >