Re: [U-Boot] [PATCH v3 1/3] configs: kirkwood: ds109: switch to DM_I2C

2018-11-19 Thread Stefan Roese

On 20.11.18 08:52, Chris Packham wrote:

Hi Stefan,

On Tue, Nov 20, 2018 at 8:00 PM Stefan Roese  wrote:


Hi Chris,

On 19.09.18 14:11, Stefan Roese wrote:

On 07.08.2018 09:41, Chris Packham wrote:

Enable DM_I2C and I2C_MVTSWI for the ds109 board.

Signed-off-by: Chris Packham 
---

Changes in v3: None
Changes in v2:
- new

configs/ds109_defconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig
index c9207433b374..fd10e6e3c36e 100644
--- a/configs/ds109_defconfig
+++ b/configs/ds109_defconfig
@@ -18,6 +18,8 @@ CONFIG_ISO_PARTITION=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_MVSATA_IDE=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MVTWSI=y
# CONFIG_MMC is not set
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y



Unfortunately this series does not apply any more (again). I'm
currently pushing my Marvell branch upstream and would like
to get the first batch of patches accepted. After Tom has
pulled these patches, please rebase on top of this new master.


The new merge window is open and I'm trying to get all pending
Marvell patches handled. Chris, could you please rebase this
series on top of latest mainline? It still does not apply clean
any more.


This as already been applied as
http://git.denx.de/?p=u-boot.git;a=commit;h=f596efb7


Ah, right. All 3 patches from this series? None is missing currently?

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/3] configs: kirkwood: ds109: switch to DM_I2C

2018-11-19 Thread Chris Packham
Hi Stefan,

On Tue, Nov 20, 2018 at 8:00 PM Stefan Roese  wrote:
>
> Hi Chris,
>
> On 19.09.18 14:11, Stefan Roese wrote:
> > On 07.08.2018 09:41, Chris Packham wrote:
> >> Enable DM_I2C and I2C_MVTSWI for the ds109 board.
> >>
> >> Signed-off-by: Chris Packham 
> >> ---
> >>
> >> Changes in v3: None
> >> Changes in v2:
> >> - new
> >>
> >>configs/ds109_defconfig | 2 ++
> >>1 file changed, 2 insertions(+)
> >>
> >> diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig
> >> index c9207433b374..fd10e6e3c36e 100644
> >> --- a/configs/ds109_defconfig
> >> +++ b/configs/ds109_defconfig
> >> @@ -18,6 +18,8 @@ CONFIG_ISO_PARTITION=y
> >>CONFIG_OF_CONTROL=y
> >>CONFIG_ENV_IS_IN_SPI_FLASH=y
> >>CONFIG_MVSATA_IDE=y
> >> +CONFIG_DM_I2C=y
> >> +CONFIG_SYS_I2C_MVTWSI=y
> >># CONFIG_MMC is not set
> >>CONFIG_SPI_FLASH=y
> >>CONFIG_SPI_FLASH_BAR=y
> >>
> >
> > Unfortunately this series does not apply any more (again). I'm
> > currently pushing my Marvell branch upstream and would like
> > to get the first batch of patches accepted. After Tom has
> > pulled these patches, please rebase on top of this new master.
>
> The new merge window is open and I'm trying to get all pending
> Marvell patches handled. Chris, could you please rebase this
> series on top of latest mainline? It still does not apply clean
> any more.

This as already been applied as
http://git.denx.de/?p=u-boot.git;a=commit;h=f596efb7
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 12/19] fix: nand: pxa3xx: Add SoC-specific enable function

2018-11-19 Thread Stefan Roese

Hi Kosta,

On 19.09.18 14:34, Stefan Roese wrote:

On 29.08.2018 10:56, kos...@marvell.com wrote:

From: Igal Liberman 

Add SoC-dependent function to the NAND driver for selecting
NAND interface in DEVBUS MUX register.
This selection is done in the BootROM if the boot device is NAND,
but may be missing othervise.
The NAND is selected only if it is enabled in the DT file.
This patch is fixing NAND access problems for configurations
that use non-NAND devices for boot (like SPI).

Signed-off-by: Igal Liberman 
Signed-off-by: Konstantin Porotchkin 
Signed-off-by: David Sniatkiwicz 
Cc: Stefan Roese 
Cc: Simon Glass 
---
   arch/arm/dts/armada-cp110-master.dtsi  |  7 +++-
   arch/arm/mach-mvebu/armada8k/cpu.c | 18 -
   arch/arm/mach-mvebu/armada8k/soc.c | 30 ++
   arch/arm/mach-mvebu/cpu.c  | 12 +-
   arch/arm/mach-mvebu/include/mach/cpu.h |  3 +-
   drivers/mtd/nand/pxa3xx_nand.c | 74 
+-
   6 files changed, 114 insertions(+), 30 deletions(-)

diff --git a/arch/arm/dts/armada-cp110-master.dtsi 
b/arch/arm/dts/armada-cp110-master.dtsi
index 551d00d..02cee94 100644
--- a/arch/arm/dts/armada-cp110-master.dtsi
+++ b/arch/arm/dts/armada-cp110-master.dtsi
@@ -276,7 +276,12 @@
   
   			cpm_nand: nand@72 {

compatible = "marvell,mvebu-pxa3xx-nand";
-   reg = <0x72 0x100>;
+   reg = <0x72 0x100>,
+ <0x440700 0x20>,
+ <0x440208 0x20>;
+   reg-names = "ctrl_base",
+   "flash_clock",
+   "dev_mux";
#address-cells = <1>;
   
   clocks = <_syscon0 1 2>;

diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c 
b/arch/arm/mach-mvebu/armada8k/cpu.c
index dd028e5..77e9400 100644
--- a/arch/arm/mach-mvebu/armada8k/cpu.c
+++ b/arch/arm/mach-mvebu/armada8k/cpu.c
@@ -109,24 +109,6 @@ void reset_cpu(ulong ignored)
writel(reg, RFU_GLOBAL_SW_RST);
   }
   
-/*

- * TODO - implement this functionality using platform
- *clock driver once it gets available
- * Return NAND clock in Hz
- */
-u32 mvebu_get_nand_clock(void)
-{
-   unsigned long NAND_FLASH_CLK_CTRL = 0xF2440700UL;
-   unsigned long NF_CLOCK_SEL_MASK = 0x1;
-   u32 reg;
-
-   reg = readl(NAND_FLASH_CLK_CTRL);
-   if (reg & NF_CLOCK_SEL_MASK)
-   return 400 * 100;
-   else
-   return 250 * 100;
-}
-
   #if defined(CONFIG_DISPLAY_BOARDINFO)
   int print_cpuinfo(void)
   {
diff --git a/arch/arm/mach-mvebu/armada8k/soc.c 
b/arch/arm/mach-mvebu/armada8k/soc.c
index 511c734..faf1405 100644
--- a/arch/arm/mach-mvebu/armada8k/soc.c
+++ b/arch/arm/mach-mvebu/armada8k/soc.c
@@ -14,6 +14,10 @@
   #define SW_REV_STATUS_OFFSET 16
   #define SW_REV_STATUS_MASK   0xf
   
+#define NF_CLOCK_SEL_MASK		0x1

+#define SOC_MUX_NAND_EN_MASK   0x1
+#define CLOCK_1Mhz 100
+
   struct mochi_module {
u32 module_type;
u32 module_rev;
@@ -128,3 +132,29 @@ void soc_print_device_info(void)
else
printf("CP%x-A%d\n", cp_type, cp_rev);
   }
+#ifdef CONFIG_NAND_PXA3XX
+/* Return NAND clock in Hz */
+u32 mvebu_get_nand_clock(void __iomem *nand_flash_clk_ctrl_reg)
+{
+   u32 reg;
+
+   if (!nand_flash_clk_ctrl_reg)
+   return 0;
+
+   reg = readl(nand_flash_clk_ctrl_reg);
+   if (reg & NF_CLOCK_SEL_MASK)
+   return 400 * CLOCK_1Mhz;
+   else
+   return 250 * CLOCK_1Mhz;
+}
+
+/* Select NAND in the device bus multiplexer */
+void mvebu_nand_select(void __iomem *soc_dev_multiplex_reg)
+{
+   if (!soc_dev_multiplex_reg)
+   return;
+
+   setbits_le32(soc_dev_multiplex_reg, SOC_MUX_NAND_EN_MASK);
+}
+#endif
+
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index 0d2d398..b1d1b1d 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -15,6 +15,8 @@
   #define DDR_BASE_CS_OFF(n)   (0x + ((n) << 3))
   #define DDR_SIZE_CS_OFF(n)   (0x0004 + ((n) << 3))
   
+#define SOC_MUX_NAND_EN_MASK		0x1

+
   static struct mbus_win windows[] = {
/* SPI */
{ MBUS_SPI_BASE, MBUS_SPI_SIZE,
@@ -465,7 +467,7 @@ int arch_cpu_init(void)
   }
   #endif /* CONFIG_ARCH_CPU_INIT */
   
-u32 mvebu_get_nand_clock(void)

+u32 mvebu_get_nand_clock(void __iomem *unused)
   {
u32 reg;
   
@@ -479,6 +481,14 @@ u32 mvebu_get_nand_clock(void)

  NAND_ECC_DIVCKL_RATIO_MASK) >> NAND_ECC_DIVCKL_RATIO_OFFS);
   }
   
+void mvebu_nand_select(void __iomem *soc_dev_multiplex_reg)

+{
+   if (!soc_dev_multiplex_reg)
+   return;
+
+   setbits_le32(soc_dev_multiplex_reg, SOC_MUX_NAND_EN_MASK);
+}
+
   /*
* SOC specific misc init
*/

Re: [U-Boot] [PATCH v3 2/5] usb: am335x_evm: Disable CONFIG_SPL_DM_USB

2018-11-19 Thread Sven Schwermer
>> This configuration doesn't use USB in the SPL, so we need to disable
>> driver model for USB in the SPL.
>> 
>> Signed-off-by: Sven Schwermer 
> 
> Is this also needed on other boards ?

As per the cover letter, I have successfully run the Travis CI build for this 
patch series. Furthermore, I have manually verified that all AM33xx builds 
still succeed. So I don’t think, we need to change anything on other boards. If 
you want me to do more testing, let me know.

Best regards,
Sven
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/5] usb: Introduce CONFIG_SPL_DM_USB

2018-11-19 Thread Sven Schwermer
Hi Marek,

>> This allows building the SPL without driver model for USB. Since
>> CONFIG_SPL_DM_USB is enabled if and only if CONFIG_DM_USB was enabled
>> before, this patch does not change the build behaviour.
>> 
>> Signed-off-by: Sven Schwermer 
> 
> I asked before, but shouldn't this be 5/5 ?

Here are the reasons why I don’t think so:
1) This particular order doesn’t break any builds. I triggered Travis CI runs 
for every patch in order and they have all succeeded.
2) Before this patch series, DM was enabled for both SPL and proper when 
setting CONFIG_DM_USB=y. If I had done the 
s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/ step before this patch, the DM would 
have suddenly been disabled for _all_ boards in their SPL builds. That would 
have definitively changed the existing behaviour. By doing it this way 
(CONFIG_SPL_DM_USB depends on CONFIG_DM_USB and the default for the former is 
“y”), IMHO nothing changes.

I have difficulties seeing any advantages doing this patch last.

Best regards,
Sven
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 11/19] a70x0: a80x0: add soc type and revision printing in boot log

2018-11-19 Thread Stefan Roese

Hi Kosta,

On 29.08.18 10:56, kos...@marvell.com wrote:

From: zachary zhang 

This patch adds SoC type and revision and each module's type
and revision printing for a7k and a8k boards.

Signed-off-by: zachary zhang 
Reviewed-by: Igal Liberman 
Cc: Stefan Roese 
Cc: Simon Glass 
---
  arch/arm/mach-mvebu/armada8k/Makefile  |   1 +
  arch/arm/mach-mvebu/armada8k/cpu.c |   9 +++
  arch/arm/mach-mvebu/armada8k/soc.c | 130 +
  arch/arm/mach-mvebu/include/mach/soc.h |   3 +
  common/board_f.c   |   6 +-
  5 files changed, 146 insertions(+), 3 deletions(-)
  create mode 100644 arch/arm/mach-mvebu/armada8k/soc.c


Such CPU / SoC info collection and printing should be done nowadays in
a DM CPU driver instead. Please take a look at this driver for example:

drivers/cpu/mpc83xx_cpu.c

Thanks,
Stefan
 

diff --git a/arch/arm/mach-mvebu/armada8k/Makefile 
b/arch/arm/mach-mvebu/armada8k/Makefile
index 82cb25b..19503f7 100644
--- a/arch/arm/mach-mvebu/armada8k/Makefile
+++ b/arch/arm/mach-mvebu/armada8k/Makefile
@@ -3,4 +3,5 @@
  # Copyright (C) 2016 Stefan Roese 
  
  obj-y = cpu.o

+obj-y += soc.o
  obj-y += cache_llc.o
diff --git a/arch/arm/mach-mvebu/armada8k/cpu.c 
b/arch/arm/mach-mvebu/armada8k/cpu.c
index f8e8e73..dd028e5 100644
--- a/arch/arm/mach-mvebu/armada8k/cpu.c
+++ b/arch/arm/mach-mvebu/armada8k/cpu.c
@@ -12,6 +12,7 @@
  #include 
  #include 
  #include 
+#include 
  
  /* Armada 7k/8k */

  #define MVEBU_RFU_BASE(MVEBU_REGISTER(0x6f))
@@ -125,3 +126,11 @@ u32 mvebu_get_nand_clock(void)
else
return 250 * 100;
  }
+
+#if defined(CONFIG_DISPLAY_BOARDINFO)
+int print_cpuinfo(void)
+{
+   soc_print_device_info();
+   return 0;
+}
+#endif
diff --git a/arch/arm/mach-mvebu/armada8k/soc.c 
b/arch/arm/mach-mvebu/armada8k/soc.c
new file mode 100644
index 000..511c734
--- /dev/null
+++ b/arch/arm/mach-mvebu/armada8k/soc.c
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2018 Marvell International Ltd.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ * https://spdx.org/licenses
+ */
+
+#include 
+#include 
+#include 
+
+#define CP_DEV_ID_STATUS_REG   (MVEBU_REGISTER(0x2400240))
+#define DEVICE_ID_STATUS_MASK  0x
+#define SW_REV_STATUS_OFFSET   16
+#define SW_REV_STATUS_MASK 0xf
+
+struct mochi_module {
+   u32 module_type;
+   u32 module_rev;
+};
+
+struct soc_info {
+   struct mochi_module soc;
+   char *soc_name;
+   struct mochi_module ap;
+   struct mochi_module cp;
+   u32 ap_num;
+   u32 cp_num;
+};
+
+static struct soc_info soc_info_table[] = {
+   { {0x7040, 1}, "Armada7040-A1", {0x806, 1}, {0x110, 1}, 1, 1 },
+   { {0x7040, 2}, "Armada7040-A2", {0x806, 1}, {0x110, 2}, 1, 1 },
+   { {0x8040, 1}, "Armada8040-A1", {0x806, 1}, {0x110, 1}, 1, 2 },
+   { {0x8040, 2}, "Armada8040-A2", {0x806, 1}, {0x110, 2}, 1, 2 },
+};
+
+static int get_soc_type_rev(u32 *type, u32 *rev)
+{
+   *type = readl(CP_DEV_ID_STATUS_REG) & DEVICE_ID_STATUS_MASK;
+   *rev = (readl(CP_DEV_ID_STATUS_REG) >> SW_REV_STATUS_OFFSET) &
+   SW_REV_STATUS_MASK;
+
+   return 0;
+}
+
+static int get_soc_table_index(u32 *index)
+{
+   u32 soc_type;
+   u32 rev, i, ret = 1;
+
+   *index = 0;
+   get_soc_type_rev(_type, );
+
+   for (i = 0; i < sizeof(soc_info_table) / sizeof(struct soc_info); i++) {
+   if ((soc_type ==
+   soc_info_table[i].soc.module_type) &&
+  (rev == soc_info_table[i].soc.module_rev)) {
+   *index = i;
+   ret = 0;
+   }
+   }
+
+   return ret;
+}
+
+static int get_soc_name(char **soc_name)
+{
+   u32 index;
+
+   get_soc_table_index();
+   *soc_name = soc_info_table[index].soc_name;
+
+   return 0;
+}
+
+static int get_ap_cp_num(u32 *ap_num, u32 *cp_num)
+{
+   u32 index;
+
+   get_soc_table_index();
+   *ap_num = soc_info_table[index].ap_num;
+   *cp_num = soc_info_table[index].cp_num;
+
+   return 0;
+}
+
+/* Get SoC's Application Processor (AP) module type and revision */
+static int get_ap_type_rev(u32 *type, u32 *rev)
+{
+   u32 index;
+
+   get_soc_table_index();
+   *type = soc_info_table[index].ap.module_type;
+   *rev = soc_info_table[index].ap.module_rev;
+
+   return 0;
+}
+
+/* Get SoC's Communication Processor (CP) module type and revision */
+static int get_cp_type_rev(u32 *type, u32 *rev)
+{
+   u32 index;
+
+   get_soc_table_index();
+   *type = soc_info_table[index].cp.module_type;
+   *rev = soc_info_table[index].cp.module_rev;
+
+   return 0;
+}
+
+/* Print device's SoC name and AP & CP information */
+void soc_print_device_info(void)
+{
+   u32 ap_num, cp_num, ap_type, ap_rev, cp_type, cp_rev;
+   char *soc_name = NULL;
+
+   get_ap_cp_num(_num, _num);
+
+   

Re: [U-Boot] [PATCH u-boot-marvell v2 06/12] board: turris_mox: Cosmetic restructurization

2018-11-19 Thread Stefan Roese

Hi Marek,

On 19.09.18 14:22, Stefan Roese wrote:

On 17.08.2018 12:58, Marek Behún wrote:

Restructure the board initialization source.
Remove the module_topology environment variable since it won't be
needed.

Signed-off-by: Marek Behun 
---
   board/CZ.NIC/turris_mox/turris_mox.c | 153 
---
   1 file changed, 106 insertions(+), 47 deletions(-)

diff --git a/board/CZ.NIC/turris_mox/turris_mox.c 
b/board/CZ.NIC/turris_mox/turris_mox.c
index 42f55b7915..4a3e78c5d6 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -33,6 +33,12 @@
   
   #define PCIE_PATH	"/soc/pcie@d007"
   
+typedef enum {

+   MOX_UNKNOWN,
+   MOX_EMMC,
+   MOX_SD
+} mox_version_t;
+
   DECLARE_GLOBAL_DATA_PTR;
   
   #if defined(CONFIG_OF_BOARD_FIXUP)

@@ -133,17 +139,15 @@ int board_init(void)
return 0;
   }
   
-int last_stage_init(void)

+static int mox_do_spi(u8 *in, u8 *out, size_t size)
   {
struct spi_slave *slave;
struct udevice *dev;
-   u8 din[10], dout[10];
-   int ret, i;
-   size_t len = 0;
-   char module_topology[128];
+   int ret;
   
-	ret = spi_get_bus_and_cs(0, 1, 2000, SPI_CPHA, "spi_generic_drv",

-"mox-modules@1", , );
+   ret = spi_get_bus_and_cs(0, 1, 100, SPI_CPHA | SPI_CPOL,
+"spi_generic_drv", "moxtet@1", ,
+);
if (ret)
goto fail;
   
@@ -151,57 +155,112 @@ int last_stage_init(void)

if (ret)
goto fail_free;
   
-	memset(din, 0, 10);

-   memset(dout, 0, 10);
+   ret = spi_xfer(slave, size * 8, out, in, SPI_XFER_ONCE);
+
+   spi_release_bus(slave);
+fail_free:
+   spi_free_slave(slave);
+fail:
+   return ret;
+}
   
-	ret = spi_xfer(slave, 80, dout, din, SPI_XFER_ONCE);

+static int mox_get_topology(const u8 **ptopology, int *psize,
+   mox_version_t *pversion)
+{
+   static mox_version_t mox_version;
+   static u8 topology[MAX_MOX_MODULES - 1];
+   static int size;
+   u8 din[MAX_MOX_MODULES], dout[MAX_MOX_MODULES];
+   int ret, i;
+
+   if (size) {
+   if (ptopology)
+   *ptopology = topology;
+   if (psize)
+   *psize = size;
+   if (pversion)
+   *pversion = mox_version;
+   return 0;
+   }
+
+   memset(din, 0, MAX_MOX_MODULES);
+   memset(dout, 0, MAX_MOX_MODULES);
+
+   ret = mox_do_spi(din, dout, MAX_MOX_MODULES);
if (ret)
-   goto fail_release;
+   return ret;
+
+   switch (din[0]) {
+   case 0x00:
+   mox_version = MOX_EMMC;
+   break;
+   case 0x10:
+   mox_version = MOX_SD;
+   break;
+   case 0xff:
+   mox_version = MOX_UNKNOWN;
+   break;
+   default:
+   return -ENODEV;
+   }
+
+   for (i = 1; i < MAX_MOX_MODULES && din[i] != 0xff; ++i)
+   topology[i - 1] = din[i] & 0xf;
+   size = i - 1;
+
+   if (ptopology)
+   *ptopology = topology;
+   if (psize)
+   *psize = size;
+   if (pversion)
+   *pversion = mox_version;
+
+   return 0;
+}
   
-	if (din[0] != 0x00 && din[0] != 0xff)

-   goto fail_release;
+int last_stage_init(void)
+{
+   int ret, i;
+   const u8 *topology;
+   int module_count;
+   mox_version_t version;
+
+   ret = mox_get_topology(, _count, );
+   if (ret) {
+   printf("Cannot read module topology!\n");
+   return 0;
+   }
   
+	printf("Found Turris Mox %s version\n", version == MOX_SD ? "SD" :

+   version == MOX_EMMC ? "eMMC" :
+   "unknown");
printf("Module Topology:\n");
-   for (i = 1; i < 10 && din[i] != 0xff; ++i) {
-   u8 mid = din[i] & 0xf;
-   size_t mlen;
-   const char *mname = "";
-
-   switch (mid) {
-   case 0x1:
-   mname = "sfp-";
-   printf("% 4i: SFP Module\n", i);
+   for (i = 0; i < module_count; ++i) {
+   switch (topology[i]) {
+   case MOX_MODULE_SFP:
+   printf("% 4i: SFP Module\n", i + 1);
+   break;
+   case MOX_MODULE_PCI:
+   printf("% 4i: Mini-PCIe Module\n", i + 1);
+   break;
+   case MOX_MODULE_TOPAZ:
+   printf("% 4i: Topaz Switch Module (4-port)\n", i + 1);
break;
-   case 0x2:
-   mname = "pci-";
-   printf("% 4i: Mini-PCIe Module\n", i);
+   case 

Re: [U-Boot] [PATCH v3 1/3] configs: kirkwood: ds109: switch to DM_I2C

2018-11-19 Thread Stefan Roese

Hi Chris,

On 19.09.18 14:11, Stefan Roese wrote:

On 07.08.2018 09:41, Chris Packham wrote:

Enable DM_I2C and I2C_MVTSWI for the ds109 board.

Signed-off-by: Chris Packham 
---

Changes in v3: None
Changes in v2:
- new

   configs/ds109_defconfig | 2 ++
   1 file changed, 2 insertions(+)

diff --git a/configs/ds109_defconfig b/configs/ds109_defconfig
index c9207433b374..fd10e6e3c36e 100644
--- a/configs/ds109_defconfig
+++ b/configs/ds109_defconfig
@@ -18,6 +18,8 @@ CONFIG_ISO_PARTITION=y
   CONFIG_OF_CONTROL=y
   CONFIG_ENV_IS_IN_SPI_FLASH=y
   CONFIG_MVSATA_IDE=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_MVTWSI=y
   # CONFIG_MMC is not set
   CONFIG_SPI_FLASH=y
   CONFIG_SPI_FLASH_BAR=y



Unfortunately this series does not apply any more (again). I'm
currently pushing my Marvell branch upstream and would like
to get the first batch of patches accepted. After Tom has
pulled these patches, please rebase on top of this new master.


The new merge window is open and I'm trying to get all pending
Marvell patches handled. Chris, could you please rebase this
series on top of latest mainline? It still does not apply clean
any more.

Thanks,
Stefan
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v5 05/18] arm: MediaTek: add basic support for MT7623 boards

2018-11-19 Thread Weijie Gao
Hi Simon,

On Mon, 2018-11-19 at 10:14 -0700, Simon Glass wrote:
> Hi Weijie,
> 
> On Mon, 19 Nov 2018 at 00:16, Weijie Gao  wrote:
> >
> > On Fri, 2018-11-16 at 11:26 -0700, Simon Glass wrote:
> > > Hi Weijie,
> > >
> > > On 15 November 2018 at 23:08, Weijie Gao 
> > > wrote:
> > > > On Thu, 2018-11-15 at 11:21 -0800, Simon Glass wrote:
> > > >> Hi,
> > > >>
> > > >> On 14 November 2018 at 18:07, Ryder Lee 
> > > wrote:
> > > >> > From: Weijie Gao 
> > > >> >
> > > >> > This adds a general board file based on MT7623 SoCs from
> > > MediaTek.
> > > >> >
> > > >> > As this u-boot is loaded by MTK proprietary preloader, there is
> > > no
> > > >> > low level initializtion codes.
> > > >> >
> > > >> > Signed-off-by: Weijie Gao 
> > > >> > Signed-off-by: Ryder Lee 
> > > >> > Tested-by: Matthias Brugger 
> > > >> > ---
> > > >> > Changes since v5: None
> > > >> > Changes since v4:
> > > >> > -Add gd->bd->bi_boot_params for legacy method - ATAGs.
> > > >> > ---
> > > >> >  arch/arm/mach-mediatek/Kconfig| 13 
> > > >> >  arch/arm/mach-mediatek/Makefile   |  1 +
> > > >> >  arch/arm/mach-mediatek/mt7623/Makefile|  4 ++
> > > >> >  arch/arm/mach-mediatek/mt7623/init.c  | 54
> > > +++
> > > >> >  arch/arm/mach-mediatek/mt7623/lowlevel_init.S | 22 ++
> > > >> >  arch/arm/mach-mediatek/mt7623/preloader.h | 99
> > > +++
> > > >> >  board/mediatek/mt7623/Kconfig | 13 
> > > >> >  board/mediatek/mt7623/MAINTAINERS |  7 ++
> > > >> >  board/mediatek/mt7623/Makefile|  3 +
> > > >> >  board/mediatek/mt7623/mt7623_rfb.c| 16 +
> > > >> >  configs/mt7623n_bpir2_defconfig   | 54
> > > +++
> > > >> >  include/configs/mt7623.h  | 56
> > > +++
> > > >> >  12 files changed, 342 insertions(+)
> > > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/Makefile
> > > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/init.c
> > > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/lowlevel_init.S
> > > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/preloader.h
> > > >> >  create mode 100644 board/mediatek/mt7623/Kconfig
> > > >> >  create mode 100644 board/mediatek/mt7623/MAINTAINERS
> > > >> >  create mode 100644 board/mediatek/mt7623/Makefile
> > > >> >  create mode 100644 board/mediatek/mt7623/mt7623_rfb.c
> > > >> >  create mode 100644 configs/mt7623n_bpir2_defconfig
> > > >> >  create mode 100644 include/configs/mt7623.h
> > > >>
> > > >> Can this use the bloblist feature which should land soon?
> > > >>
> > > >> For now, see dm/spl-working.
> > > >>
> > > >> Regards,
> > > >> Simon
> > > >
> > > > Hi Simon,
> > > >
> > > > I've read the code for spl handoff. It's a good way though but
> > > > unfortunately it cannot be applied to the MT7623 boards.
> > > >
> > > > The reason is that MT7623 uses a MediaTek proprietary preloader
> > > which
> > > > has the same function as the U-Boot SPL. But the preloader is
> > > > close-sourced (by company policy) and only available in binary
> > > release.
> > > > This means we can't use a real U-Boot SPL to replace the preloader.
> > >
> > > Can you work to get U-Boot SPL running on the chip?
> > >
> > > What is the reason for the proprietary SPL?
> > >
> > > >
> > > > At present this chip has already been used in many products. We
> > > can't
> > > > either release a different preloader which introduces compatibility
> > > > issues.
> > >
> > > What sort of compatibility issues? I cannot see any advantage with a
> > > proprietary SPL.
> > >
> > > >
> > > > So the conclusion is that we cannot use the bloblist feature for
> > > this
> > > > SoC.
> > >
> > > Regards,
> > > Simon
> > >
> > Hi Simon,
> >
> >
> > Sorry for that I didn't describe the function of the preloader clearly.
> >
> > The MT7623 is like a smart phone SoC which has the ability to upgrade
> > bootloader/firmware via a USB cable. This function is always available
> > even if there is no valid preloader/bootloader.
> >
> > This is done by cooperation of the BootROM and preloader. This is a
> > simple description of the flow:
> > 1. Connect the MT7623 board to the PC using USB cable. Do not power up.
> > 2. Run MediaTek's FlashTool and start downloading.
> > 3. Power up the board.
> > 4. The BootROM will initialize the USB device immediately for few
> >seconds and waiting for commands from PC.
> > 5. The PC will start transmit commands to the board as soon as it
> >detects the board device.
> > 6. Thee BootROM will then download the preloader into SRAM, and run it.
> >Several informations will be passed to the preloader, to let it
> >continue to communicate with the FlashTool.
> > 7. The preloader will initialize the DRAM, download data via USB and
> >write it to flash.
> >
> > So the preloader is not only a simple SPL. It initializes DRAM and many
> > other components which will 

[U-Boot] [PATCH] Revert "arm: config: fix default console only to specify the device"

2018-11-19 Thread Seung-Woo Kim
This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.

In exynos boards, ${console} is used to set bootargs but it sets
without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
designated with "console=" but it is removed. So revert the commit.

References for using ${console} in
   board/samsung/common/bootscripts/autoboot.cmd
   board/samsung/common/bootscripts/bootzimg.cmd

Signed-off-by: Seung-Woo Kim 
---
 include/configs/odroid.h| 4 ++--
 include/configs/odroid_xu3.h| 4 ++--
 include/configs/s5p_goni.h  | 4 ++--
 include/configs/s5pc210_universal.h | 4 ++--
 include/configs/trats.h | 4 ++--
 include/configs/trats2.h| 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index ad77242e38..c3520bb15f 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -40,7 +40,7 @@
 /* Console configuration */
 
 #define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run autoboot"
-#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8"
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_LOAD_ADDR \
- GENERATED_GBL_DATA_SIZE)
@@ -157,7 +157,7 @@
"elif test -e mmc 0 uImage; then; " \
"run boot_uimg;" \
"fi;\0" \
-   "console=" CONFIG_DEFAULT_CONSOLE "\0" \
+   "console=" CONFIG_DEFAULT_CONSOLE \
"mmcbootdev=0\0" \
"mmcbootpart=1\0" \
"mmcrootdev=0\0" \
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index f683ee46e3..3b9a945e7c 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -30,7 +30,7 @@
 
 #define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_LOAD_ADDR - 0x100)
 
-#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
 
 /* USB */
 #define CONFIG_USB_EHCI_EXYNOS
@@ -99,7 +99,7 @@
MEM_LAYOUT_ENV_SETTINGS \
BOOTENV \
"rootfstype=ext4\0" \
-   "console=" CONFIG_DEFAULT_CONSOLE "\0"\
+   "console=" CONFIG_DEFAULT_CONSOLE \
"fdtfile=exynos5422-odroidxu3.dtb\0" \
"boardname=odroidxu3\0" \
"mmcbootdev=0\0" \
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 87ddc20a52..ff634d91dd 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -87,7 +87,7 @@
 
 #define CONFIG_BOOTCOMMAND "run mmcboot"
 
-#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
 
 #define CONFIG_RAMDISK_BOOT"root=/dev/ram0 rw rootfstype=ext4" \
" ${console} ${meminfo}"
@@ -134,7 +134,7 @@
"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
"verify=n\0" \
"rootfstype=ext4\0" \
-   "console=" CONFIG_DEFAULT_CONSOLE "\0"\
+   "console=" CONFIG_DEFAULT_CONSOLE \
"meminfo=mem=80M mem=256M@0x4000 mem=128M@0x5000\0" \
"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \
"mmcdev=0\0" \
diff --git a/include/configs/s5pc210_universal.h 
b/include/configs/s5pc210_universal.h
index 999bdd1676..832032da18 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -27,7 +27,7 @@
 /* Console configuration */
 
 #define CONFIG_BOOTCOMMAND "run mmcboot"
-#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8"
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_LOAD_ADDR \
- GENERATED_GBL_DATA_SIZE)
@@ -108,7 +108,7 @@
"mmcoops=mmc read 0 0x4000 0x40 8; md 0x4000 0x400\0" \
"verify=n\0" \
"rootfstype=ext4\0" \
-   "console=" CONFIG_DEFAULT_CONSOLE "\0" \
+   "console=" CONFIG_DEFAULT_CONSOLE \
"mtdparts=" CONFIG_MTDPARTS_DEFAULT \
"mbrparts=" MBRPARTS_DEFAULT \
"meminfo=crashkernel=32M@0x5000\0" \
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 223fce49a7..af8e8ce3b6 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -36,7 +36,7 @@
 #define CONFIG_MACH_TYPE   MACH_TYPE_TRATS
 
 #define CONFIG_BOOTCOMMAND "run autoboot"
-#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_LOAD_ADDR \
- GENERATED_GBL_DATA_SIZE)
@@ -120,7 +120,7 @@
"mmcoops=mmc read 0 0x4000 0x40 8; md 0x4000 0x400\0" \
"verify=n\0" \
"rootfstype=ext4\0" \
-   "console=" CONFIG_DEFAULT_CONSOLE "\0" \
+   "console=" CONFIG_DEFAULT_CONSOLE \

Re: [U-Boot] [PATCH][v2] armv8: lx2160ardb : Add support for LX2160ARDB platform

2018-11-19 Thread Priyanka Jain


>-Original Message-
>From: York Sun
>Sent: Tuesday, November 20, 2018 2:17 AM
>To: Priyanka Jain ; u-boot@lists.denx.de
>Cc: Wasim Khan ; Yogesh Narayan Gaur
>; Meenakshi Aggarwal
>; Vabhav Sharma
>; Sriram Dash ; Rajesh
>Bhagat ; Pankit Garg 
>Subject: Re: [PATCH][v2] armv8: lx2160ardb : Add support for LX2160ARDB
>platform
>
>On 10/29/18 2:30 AM, Priyanka Jain wrote:
>> LX2160ARDB is an evaluation board that supports LX2160A family SoCs.
>> This patch add base support for this board.
>>
>> Signed-off-by: Wasim Khan 
>> Signed-off-by: Yogesh Gaur 
>> Signed-off-by: Meenakshi Aggarwal 
>> Signed-off-by: Vabhav Sharma 
>> Signed-off-by: Sriram Dash 
>> Signed-off-by: Rajesh Bhagat 
>> Signed-off-by: Pankit Garg 
>> Signed-off-by: Priyanka Jain 
>> ---
>> Changes for v2:
>>  Rebased on top of test_qoriq branch of u-boot-fsl-qoriq.git
>>
>>  Corrected line
>>  seria01.clock = get_serial_clock ->  serial1.clock =
>> get_serial_clock();
>>
>>  Corrected CONFIG_ENV_OFFSET to 0x50 [Thanks to Ashish K for
>> pointing this]
>>
>
>Priyanka,
>
>I am seeing compiling error
>
>../board/freescale/lx2160a/eth_lx2160ardb.c:71:3: error: too few arguments
>to function ?wriop_set_phy_address?
>
Compilation error can be due to recent ethernet patch from Pankaj which changes 
API format.
LX2RDB patch needs to be rebased on top of this patch then
Please confirm your working branch. Is it  test_qoriq?
I will send another version after rebasing and testing on this branch.

>Please also check the patches I collected here
>http://patchwork.ozlabs.org/bundle/yorksun/lx2/ and confirm the
>dependency and order.
>
>York

The order of LX2160ARDB related dependent patches should be:
[U-Boot,v2] armv8: lx2160ardb : Add support for LX2160ARDB platform
[U-Boot] drivers/ddr/fsl: Update fsl_ddr_board_options as weak function 
[U-Boot,v3] armv8: lx2160a: Add LX2160A SoC Support
[U-Boot,v2] armv8:fsl-layerscape: Add support for Chassis 3.2
[U-Boot] board/freescale/vid: Add vdd table for NXP LX2160A SoC
[U-Boot] board/freescale/vid: Add correction for ltc3882 read error.
[U-Boot,v2] armv8: lsch3: Add support of serdes3 module

lx2160a-eSDHC related patches from Yingbo Zhu should be applied on top of the 
lx2160ardb patches.

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


Re: [U-Boot] [PATCH v3 6/6] spi: kirkwood: Full dm conversion

2018-11-19 Thread Jagan Teki
On Thu, Nov 15, 2018 at 1:19 PM Michael Walle  wrote:
>
> Am 2018-11-05 10:58, schrieb Jagan Teki:
> > On Mon, May 7, 2018 at 2:40 PM Jagan Teki 
> > wrote:
> >>
> >> kirkwood now support dt along with platform data,
> >> respective boards need to switch into dm for the same.
> >>
> >> Signed-off-by: Jagan Teki 
> >> ---
> >> Changes for v3:
> >> - rebased master
> >> - Move kconfig option if DM_SPI
> >>
> >>  drivers/spi/Kconfig |  12 +-
> >>  drivers/spi/kirkwood_spi.c  | 240
> >> ++--
> >>  include/dm/platform_data/spi_kirkwood.h |  15 ++
> >>  3 files changed, 62 insertions(+), 205 deletions(-)
> >>  create mode 100644 include/dm/platform_data/spi_kirkwood.h
> >
> > Any update from the board maintainers about this changes, I would like
> > to push this sooner as possible.
>
>
> Hi,
>
> oh isn't this merged yet? Because my change [1] which depends on that
> made it already into the main tree [2].

There are many boards need to move DM_SPI [3], anyway I'm going to
remove this driver.

[3] https://travis-ci.org/openedev/u-boot-amarula/builds/457097203
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 3/3] ARM: DTS: Provide pinfunc definitions for vybrid vf610 from Linux kernel

2018-11-19 Thread Lukasz Majewski
This file is in sync with v4.20-next tree:
e4dda4f5a4df "x86/kaslr, ACPI/NUMA: avoid including asm/kaslr.h on arm64"

Signed-off-by: Lukasz Majewski 
---

Changes in v2: None

 arch/arm/dts/vf610-pinfunc.h | 810 +++
 1 file changed, 810 insertions(+)
 create mode 100644 arch/arm/dts/vf610-pinfunc.h

diff --git a/arch/arm/dts/vf610-pinfunc.h b/arch/arm/dts/vf610-pinfunc.h
new file mode 100644
index 00..fcad7132c8
--- /dev/null
+++ b/arch/arm/dts/vf610-pinfunc.h
@@ -0,0 +1,810 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DTS_VF610_PINFUNC_H
+#define __DTS_VF610_PINFUNC_H
+
+/*
+ * The pin function ID for VF610 is a tuple of:
+ * 
+ */
+
+#define ALT0   0x0
+#define ALT1   0x1
+#define ALT2   0x2
+#define ALT3   0x3
+#define ALT4   0x4
+#define ALT5   0x5
+#define ALT6   0x6
+#define ALT7   0x7
+
+
+#define VF610_PAD_PTA6__GPIO_0 0x000 0x000 ALT0 0x0
+#define VF610_PAD_PTA6__RMII_CLKOUT0x000 0x000 ALT1 0x0
+#define VF610_PAD_PTA6__RMII_CLKIN 0x000 0x2F0 ALT2 0x0
+#define VF610_PAD_PTA6__DCU1_TCON110x000 0x000 ALT4 0x0
+#define VF610_PAD_PTA6__DCU1_R20x000 0x000 ALT7 0x0
+#define VF610_PAD_PTA8__GPIO_1 0x004 0x000 ALT0 0x0
+#define VF610_PAD_PTA8__TCLK   0x004 0x000 ALT1 0x0
+#define VF610_PAD_PTA8__DCU0_R00x004 0x000 ALT4 0x0
+#define VF610_PAD_PTA8__MLB_CLK0x004 0x354 ALT7 0x0
+#define VF610_PAD_PTA9__GPIO_2 0x008 0x000 ALT0 0x0
+#define VF610_PAD_PTA9__TDI0x008 0x000 ALT1 0x0
+#define VF610_PAD_PTA9__RMII_CLKOUT0x008 0x000 ALT2 0x0
+#define VF610_PAD_PTA9__RMII_CLKIN 0x008 0x2F0 ALT3 0x1
+#define VF610_PAD_PTA9__DCU0_R10x008 0x000 ALT4 0x0
+#define VF610_PAD_PTA9__WDOG_B 0x008 0x000 ALT6 0x0
+#define VF610_PAD_PTA10__GPIO_30x00C 0x000 ALT0 0x0
+#define VF610_PAD_PTA10__TDO   0x00C 0x000 ALT1 0x0
+#define VF610_PAD_PTA10__EXT_AUDIO_MCLK0x00C 0x2EC ALT2 0x0
+#define VF610_PAD_PTA10__DCU0_G0   0x00C 0x000 ALT4 0x0
+#define VF610_PAD_PTA10__ENET_TS_CLKIN 0x00C 0x2F4 ALT6 0x0
+#define VF610_PAD_PTA10__MLB_SIGNAL0x00C 0x35C ALT7 0x0
+#define VF610_PAD_PTA11__GPIO_40x010 0x000 ALT0 0x0
+#define VF610_PAD_PTA11__TMS   0x010 0x000 ALT1 0x0
+#define VF610_PAD_PTA11__DCU0_G1   0x010 0x000 ALT4 0x0
+#define VF610_PAD_PTA11__MLB_DATA  0x010 0x358 ALT7 0x0
+#define VF610_PAD_PTA12__GPIO_50x014 0x000 ALT0 0x0
+#define VF610_PAD_PTA12__TRACECK   0x014 0x000 ALT1 0x0
+#define VF610_PAD_PTA12__EXT_AUDIO_MCLK0x014 0x2EC ALT2 0x1
+#define VF610_PAD_PTA12__VIU_DATA130x014 0x000 ALT6 0x0
+#define VF610_PAD_PTA12__I2C0_SCL  0x014 0x33C ALT7 0x0
+#define VF610_PAD_PTA16__GPIO_60x018 0x000 ALT0 0x0
+#define VF610_PAD_PTA16__TRACED0   0x018 0x000 ALT1 0x0
+#define VF610_PAD_PTA16__USB0_VBUS_EN  0x018 0x000 ALT2 0x0
+#define VF610_PAD_PTA16__ADC1_SE0  0x018 0x000 ALT3 0x0
+#define VF610_PAD_PTA16__LCD29 0x018 0x000 ALT4 0x0
+#define VF610_PAD_PTA16__SAI2_TX_BCLK  0x018 0x370 ALT5 0x0
+#define VF610_PAD_PTA16__VIU_DATA140x018 0x000 ALT6 0x0
+#define VF610_PAD_PTA16__I2C0_SDA  0x018 0x340 ALT7 0x0
+#define VF610_PAD_PTA17__GPIO_70x01C 0x000 ALT0 0x0
+#define VF610_PAD_PTA17__TRACED1   0x01C 0x000 ALT1 0x0
+#define VF610_PAD_PTA17__USB0_VBUS_OC  0x01C 0x000 ALT2 0x0
+#define VF610_PAD_PTA17__ADC1_SE1  0x01C 0x000 ALT3 0x0
+#define VF610_PAD_PTA17__LCD30 0x01C 0x000 ALT4 0x0
+#define VF610_PAD_PTA17__USB0_SOF_PULSE0x01C 0x000 ALT5 0x0
+#define VF610_PAD_PTA17__VIU_DATA150x01C 0x000 ALT6 0x0
+#define VF610_PAD_PTA17__I2C1_SCL  0x01C 0x344 ALT7 0x0
+#define VF610_PAD_PTA18__GPIO_80x020 0x000 ALT0 0x0
+#define VF610_PAD_PTA18__TRACED2   0x020 0x000 ALT1 0x0
+#define VF610_PAD_PTA18__ADC0_SE0  0x020 0x000 ALT2 0x0
+#define VF610_PAD_PTA18__FTM1_QD_PHA   0x020 0x334 ALT3 0x0
+#define VF610_PAD_PTA18__LCD31 0x020 0x000 ALT4 0x0
+#define VF610_PAD_PTA18__SAI2_TX_DATA  0x020 0x000 ALT5 0x0
+#define VF610_PAD_PTA18__VIU_DATA160x020 0x000 ALT6 0x0
+#define VF610_PAD_PTA18__I2C1_SDA  0x020 0x348 ALT7 0x0
+#define VF610_PAD_PTA19__GPIO_90x024 0x000 ALT0 0x0
+#define 

[U-Boot] [PATCH v2 1/3] ARM: vybrid: Provide pinctrl driver for Vybrid (vf610)

2018-11-19 Thread Lukasz Majewski
This implementation comply with other iMX devices pinctrl drivers already
available in U-boot.

Signed-off-by: Lukasz Majewski 

---

Changes in v2:
- Remove mux_mask from the imx_pinctrl_soc_info specific for vf610

 drivers/pinctrl/nxp/Kconfig | 14 +
 drivers/pinctrl/nxp/Makefile|  1 +
 drivers/pinctrl/nxp/pinctrl-vf610.c | 40 +
 3 files changed, 55 insertions(+)
 create mode 100644 drivers/pinctrl/nxp/pinctrl-vf610.c

diff --git a/drivers/pinctrl/nxp/Kconfig b/drivers/pinctrl/nxp/Kconfig
index 799d1d2465..f1d5a5c50d 100644
--- a/drivers/pinctrl/nxp/Kconfig
+++ b/drivers/pinctrl/nxp/Kconfig
@@ -74,3 +74,17 @@ config PINCTRL_IMX8
  is different from the linux one, this is a simple implementation,
  only parses the 'fsl,pins' property and configures related
  registers.
+
+config PINCTRL_VYBRID
+   bool "Vybrid (vf610) pinctrl driver"
+   depends on ARCH_VF610 && PINCTRL_FULL
+   select DEVRES
+   select PINCTRL_IMX
+   help
+ Say Y here to enable the Vybrid (vf610) pinctrl driver
+
+ This provides a simple pinctrl driver for Vybrid SoC familiy,
+ vf610. This feature depends on device tree
+ configuration. This driver is different from the linux one,
+ this is a simple implementation, only parses the 'fsl,pins'
+ property and configure related registers.
diff --git a/drivers/pinctrl/nxp/Makefile b/drivers/pinctrl/nxp/Makefile
index 310b3b3a2e..891ee6e477 100644
--- a/drivers/pinctrl/nxp/Makefile
+++ b/drivers/pinctrl/nxp/Makefile
@@ -5,3 +5,4 @@ obj-$(CONFIG_PINCTRL_IMX7)  += pinctrl-imx7.o
 obj-$(CONFIG_PINCTRL_IMX7ULP)  += pinctrl-imx7ulp.o
 obj-$(CONFIG_PINCTRL_IMX_SCU)  += pinctrl-scu.o
 obj-$(CONFIG_PINCTRL_IMX8) += pinctrl-imx8.o
+obj-$(CONFIG_PINCTRL_VYBRID)   += pinctrl-vf610.o
diff --git a/drivers/pinctrl/nxp/pinctrl-vf610.c 
b/drivers/pinctrl/nxp/pinctrl-vf610.c
new file mode 100644
index 00..e795b5fd8a
--- /dev/null
+++ b/drivers/pinctrl/nxp/pinctrl-vf610.c
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 DENX Software Engineering
+ * Lukasz Majewski, DENX Software Engineering, lu...@denx.de
+ */
+
+#include 
+#include 
+#include 
+
+#include "pinctrl-imx.h"
+
+static struct imx_pinctrl_soc_info vf610_pinctrl_soc_info = {
+   .flags = SHARE_MUX_CONF_REG | ZERO_OFFSET_VALID,
+};
+
+static int vf610_pinctrl_probe(struct udevice *dev)
+{
+   struct imx_pinctrl_soc_info *info =
+   (struct imx_pinctrl_soc_info *)dev_get_driver_data(dev);
+
+   return imx_pinctrl_probe(dev, info);
+}
+
+static const struct udevice_id vf610_pinctrl_match[] = {
+   { .compatible = "fsl,vf610-iomuxc",
+ .data = (ulong)_pinctrl_soc_info },
+   { /* sentinel */ }
+};
+
+U_BOOT_DRIVER(vf610_pinctrl) = {
+   .name = "vf610-pinctrl",
+   .id = UCLASS_PINCTRL,
+   .of_match = of_match_ptr(vf610_pinctrl_match),
+   .probe = vf610_pinctrl_probe,
+   .remove = imx_pinctrl_remove,
+   .priv_auto_alloc_size = sizeof(struct imx_pinctrl_priv),
+   .ops = _pinctrl_ops,
+   .flags = DM_FLAG_PRE_RELOC,
+};
-- 
2.11.0

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


[U-Boot] [PATCH v2 2/3] ARM: DTS: Add iomux node to vf.dtsi for Vybrid devices

2018-11-19 Thread Lukasz Majewski
This node is in sync with v4.20-next tree:
e4dda4f5a4df "x86/kaslr, ACPI/NUMA: avoid including asm/kaslr.h on arm64"

Signed-off-by: Lukasz Majewski 

---

Changes in v2:
- Define vf610 mux_mask in the DTS (as it is read from there)

 arch/arm/dts/vf.dtsi | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/dts/vf.dtsi b/arch/arm/dts/vf.dtsi
index 5198eee024..ad30059b9a 100644
--- a/arch/arm/dts/vf.dtsi
+++ b/arch/arm/dts/vf.dtsi
@@ -89,6 +89,12 @@
status = "disabled";
};
 
+   iomuxc: iomuxc@40048000 {
+   compatible = "fsl,vf610-iomuxc";
+   reg = <0x40048000 0x1000>;
+   fsl,mux_mask = <0x70>;
+   };
+
gpio0: gpio@40049000 {
compatible = "fsl,vf610-gpio";
reg = <0x400ff000 0x40>;
-- 
2.11.0

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


[U-Boot] [PATCH v2 0/3] ARM: pinctrl: Provide pinctrl driver for Vybrid (vf610)

2018-11-19 Thread Lukasz Majewski

This series enables pinctrl driver for the vybrid NXP SoC.


Changes in v2:
- Remove mux_mask from the imx_pinctrl_soc_info specific for vf610
- Define vf610 mux_mask in the DTS (as it is read from there)

Lukasz Majewski (3):
  ARM: vybrid: Provide pinctrl driver for Vybrid (vf610)
  ARM: DTS: Add iomux node to vf.dtsi for Vybrid devices
  ARM: DTS: Provide pinfunc definitions for vybrid vf610 from Linux
kernel

 arch/arm/dts/vf.dtsi|   6 +
 arch/arm/dts/vf610-pinfunc.h| 810 
 drivers/pinctrl/nxp/Kconfig |  14 +
 drivers/pinctrl/nxp/Makefile|   1 +
 drivers/pinctrl/nxp/pinctrl-vf610.c |  40 ++
 5 files changed, 871 insertions(+)
 create mode 100644 arch/arm/dts/vf610-pinfunc.h
 create mode 100644 drivers/pinctrl/nxp/pinctrl-vf610.c

-- 
2.11.0

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


Re: [U-Boot] [PATCH] imx: Add PHYTEC phyBOARD-i.MX6UL-Segin

2018-11-19 Thread Lukasz Majewski
Hi Martyn,

> On Thu, 2018-11-15 at 01:25 +0100, Lukasz Majewski wrote:
> > Hi Martyn,
> >   
> > > Port for the PHYTEC phyBOARD-i.MX6UL-Segin single board computer.
> > > Based on the PHYTEC phyCORE-i.MX6UL SOM (PCL063). This port
> > > provides
> > > both SPL and DCD based boot options (hence the two defconfigs).
> > > 
> > > CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
> > > CPU:   Industrial temperature grade (-40C to 105C) at 44C
> > > Reset cause: POR
> > > Board: PHYTEC phyCORE-i.MX6UL
> > > I2C:   ready
> > > DRAM:  256 MiB
> > > NAND:  512 MiB
> > > MMC:   FSL_SDHC: 0
> > > In:serial
> > > Out:   serial
> > > Err:   serial
> > > Net:   FEC0
> > > 
> > > Working:
> > >  - Eth0
> > >  - Eth1
> > >  - i2C
> > >  - MMC/SD
> > >  - NAND
> > >  - UART (1 & 5)
> > >  - USB (host & otg)  
> > 
> > Could you double check if maybe you could use Driver Model versions
> > of
> > some drivers? To be more specific - the ETH interfaces, I2C, eMMC,
> > etc.
> >   
> 
> Hi Lukasz,
> 
> I've so far managed to get SD card, i2c and USB working via the driver
> model, though I'm stuggling to get the Eth interfaces working - the
> driver model probe doesn't seem to get the PHY addresses from the
> device tree 

I've managed to make this working on imx53 (imx53-kp.dts) and now on
NXP's Vybrid. There is one single driver for it -
the ./drivers/net/fec_mxc.c

> and I suspect it's also not able to pick up that both phys
> are on the same MDIO bus form it either. Is this support still work in
> progress?

IMHO there is no point in adding board without cutting edge DM support
- drivers, which doesn't support it will be removed soon, and your
  board will be eligible for removal as well.

> 
> Martyn
> 
> > > Signed-off-by: Martyn Welch 
> > > 
> > > ---
> > > 
> > >  arch/arm/mach-imx/mx6/Kconfig|   8 +
> > >  board/phytec/pcl063/Kconfig  |  12 +
> > >  board/phytec/pcl063/MAINTAINERS  |   7 +
> > >  board/phytec/pcl063/Makefile |   7 +
> > >  board/phytec/pcl063/README   |  43 +++
> > >  board/phytec/pcl063/imximage.cfg | 177 +
> > >  board/phytec/pcl063/pcl063.c | 379
> > > +++ board/phytec/pcl063/spl.c|
> > > 118 + configs/phycore_pcl063_defconfig |  47 
> > >  configs/phycore_pcl063_spl_defconfig |  55 
> > >  include/configs/pcl063.h | 107 
> > >  11 files changed, 960 insertions(+)
> > >  create mode 100644 board/phytec/pcl063/Kconfig
> > >  create mode 100644 board/phytec/pcl063/MAINTAINERS
> > >  create mode 100644 board/phytec/pcl063/Makefile
> > >  create mode 100644 board/phytec/pcl063/README
> > >  create mode 100644 board/phytec/pcl063/imximage.cfg
> > >  create mode 100644 board/phytec/pcl063/pcl063.c
> > >  create mode 100644 board/phytec/pcl063/spl.c
> > >  create mode 100644 configs/phycore_pcl063_defconfig
> > >  create mode 100644 configs/phycore_pcl063_spl_defconfig
> > >  create mode 100644 include/configs/pcl063.h
> > > 
> > > diff --git a/arch/arm/mach-imx/mx6/Kconfig
> > > b/arch/arm/mach-imx/mx6/Kconfig index 06c25bae36..22aea99f8f
> > > 100644 --- a/arch/arm/mach-imx/mx6/Kconfig
> > > +++ b/arch/arm/mach-imx/mx6/Kconfig
> > > @@ -428,6 +428,13 @@ config TARGET_PFLA02
> > >   select MX6QDL
> > >   select SUPPORT_SPL
> > >  
> > > +config TARGET_PCL063
> > > + bool "PHYTEC PCL063 (phyCORE-i.MX6UL)"
> > > + select MX6UL
> > > + select DM
> > > + select DM_THERMAL
> > > + select SUPPORT_SPL  
> > 
> > Your board is only selecting DM_THERMAL.
> > 
> > One good way to check the list of DM aware (used) blocks is to run
> > "dm
> > list"
> >   
> > > +
> > >  config TARGET_SECOMX6
> > >   bool "secomx6 boards"
> > >  
> > > @@ -550,6 +557,7 @@ source "board/freescale/mx6ullevk/Kconfig"
> > >  source "board/grinn/liteboard/Kconfig"
> > >  source "board/phytec/pcm058/Kconfig"
> > >  source "board/phytec/pfla02/Kconfig"
> > > +source "board/phytec/pcl063/Kconfig"
> > >  source "board/gateworks/gw_ventana/Kconfig"
> > >  source "board/kosagi/novena/Kconfig"
> > >  source "board/samtec/vining_2000/Kconfig"
> > > diff --git a/board/phytec/pcl063/Kconfig
> > > b/board/phytec/pcl063/Kconfig
> > > new file mode 100644
> > > index 00..977db70f64
> > > --- /dev/null
> > > +++ b/board/phytec/pcl063/Kconfig
> > > @@ -0,0 +1,12 @@
> > > +if TARGET_PCL063
> > > +
> > > +config SYS_BOARD
> > > + default "pcl063"
> > > +
> > > +config SYS_VENDOR
> > > + default "phytec"
> > > +
> > > +config SYS_CONFIG_NAME
> > > + default "pcl063"
> > > +
> > > +endif
> > > diff --git a/board/phytec/pcl063/MAINTAINERS
> > > b/board/phytec/pcl063/MAINTAINERS new file mode 100644
> > > index 00..8edc45827c
> > > --- /dev/null
> > > +++ b/board/phytec/pcl063/MAINTAINERS
> > > @@ -0,0 +1,7 @@
> > > +PCL063 BOARD
> > > +M:   Martyn Welch 
> > > +S:   Maintained
> > > +F:   board/phytec/pcl063/
> > > +F:   configs/phycore_pcl063_defconfig
> > > +F:   

Re: [U-Boot] [PATCH v3 1/5] usb: Introduce CONFIG_SPL_DM_USB

2018-11-19 Thread Marek Vasut
On 11/17/2018 12:37 PM, Sven Schwermer wrote:
> This allows building the SPL without driver model for USB. Since
> CONFIG_SPL_DM_USB is enabled if and only if CONFIG_DM_USB was enabled
> before, this patch does not change the build behaviour.
> 
> Signed-off-by: Sven Schwermer 

I asked before, but shouldn't this be 5/5 ?

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


Re: [U-Boot] [PATCH v3 2/5] usb: am335x_evm: Disable CONFIG_SPL_DM_USB

2018-11-19 Thread Marek Vasut
On 11/16/2018 12:04 PM, Sven Schwermer wrote:
> This configuration doesn't use USB in the SPL, so we need to disable
> driver model for USB in the SPL.
> 
> Signed-off-by: Sven Schwermer 

Is this also needed on other boards ?

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


Re: [U-Boot] [PATCH 89/93] arm: Remove socfpga_vining_fpga board

2018-11-19 Thread Marek Vasut
On 11/19/2018 04:54 PM, Simon Glass wrote:
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.
> 
> Signed-off-by: Simon Glass 


NAK, this board is actively used. I was never informed about any
deadline, so no, sorry.

-- 
Best regards,
Marek Vasut

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


Re: [U-Boot] [PATCH 83/93] arm: Remove socfpga_sockit board

2018-11-19 Thread Marek Vasut
On 11/19/2018 04:54 PM, Simon Glass wrote:
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.
> 
> Signed-off-by: Simon Glass 

NAK, this board is actively used. I was never informed about any
deadline, so no, sorry.

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


[U-Boot] [PATCH v3 04/11] mtd: sf: Make sure we don't register the same device twice

2018-11-19 Thread Boris Brezillon
spi_flash_mtd_register() can be called several times and each time it
will register the same mtd_info instance like if it was a new one.
The MTD ID allocation gets crazy when that happens, so let's track the
status of the sf_mtd_info object to avoid that.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2
- None
---
 drivers/mtd/spi/sf_mtd.c | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index 58d7e4439903..aabbc3589435 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -10,6 +10,7 @@
 #include 
 
 static struct mtd_info sf_mtd_info;
+static bool sf_mtd_registered;
 static char sf_mtd_name[8];
 
 static int spi_flash_mtd_erase(struct mtd_info *mtd, struct erase_info *instr)
@@ -73,6 +74,12 @@ static int spi_flash_mtd_number(void)
 
 int spi_flash_mtd_register(struct spi_flash *flash)
 {
+   int ret;
+
+   if (sf_mtd_registered)
+   del_mtd_device(_mtd_info);
+
+   sf_mtd_registered = false;
memset(_mtd_info, 0, sizeof(sf_mtd_info));
sprintf(sf_mtd_name, "nor%d", spi_flash_mtd_number());
 
@@ -94,7 +101,11 @@ int spi_flash_mtd_register(struct spi_flash *flash)
sf_mtd_info.numeraseregions = 0;
sf_mtd_info.erasesize = flash->sector_size;
 
-   return add_mtd_device(_mtd_info);
+   ret = add_mtd_device(_mtd_info);
+   if (!ret)
+   sf_mtd_registered = true;
+
+   return ret;
 }
 
 void spi_flash_mtd_unregister(void)
-- 
2.17.1

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


[U-Boot] [PATCH v3 11/11] mtd: sf: Make sf_mtd.c more robust

2018-11-19 Thread Boris Brezillon
SPI flash based MTD devs can be registered/unregistered at any time
through the sf probe command or the spi_flash_free() function.

This commit does not try to fix the root cause as it would probably
require rewriting most of the code and have an mtd_info object
instance per spi_flash object (not to mention that the the spi-flash
layer is likely to be replaced by a spi-nor layer ported from Linux).

Instead, we try to be as safe as can be by checking the code returned
by del_mtd_device() and complain loudly when there's nothing we can
do about the deregistration failure. When that happens we also reset
sf_mtd_info.priv to NULL, and check for NULL pointer in the mtd hooks
so that -ENODEV is returned instead of hitting a NULL pointer
dereference exception when the MTD instance is later accessed by a user.

Signed-off-by: Boris Brezillon 
---
Changes in v3:
- New patch
---
 drivers/mtd/spi/sf_mtd.c | 39 ---
 1 file changed, 36 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/spi/sf_mtd.c b/drivers/mtd/spi/sf_mtd.c
index aabbc3589435..68c36002bee2 100644
--- a/drivers/mtd/spi/sf_mtd.c
+++ b/drivers/mtd/spi/sf_mtd.c
@@ -18,6 +18,9 @@ static int spi_flash_mtd_erase(struct mtd_info *mtd, struct 
erase_info *instr)
struct spi_flash *flash = mtd->priv;
int err;
 
+   if (!flash)
+   return -ENODEV;
+
instr->state = MTD_ERASING;
 
err = spi_flash_erase(flash, instr->addr, instr->len);
@@ -39,6 +42,9 @@ static int spi_flash_mtd_read(struct mtd_info *mtd, loff_t 
from, size_t len,
struct spi_flash *flash = mtd->priv;
int err;
 
+   if (!flash)
+   return -ENODEV;
+
err = spi_flash_read(flash, from, len, buf);
if (!err)
*retlen = len;
@@ -52,6 +58,9 @@ static int spi_flash_mtd_write(struct mtd_info *mtd, loff_t 
to, size_t len,
struct spi_flash *flash = mtd->priv;
int err;
 
+   if (!flash)
+   return -ENODEV;
+
err = spi_flash_write(flash, to, len, buf);
if (!err)
*retlen = len;
@@ -76,8 +85,13 @@ int spi_flash_mtd_register(struct spi_flash *flash)
 {
int ret;
 
-   if (sf_mtd_registered)
-   del_mtd_device(_mtd_info);
+   if (sf_mtd_registered) {
+   ret = del_mtd_device(_mtd_info);
+   if (ret)
+   return ret;
+
+   sf_mtd_registered = false;
+   }
 
sf_mtd_registered = false;
memset(_mtd_info, 0, sizeof(sf_mtd_info));
@@ -110,5 +124,24 @@ int spi_flash_mtd_register(struct spi_flash *flash)
 
 void spi_flash_mtd_unregister(void)
 {
-   del_mtd_device(_mtd_info);
+   int ret;
+
+   if (!sf_mtd_registered)
+   return;
+
+   ret = del_mtd_device(_mtd_info);
+   if (!ret) {
+   sf_mtd_registered = false;
+   return;
+   }
+
+   /*
+* Setting mtd->priv to NULL is the best we can do. Thanks to that,
+* the MTD layer can still call mtd hooks without risking a
+* use-after-free bug. Still, things should be fixed to prevent the
+* spi_flash object from being destroyed when del_mtd_device() fails.
+*/
+   sf_mtd_info.priv = NULL;
+   printf("Failed to unregister MTD %s and the spi_flash object is going 
away: you're in deep trouble!",
+  sf_mtd_info.name);
 }
-- 
2.17.1

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


[U-Boot] [PATCH v3 10/11] mtd: sf: Unregister the MTD device prior to removing the spi_flash obj

2018-11-19 Thread Boris Brezillon
The DM implementation of spi_flash_free() does not unregister the MTD
device before removing the spi dev object. This leads to a use-after-free
bug when the MTD device is later accessed by a MTD user (observed when
attaching the device to UBI after env_sf_load() has called
spi_flash_free()).

Implement ->remove() and call spi_flash_mtd_unregister() from there.

Fixes: 9fe6d8716e09 ("mtd, spi: Add MTD layer driver")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- New patch
---
 drivers/mtd/spi/sf_probe.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 94fde2ae7a36..4d7320fe8c14 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -137,6 +137,14 @@ static int spi_flash_std_probe(struct udevice *dev)
return spi_flash_probe_slave(flash);
 }
 
+static int spi_flash_std_remove(struct udevice *dev)
+{
+#ifdef CONFIG_SPI_FLASH_MTD
+   spi_flash_mtd_unregister();
+#endif
+   return 0;
+}
+
 static const struct dm_spi_flash_ops spi_flash_std_ops = {
.read = spi_flash_std_read,
.write = spi_flash_std_write,
@@ -153,6 +161,7 @@ U_BOOT_DRIVER(spi_flash_std) = {
.id = UCLASS_SPI_FLASH,
.of_match   = spi_flash_std_ids,
.probe  = spi_flash_std_probe,
+   .remove = spi_flash_std_remove,
.priv_auto_alloc_size = sizeof(struct spi_flash),
.ops= _flash_std_ops,
 };
-- 
2.17.1

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


Re: [U-Boot] [PATCH v3 00/11] mtd/sf: Various fixes

2018-11-19 Thread Boris Brezillon
On Mon, 19 Nov 2018 21:59:44 +0100
Boris Brezillon  wrote:

> Hello,
> 
> This is the 3rd version of the mtd / sf fixes patchset. This v3
> contains 2 new patches fixing bugs in the spi-flash layer.
> 
> With this version I hope to have addressed all the weird interactions
> between the spi-flash and MTD layer (tested on a platform with a
> spi-nor and a spi-nand)
> 
> Heiko, let me know if still issues with this version.

^ you still have

> 
> Thanks,
> 
> Boris
> 
> Boris Brezillon (11):
>   mtd: Add a function to report when the MTD dev list has been updated
>   mtd: Parse mtdparts/mtdids again when the MTD list has been updated
>   mtd: Delete partitions attached to the device when a device is deleted
>   mtd: sf: Make sure we don't register the same device twice
>   mtd: Use get_mtdids() instead of env_get("mtdids") in
> mtd_search_alternate_name()
>   mtd: Be more strict on the "mtdparts=" prefix check
>   mtd: Make sure the name passed in mtdparts fits in mtd_name[]
>   mtd: Make sure we don't parse MTD partitions belonging to another dev
>   mtd: Don't stop MTD partition creation when it fails on one device
>   mtd: sf: Unregister the MTD device prior to removing the spi_flash obj
>   mtd: sf: Make sf_mtd.c more robust
> 
>  drivers/mtd/mtd_uboot.c| 185 +
>  drivers/mtd/mtdcore.c  |  17 +++-
>  drivers/mtd/mtdpart.c  |  12 +++
>  drivers/mtd/spi/sf_mtd.c   |  48 +-
>  drivers/mtd/spi/sf_probe.c |   9 ++
>  include/linux/mtd/mtd.h|  18 
>  6 files changed, 227 insertions(+), 62 deletions(-)
> 

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


[U-Boot] [PATCH v3 08/11] mtd: Make sure we don't parse MTD partitions belonging to another dev

2018-11-19 Thread Boris Brezillon
The mtdparts variable might contain partition definitions for several
MTD devices. Each partition layout is separated by a ';', so let's
make sure we don't pick a wrong name when mtdparts is malformed.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- New patch
---
 drivers/mtd/mtd_uboot.c | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 0eda36278309..6a36948b917b 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -155,6 +155,7 @@ int mtd_probe_devices(void)
static char *old_mtdids;
const char *mtdparts = get_mtdparts();
const char *mtdids = get_mtdids();
+   const char *mtdparts_next = mtdparts;
bool remaining_partitions = true;
struct mtd_info *mtd;
 
@@ -219,13 +220,22 @@ int mtd_probe_devices(void)
mtdparts += 9;
 
/* For each MTD device in mtdparts */
-   while (mtdparts[0] != '\0') {
+   for (; mtdparts[0] != '\0'; mtdparts = mtdparts_next) {
char mtd_name[MTD_NAME_MAX_LEN], *colon;
struct mtd_partition *parts;
unsigned int mtd_name_len;
int nparts, ret;
 
+   mtdparts_next = strchr(mtdparts, ';');
+   if (!mtdparts_next)
+   mtdparts_next = mtdparts + strlen(mtdparts);
+   else
+   mtdparts_next++;
+
colon = strchr(mtdparts, ':');
+   if (colon > mtdparts_next)
+   colon = NULL;
+
if (!colon) {
printf("Wrong mtdparts: %s\n", mtdparts);
return -EINVAL;
@@ -263,10 +273,7 @@ int mtd_probe_devices(void)
if (ret || IS_ERR_OR_NULL(mtd)) {
printf("Could not find a valid device for %s\n",
   mtd_name);
-   mtdparts = strchr(mtdparts, ';');
-   if (mtdparts)
-   mtdparts++;
-
+   mtdparts = mtdparts_next;
continue;
}
}
-- 
2.17.1

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


[U-Boot] [PATCH v3 03/11] mtd: Delete partitions attached to the device when a device is deleted

2018-11-19 Thread Boris Brezillon
If we don't do that, partitions might still be exposed while the
underlying device is gone.

Fixes: 2a74930da57f ("mtd: mtdpart: implement proper partition handling")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- Fix build failures when CONFIG_MTD_PARTITIONS is not enabled
---
 drivers/mtd/mtdcore.c   |  1 +
 include/linux/mtd/mtd.h | 15 +++
 2 files changed, 16 insertions(+)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 7a15ded8c883..46657fe7c949 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -528,6 +528,7 @@ int del_mtd_device(struct mtd_info *mtd)
struct mtd_notifier *not;
 #endif
 
+   del_mtd_partitions(mtd);
mutex_lock(_table_mutex);
 
if (idr_find(_idr, mtd->index) != mtd) {
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index d20ebd820289..4d0096d9f1d8 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -562,8 +562,23 @@ unsigned mtd_mmap_capabilities(struct mtd_info *mtd);
 /* drivers/mtd/mtdcore.h */
 int add_mtd_device(struct mtd_info *mtd);
 int del_mtd_device(struct mtd_info *mtd);
+
+#ifdef CONFIG_MTD_PARTITIONS
 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
 int del_mtd_partitions(struct mtd_info *);
+#else
+static inline int add_mtd_partitions(struct mtd_info *mtd,
+const struct mtd_partition *parts,
+int nparts)
+{
+   return 0;
+}
+
+static inline int del_mtd_partitions(struct mtd_info *mtd)
+{
+   return 0;
+}
+#endif
 
 struct mtd_info *__mtd_next_device(int i);
 #define mtd_for_each_device(mtd)   \
-- 
2.17.1

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


[U-Boot] [PATCH v3 09/11] mtd: Don't stop MTD partition creation when it fails on one device

2018-11-19 Thread Boris Brezillon
MTD partition creation code is a bit tricky. It tries to figure out
when things have changed (either MTD dev list or mtdparts/mtdids vars)
and when that happens it first deletes all the partitions that had been
previously created and then creates the new ones based on the new
mtdparts/mtdids values.
But before deleting the old partitions, it ensures that none of the
currently registered parts are being used and bails out when that's
not the case. So, we end up in a situation where, if at least one MTD
dev has one of its partitions used by someone (UBI for instance), the
partitions update logic no longer works for other devs.

Rework the code to relax the logic and allow updates of MTD parts on
devices that are not being used (we still refuse to updates parts on
devices who have at least one of their partitions used by someone).

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- New patch

Changes in v3:
- Re-create partitions when our last attempt do delete all existing
  parts failed. This way we can update parts after ubi detach has
  been called without having to change mtdparts/mtdids.
---
 drivers/mtd/mtd_uboot.c | 96 +
 drivers/mtd/mtdpart.c   | 12 ++
 include/linux/mtd/mtd.h |  2 +
 3 files changed, 82 insertions(+), 28 deletions(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 6a36948b917b..d638f700d041 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -149,6 +149,54 @@ static const char *get_mtdparts(void)
return mtdparts;
 }
 
+static int mtd_del_parts(struct mtd_info *mtd, bool quiet)
+{
+   int ret;
+
+   if (!mtd_has_partitions(mtd))
+   return 0;
+
+   /* do not delete partitions if they are in use. */
+   if (mtd_partitions_used(mtd)) {
+   if (!quiet)
+   printf("\"%s\" partitions still in use, can't delete 
them\n",
+  mtd->name);
+   return -EACCES;
+   }
+
+   ret = del_mtd_partitions(mtd);
+   if (ret)
+   return ret;
+
+   return 1;
+}
+
+static bool mtd_del_all_parts_failed;
+
+static void mtd_del_all_parts(void)
+{
+   struct mtd_info *mtd;
+   int ret = 0;
+
+   mtd_del_all_parts_failed = false;
+
+   /*
+* It is not safe to remove entries from the mtd_for_each_device loop
+* as it uses idr indexes and the partitions removal is done in bulk
+* (all partitions of one device at the same time), so break and
+* iterate from start each time a new partition is found and deleted.
+*/
+   do {
+   mtd_for_each_device(mtd) {
+   ret = mtd_del_parts(mtd, false);
+   if (ret > 0)
+   break;
+   else if (ret < 0)
+   mtd_del_all_parts_failed = true;
+   }
+   } while (ret > 0);
+}
+
 int mtd_probe_devices(void)
 {
static char *old_mtdparts;
@@ -156,18 +204,19 @@ int mtd_probe_devices(void)
const char *mtdparts = get_mtdparts();
const char *mtdids = get_mtdids();
const char *mtdparts_next = mtdparts;
-   bool remaining_partitions = true;
struct mtd_info *mtd;
 
mtd_probe_uclass_mtd_devs();
 
/*
-* Check if mtdparts/mtdids changed or if the MTD dev list was updated
-* since last call, otherwise: exit
+* Check if mtdparts/mtdids changed, if the MTD dev list was updated
+* or if our previous attempt to delete existing partititions failed.
+* In any of these cases we want to update the partitions, otherwise,
+* everything is up-to-date and we can return 0 directly.
 */
if ((!mtdparts && !old_mtdparts && !mtdids && !old_mtdids) ||
(mtdparts && old_mtdparts && mtdids && old_mtdids &&
-!mtd_dev_list_updated() &&
+!mtd_dev_list_updated() && !mtd_del_all_parts_failed &&
 !strcmp(mtdparts, old_mtdparts) &&
 !strcmp(mtdids, old_mtdids)))
return 0;
@@ -178,32 +227,12 @@ int mtd_probe_devices(void)
old_mtdparts = strdup(mtdparts);
old_mtdids = strdup(mtdids);
 
-   /* If at least one partition is still in use, do not delete anything */
-   mtd_for_each_device(mtd) {
-   if (mtd->usecount) {
-   printf("Partition \"%s\" already in use, aborting\n",
-  mtd->name);
-   return -EACCES;
-   }
-   }
-
/*
-* Everything looks clear, remove all partitions. It is not safe to
-* remove entries from the mtd_for_each_device loop as it uses idr
-* indexes and the partitions removal is done in bulk (all partitions of
-* one device at the same time), so break and iterate 

[U-Boot] [PATCH v3 07/11] mtd: Make sure the name passed in mtdparts fits in mtd_name[]

2018-11-19 Thread Boris Brezillon
The local mtd_name[] variable is limited in size. Return an error if
the name passed in mtdparts does not fit in this local var.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- New patch
---
 drivers/mtd/mtd_uboot.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index d551aee20203..0eda36278309 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -222,8 +222,8 @@ int mtd_probe_devices(void)
while (mtdparts[0] != '\0') {
char mtd_name[MTD_NAME_MAX_LEN], *colon;
struct mtd_partition *parts;
-   int mtd_name_len, nparts;
-   int ret;
+   unsigned int mtd_name_len;
+   int nparts, ret;
 
colon = strchr(mtdparts, ':');
if (!colon) {
@@ -231,7 +231,12 @@ int mtd_probe_devices(void)
return -EINVAL;
}
 
-   mtd_name_len = colon - mtdparts;
+   mtd_name_len = (unsigned int)(colon - mtdparts);
+   if (mtd_name_len + 1 > sizeof(mtd_name)) {
+   printf("MTD name too long: %s\n", mtdparts);
+   return -EINVAL;
+   }
+
strncpy(mtd_name, mtdparts, mtd_name_len);
mtd_name[mtd_name_len] = '\0';
/* Move the pointer forward (including the ':') */
-- 
2.17.1

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


[U-Boot] [PATCH v3 06/11] mtd: Be more strict on the "mtdparts=" prefix check

2018-11-19 Thread Boris Brezillon
strstr() does not guarantee that the string we're searching for is
placed at the beginning. Use strncmp() instead.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- New patch
---
 drivers/mtd/mtd_uboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index c4434d70520d..d551aee20203 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -215,7 +215,7 @@ int mtd_probe_devices(void)
return 0;
 
/* Start the parsing by ignoring the extra 'mtdparts=' prefix, if any */
-   if (strstr(mtdparts, "mtdparts="))
+   if (!strncmp(mtdparts, "mtdparts=", sizeof("mtdparts=") - 1))
mtdparts += 9;
 
/* For each MTD device in mtdparts */
-- 
2.17.1

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


[U-Boot] [PATCH v3 02/11] mtd: Parse mtdparts/mtdids again when the MTD list has been updated

2018-11-19 Thread Boris Brezillon
Updates to the MTD device list should trigger a new parsing of the
mtdids/mtdparts vars even if those vars haven't changed.

Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command")
Signed-off-by: Boris Brezillon 
---
Changes in v3:
- None

Changes in v2:
- None
---
 drivers/mtd/mtd_uboot.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 5ca560c96879..6a3e64395de2 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -161,9 +161,13 @@ int mtd_probe_devices(void)
 
mtd_probe_uclass_mtd_devs();
 
-   /* Check if mtdparts/mtdids changed since last call, otherwise: exit */
+   /*
+* Check if mtdparts/mtdids changed or if the MTD dev list was updated
+* since last call, otherwise: exit
+*/
if ((!mtdparts && !old_mtdparts && !mtdids && !old_mtdids) ||
(mtdparts && old_mtdparts && mtdids && old_mtdids &&
+!mtd_dev_list_updated() &&
 !strcmp(mtdparts, old_mtdparts) &&
 !strcmp(mtdids, old_mtdids)))
return 0;
@@ -201,6 +205,12 @@ int mtd_probe_devices(void)
}
}
 
+   /*
+* Call mtd_dev_list_updated() to clear updates generated by our own
+* parts removal loop.
+*/
+   mtd_dev_list_updated();
+
/* If either mtdparts or mtdids is empty, then exit */
if (!mtdparts || !mtdids)
return 0;
@@ -281,6 +291,12 @@ int mtd_probe_devices(void)
put_mtd_device(mtd);
}
 
+   /*
+* Call mtd_dev_list_updated() to clear updates generated by our own
+* parts registration loop.
+*/
+   mtd_dev_list_updated();
+
return 0;
 }
 #else
-- 
2.17.1

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


[U-Boot] [PATCH v3 05/11] mtd: Use get_mtdids() instead of env_get("mtdids") in mtd_search_alternate_name()

2018-11-19 Thread Boris Brezillon
The environment is not guaranteed to contain a valid mtdids variable
when called from mtd_search_alternate_name(). Call get_mtdids() instead
of env_get("mtdids").

Fixes: ff4afa8a981e ("mtd: uboot: search for an equivalent MTD name with the 
mtdids")
Signed-off-by: Boris Brezillon 
Reviewed-by: Miquel Raynal 
---
Changes in v3:
- None

Changes in v2:
- Add Miquel's R-b
- Move board_mtdparts_default() prototype def to fix a build failure
---
 drivers/mtd/mtd_uboot.c | 49 -
 1 file changed, 24 insertions(+), 25 deletions(-)

diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 6a3e64395de2..c4434d70520d 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -13,6 +13,29 @@
 
 #define MTD_NAME_MAX_LEN 20
 
+void board_mtdparts_default(const char **mtdids, const char **mtdparts);
+
+static const char *get_mtdids(void)
+{
+   __maybe_unused const char *mtdparts = NULL;
+   const char *mtdids = env_get("mtdids");
+
+   if (mtdids)
+   return mtdids;
+
+#if defined(CONFIG_SYS_MTDPARTS_RUNTIME)
+   board_mtdparts_default(, );
+#elif defined(MTDIDS_DEFAULT)
+   mtdids = MTDIDS_DEFAULT;
+#elif defined(CONFIG_MTDIDS_DEFAULT)
+   mtdids = CONFIG_MTDIDS_DEFAULT;
+#endif
+
+   if (mtdids)
+   env_set("mtdids", mtdids);
+
+   return mtdids;
+}
 
 /**
  * mtd_search_alternate_name - Search an alternate name for @mtdname thanks to
@@ -34,7 +57,7 @@ int mtd_search_alternate_name(const char *mtdname, char 
*altname,
const char *mtdids, *equal, *comma, *dev_id, *mtd_id;
int dev_id_len, mtd_id_len;
 
-   mtdids = env_get("mtdids");
+   mtdids = get_mtdids();
if (!mtdids)
return -EINVAL;
 
@@ -92,30 +115,6 @@ static void mtd_probe_uclass_mtd_devs(void) { }
 #endif
 
 #if defined(CONFIG_MTD_PARTITIONS)
-extern void board_mtdparts_default(const char **mtdids,
-  const char **mtdparts);
-
-static const char *get_mtdids(void)
-{
-   __maybe_unused const char *mtdparts = NULL;
-   const char *mtdids = env_get("mtdids");
-
-   if (mtdids)
-   return mtdids;
-
-#if defined(CONFIG_SYS_MTDPARTS_RUNTIME)
-   board_mtdparts_default(, );
-#elif defined(MTDIDS_DEFAULT)
-   mtdids = MTDIDS_DEFAULT;
-#elif defined(CONFIG_MTDIDS_DEFAULT)
-   mtdids = CONFIG_MTDIDS_DEFAULT;
-#endif
-
-   if (mtdids)
-   env_set("mtdids", mtdids);
-
-   return mtdids;
-}
 
 #define MTDPARTS_MAXLEN 512
 
-- 
2.17.1

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


[U-Boot] [PATCH v3 01/11] mtd: Add a function to report when the MTD dev list has been updated

2018-11-19 Thread Boris Brezillon
We need to parse mtdparts/mtids again everytime a device has been
added/removed from the MTD list, but there's currently no way to know
when such an update has been done.

Add an ->updated field to the idr struct that we set to true every time
a device is added/removed and expose a function returning the value
of this field and resetting it to false.

Signed-off-by: Boris Brezillon 
---
Changes in v2:
- None
---
 drivers/mtd/mtdcore.c   | 16 +++-
 include/linux/mtd/mtd.h |  1 +
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index fb6c779abbfe..7a15ded8c883 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -87,14 +87,17 @@ struct idr_layer {
 
 struct idr {
struct idr_layer id[MAX_IDR_ID];
+   bool updated;
 };
 
 #define DEFINE_IDR(name)   struct idr name;
 
 void idr_remove(struct idr *idp, int id)
 {
-   if (idp->id[id].used)
+   if (idp->id[id].used) {
idp->id[id].used = 0;
+   idp->updated = true;
+   }
 
return;
 }
@@ -134,6 +137,7 @@ int idr_alloc(struct idr *idp, void *ptr, int start, int 
end, gfp_t gfp_mask)
if (idl->used == 0) {
idl->used = 1;
idl->ptr = ptr;
+   idp->updated = true;
return i;
}
i++;
@@ -155,6 +159,16 @@ struct mtd_info *__mtd_next_device(int i)
 }
 EXPORT_SYMBOL_GPL(__mtd_next_device);
 
+bool mtd_dev_list_updated(void)
+{
+   if (mtd_idr.updated) {
+   mtd_idr.updated = false;
+   return true;
+   }
+
+   return false;
+}
+
 #ifndef __UBOOT__
 static LIST_HEAD(mtd_notifiers);
 
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 68e591532492..d20ebd820289 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -581,6 +581,7 @@ int mtd_arg_off_size(int argc, char *const argv[], int 
*idx, loff_t *off,
 void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
  const uint64_t length, uint64_t *len_incl_bad,
  int *truncated);
+bool mtd_dev_list_updated(void);
 
 /* drivers/mtd/mtd_uboot.c */
 int mtd_search_alternate_name(const char *mtdname, char *altname,
-- 
2.17.1

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


[U-Boot] [PATCH v3 00/11] mtd/sf: Various fixes

2018-11-19 Thread Boris Brezillon
Hello,

This is the 3rd version of the mtd / sf fixes patchset. This v3
contains 2 new patches fixing bugs in the spi-flash layer.

With this version I hope to have addressed all the weird interactions
between the spi-flash and MTD layer (tested on a platform with a
spi-nor and a spi-nand)

Heiko, let me know if still issues with this version.

Thanks,

Boris

Boris Brezillon (11):
  mtd: Add a function to report when the MTD dev list has been updated
  mtd: Parse mtdparts/mtdids again when the MTD list has been updated
  mtd: Delete partitions attached to the device when a device is deleted
  mtd: sf: Make sure we don't register the same device twice
  mtd: Use get_mtdids() instead of env_get("mtdids") in
mtd_search_alternate_name()
  mtd: Be more strict on the "mtdparts=" prefix check
  mtd: Make sure the name passed in mtdparts fits in mtd_name[]
  mtd: Make sure we don't parse MTD partitions belonging to another dev
  mtd: Don't stop MTD partition creation when it fails on one device
  mtd: sf: Unregister the MTD device prior to removing the spi_flash obj
  mtd: sf: Make sf_mtd.c more robust

 drivers/mtd/mtd_uboot.c| 185 +
 drivers/mtd/mtdcore.c  |  17 +++-
 drivers/mtd/mtdpart.c  |  12 +++
 drivers/mtd/spi/sf_mtd.c   |  48 +-
 drivers/mtd/spi/sf_probe.c |   9 ++
 include/linux/mtd/mtd.h|  18 
 6 files changed, 227 insertions(+), 62 deletions(-)

-- 
2.17.1

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


[U-Boot] [PATCH] ARM: armv7: Add early stack for erratum workarounds

2018-11-19 Thread Andrew F. Davis
Some erratum workarounds call into C code before the stack
is setup, this can lead to values pushed onto the stack
being lost, firewall exceptions, and other undefined behavior.

Setup a temporary stack to allow these functions to work
correctly.

Signed-off-by: Andrew F. Davis 
---
 arch/arm/cpu/armv7/start.S | 9 +
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 81edec01bf..0cb6dd39cc 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -205,6 +205,15 @@ ENTRY(cpu_init_cp15)
mov r2, r3, lsl #4  @ shift variant field for combined value
orr r2, r4, r2  @ r2 has combined CPU variant + revision
 
+/* Early stack for ERRATA that needs into call C code */
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
+   ldr r0, =(CONFIG_SPL_STACK)
+#else
+   ldr r0, =(CONFIG_SYS_INIT_SP_ADDR)
+#endif
+   bic r0, r0, #7  /* 8-byte alignment for ABI compliance */
+   mov sp, r0
+
 #ifdef CONFIG_ARM_ERRATA_798870
cmp r2, #0x30   @ Applies to lower than R3p0
bge skip_errata_798870  @ skip if not affected rev
-- 
2.19.1

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


Re: [U-Boot] [PATCH][v2] armv8: lx2160ardb : Add support for LX2160ARDB platform

2018-11-19 Thread York Sun
On 10/29/18 2:30 AM, Priyanka Jain wrote:
> LX2160ARDB is an evaluation board that supports LX2160A
> family SoCs. This patch add base support for this board.
> 
> Signed-off-by: Wasim Khan 
> Signed-off-by: Yogesh Gaur 
> Signed-off-by: Meenakshi Aggarwal 
> Signed-off-by: Vabhav Sharma 
> Signed-off-by: Sriram Dash 
> Signed-off-by: Rajesh Bhagat 
> Signed-off-by: Pankit Garg 
> Signed-off-by: Priyanka Jain 
> ---
> Changes for v2:
>  Rebased on top of test_qoriq branch of u-boot-fsl-qoriq.git
> 
>  Corrected line
>   seria01.clock = get_serial_clock ->  serial1.clock = get_serial_clock();
> 
>  Corrected CONFIG_ENV_OFFSET to 0x50 [Thanks to Ashish K for pointing 
> this]
> 

Priyanka,

I am seeing compiling error

../board/freescale/lx2160a/eth_lx2160ardb.c:71:3: error: too few
arguments to function ?wriop_set_phy_address?

Please also check the patches I collected here
http://patchwork.ozlabs.org/bundle/yorksun/lx2/ and confirm the
dependency and order.

York

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


[U-Boot] [PATCH v3 5/5] usb: storage: s/CONFIG_BLK/CONFIG_IS_ENABLED(BLK)/

2018-11-19 Thread Sven Schwermer
This fixes link issues when building the SPL without USB driver model
but with USB storage support. CONFIG_BLK can be enabled and disabled
independently for SPL and non-SPL builds. We leverage that existing
functionality here.

Signed-off-by: Sven Schwermer 
---
 common/usb_storage.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index c9a99b1ca2..8c889bb1a6 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -66,7 +66,7 @@ static __u32 CBWTag;
 
 static int usb_max_devs; /* number of highest available usb device */
 
-#ifndef CONFIG_BLK
+#if !CONFIG_IS_ENABLED(BLK)
 static struct blk_desc usb_dev_desc[USB_MAX_STOR_DEV];
 #endif
 
@@ -99,7 +99,7 @@ struct us_data {
unsigned short  max_xfer_blk;   /* maximum transfer blocks */
 };
 
-#ifndef CONFIG_BLK
+#if !CONFIG_IS_ENABLED(BLK)
 static struct us_data usb_stor[USB_MAX_STOR_DEV];
 #endif
 
@@ -111,7 +111,7 @@ int usb_stor_get_info(struct usb_device *dev, struct 
us_data *us,
  struct blk_desc *dev_desc);
 int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,
  struct us_data *ss);
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
 static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr,
   lbaint_t blkcnt, void *buffer);
 static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr,
@@ -136,7 +136,7 @@ static void usb_show_progress(void)
 int usb_stor_info(void)
 {
int count = 0;
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
struct udevice *dev;
 
for (blk_first_device(IF_TYPE_USB, );
@@ -186,7 +186,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
 {
int lun, max_lun;
 
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
struct us_data *data;
int ret;
 #else
@@ -197,7 +197,7 @@ static int usb_stor_probe_device(struct usb_device *udev)
 #endif
 
debug("\n\nProbing for storage\n");
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
/*
 * We store the us_data in the mass storage device's platdata. It
 * is shared by all LUNs (block devices) attached to this mass storage
@@ -1119,7 +1119,7 @@ static void usb_bin_fixup(struct usb_device_descriptor 
descriptor,
 }
 #endif /* CONFIG_USB_BIN_FIXUP */
 
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
 static unsigned long usb_stor_read(struct udevice *dev, lbaint_t blknr,
   lbaint_t blkcnt, void *buffer)
 #else
@@ -1134,14 +1134,14 @@ static unsigned long usb_stor_read(struct blk_desc 
*block_dev, lbaint_t blknr,
struct us_data *ss;
int retry;
struct scsi_cmd *srb = _ccb;
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
struct blk_desc *block_dev;
 #endif
 
if (blkcnt == 0)
return 0;
/* Setup  device */
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
block_dev = dev_get_uclass_platdata(dev);
udev = dev_get_parent_priv(dev_get_parent(dev));
debug("\nusb_read: udev %d\n", block_dev->devnum);
@@ -1200,7 +1200,7 @@ retry_it:
return blkcnt;
 }
 
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
 static unsigned long usb_stor_write(struct udevice *dev, lbaint_t blknr,
lbaint_t blkcnt, const void *buffer)
 #else
@@ -1215,7 +1215,7 @@ static unsigned long usb_stor_write(struct blk_desc 
*block_dev, lbaint_t blknr,
struct us_data *ss;
int retry;
struct scsi_cmd *srb = _ccb;
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
struct blk_desc *block_dev;
 #endif
 
@@ -1223,7 +1223,7 @@ static unsigned long usb_stor_write(struct blk_desc 
*block_dev, lbaint_t blknr,
return 0;
 
/* Setup  device */
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
block_dev = dev_get_uclass_platdata(dev);
udev = dev_get_parent_priv(dev_get_parent(dev));
debug("\nusb_read: udev %d\n", block_dev->devnum);
@@ -1519,7 +1519,7 @@ U_BOOT_DRIVER(usb_mass_storage) = {
.id = UCLASS_MASS_STORAGE,
.of_match = usb_mass_storage_ids,
.probe = usb_mass_storage_probe,
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
.platdata_auto_alloc_size   = sizeof(struct us_data),
 #endif
 };
@@ -1540,7 +1540,7 @@ static const struct usb_device_id mass_storage_id_table[] 
= {
 U_BOOT_USB_DEVICE(usb_mass_storage, mass_storage_id_table);
 #endif
 
-#ifdef CONFIG_BLK
+#if CONFIG_IS_ENABLED(BLK)
 static const struct blk_ops usb_storage_ops = {
.read   = usb_stor_read,
.write  = usb_stor_write,
-- 
2.17.1

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


Re: [U-Boot] [PATCH v3] fsl-lsch3: soc: Enable AHB read support for Flexspi controller

2018-11-19 Thread York Sun
On 11/12/18 11:26 PM, Ashish Kumar wrote:
> Enable AHB support for Flexspi controller interface meaning
> memory can be accessed via md command using absolute addresses
> 
> Signed-off-by: Yogesh Gaur 
> Signed-off-by: Rajat Srivastava 
> Signed-off-by: Ashish Kumar 
> ---
> v3:
> Depends upon http://patchwork.ozlabs.org/patch/975009/

Your v3 patch depends on its v2 version. This doesn't make sense.

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


[U-Boot] [PATCH v3 3/5] usb: Remove CMD_USB dependency for common code

2018-11-19 Thread Sven Schwermer
Common USB code is built whenever USB is enabled (in non-SPL builds).
The USB uclass is built whenever (SPL_)DM_USB is enabled. Both need to
be independent from CMD_USB.

Signed-off-by: Sven Schwermer 
---
 common/Makefile   | 2 +-
 drivers/usb/host/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/Makefile b/common/Makefile
index a2388364d9..7d88077930 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -33,7 +33,7 @@ obj-$(CONFIG_MII) += miiphyutil.o
 obj-$(CONFIG_CMD_MII) += miiphyutil.o
 obj-$(CONFIG_PHYLIB) += miiphyutil.o
 
-ifdef CONFIG_CMD_USB
+ifdef CONFIG_USB
 obj-y += usb.o usb_hub.o
 obj-$(CONFIG_USB_STORAGE) += usb_storage.o
 endif
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index bfa565c4c3..285c20ae86 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -4,7 +4,7 @@
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 
 ifdef CONFIG_$(SPL_)DM_USB
-obj-$(CONFIG_CMD_USB) += usb-uclass.o
+obj-y += usb-uclass.o
 obj-$(CONFIG_SANDBOX) += usb-sandbox.o
 endif
 
-- 
2.17.1

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


[U-Boot] [PATCH v3 0/5] usb: Introduce CONFIG_SPL_DM_USB

2018-11-19 Thread Sven Schwermer
This solves the dependency problem I described in [1].

[1]: http://u-boot.10912.n7.nabble.com/-td347224.html

Version 3:
* Reordered patches.
* Split out CMD_USB dependency patch.
* Verified that no patch breaks the Travis CI build.
* Added missing commit comments.
* Verified that all AM33xx boards still build.

Version 2:
* Globally replace CONFIG_DM_USB
* Split the CONFIG_DM_USB replacement into separate patch
* Fix am335x_evm build

Sven Schwermer (5):
  usb: Introduce CONFIG_SPL_DM_USB
  usb: am335x_evm: Disable CONFIG_SPL_DM_USB
  usb: Remove CMD_USB dependency for common code
  usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/
  usb: storage: s/CONFIG_BLK/CONFIG_IS_ENABLED(BLK)/

 common/Makefile   |  2 +-
 common/usb.c  | 14 ++---
 common/usb_hub.c  | 16 +++
 common/usb_kbd.c  |  4 ++--
 common/usb_storage.c  | 34 +++
 configs/am335x_evm_defconfig  |  3 ++-
 drivers/usb/Kconfig   |  5 +
 drivers/usb/common/Makefile   |  2 +-
 drivers/usb/dwc3/core.c   |  2 +-
 drivers/usb/dwc3/core.h   |  2 +-
 drivers/usb/eth/usb_ether.c   |  2 +-
 drivers/usb/gadget/ci_udc.c   |  2 +-
 drivers/usb/gadget/ether.c|  8 
 drivers/usb/host/Makefile |  4 ++--
 drivers/usb/host/dwc2.c   | 12 +--
 drivers/usb/host/ehci-atmel.c |  2 +-
 drivers/usb/host/ehci-fsl.c   | 12 +--
 drivers/usb/host/ehci-hcd.c   | 12 +--
 drivers/usb/host/ehci-marvell.c   |  4 ++--
 drivers/usb/host/ehci-mx6.c   |  2 +-
 drivers/usb/host/ehci-pci.c   |  8 
 drivers/usb/host/ehci-vf.c|  2 +-
 drivers/usb/host/ohci-hcd.c   | 10 -
 drivers/usb/host/ohci.h   |  4 ++--
 drivers/usb/host/xhci-dwc3.c  |  2 +-
 drivers/usb/host/xhci-fsl.c   |  4 ++--
 drivers/usb/host/xhci-mem.c   |  6 +++---
 drivers/usb/host/xhci.c   | 12 +--
 drivers/usb/host/xhci.h   |  2 +-
 drivers/usb/musb-new/musb_uboot.c | 12 +--
 drivers/usb/musb-new/omap2430.c   |  4 ++--
 drivers/usb/musb-new/ti-musb.c|  4 ++--
 drivers/usb/musb-new/usb-compat.h |  2 +-
 include/usb.h | 12 +--
 34 files changed, 117 insertions(+), 111 deletions(-)

-- 
2.17.1

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


[U-Boot] [PATCH v3 4/5] usb: s/CONFIG_DM_USB/CONFIG_IS_ENABLED(DM_USB)/

2018-11-19 Thread Sven Schwermer
This allows to disable the USB driver model in SPL because it checks
the CONFIG_SPL_DM_USB variable for SPL builds. Nothing changes for
regular non-SPL builds.

Signed-off-by: Sven Schwermer 
---
 common/usb.c  | 14 +++---
 common/usb_hub.c  | 16 
 common/usb_kbd.c  |  4 ++--
 common/usb_storage.c  |  6 +++---
 drivers/usb/dwc3/core.c   |  2 +-
 drivers/usb/dwc3/core.h   |  2 +-
 drivers/usb/eth/usb_ether.c   |  2 +-
 drivers/usb/gadget/ci_udc.c   |  2 +-
 drivers/usb/gadget/ether.c|  8 
 drivers/usb/host/dwc2.c   | 12 ++--
 drivers/usb/host/ehci-atmel.c |  2 +-
 drivers/usb/host/ehci-fsl.c   | 12 ++--
 drivers/usb/host/ehci-hcd.c   | 12 ++--
 drivers/usb/host/ehci-marvell.c   |  4 ++--
 drivers/usb/host/ehci-mx6.c   |  2 +-
 drivers/usb/host/ehci-pci.c   |  8 
 drivers/usb/host/ehci-vf.c|  2 +-
 drivers/usb/host/ohci-hcd.c   | 10 +-
 drivers/usb/host/ohci.h   |  4 ++--
 drivers/usb/host/xhci-dwc3.c  |  2 +-
 drivers/usb/host/xhci-fsl.c   |  4 ++--
 drivers/usb/host/xhci-mem.c   |  6 +++---
 drivers/usb/host/xhci.c   | 12 ++--
 drivers/usb/host/xhci.h   |  2 +-
 drivers/usb/musb-new/musb_uboot.c | 12 ++--
 drivers/usb/musb-new/omap2430.c   |  4 ++--
 drivers/usb/musb-new/ti-musb.c|  4 ++--
 drivers/usb/musb-new/usb-compat.h |  2 +-
 include/usb.h | 12 ++--
 29 files changed, 92 insertions(+), 92 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 78178c54c8..b70f614d24 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -42,7 +42,7 @@
 static int asynch_allowed;
 char usb_started; /* flag for the started/stopped USB status */
 
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
 static struct usb_device usb_dev[USB_MAX_DEVICE];
 static int dev_index;
 
@@ -183,7 +183,7 @@ int usb_disable_asynch(int disable)
asynch_allowed = !disable;
return old_value;
 }
-#endif /* !CONFIG_DM_USB */
+#endif /* !CONFIG_IS_ENABLED(DM_USB) */
 
 
 /*---
@@ -849,7 +849,7 @@ int usb_string(struct usb_device *dev, int index, char 
*buf, size_t size)
  * the USB device are static allocated [USB_MAX_DEVICE].
  */
 
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
 
 /* returns a pointer to the device with the index [index].
  * if the device is not assigned (dev->devnum==-1) returns NULL
@@ -906,7 +906,7 @@ __weak int usb_alloc_device(struct usb_device *udev)
 {
return 0;
 }
-#endif /* !CONFIG_DM_USB */
+#endif /* !CONFIG_IS_ENABLED(DM_USB) */
 
 static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub)
 {
@@ -1166,7 +1166,7 @@ int usb_setup_device(struct usb_device *dev, bool do_read,
return ret;
 }
 
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
 /*
  * By the time we get here, the device has gotten a new device ID
  * and is in the default state. We need to identify the thing and
@@ -1215,14 +1215,14 @@ int board_usb_cleanup(int index, enum usb_init_type 
init)
 
 bool usb_device_has_child_on_port(struct usb_device *parent, int port)
 {
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
return false;
 #else
return parent->children[port] != NULL;
 #endif
 }
 
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
 void usb_find_usb2_hub_address_port(struct usb_device *udev,
   uint8_t *hub_address, uint8_t *hub_port)
 {
diff --git a/common/usb_hub.c b/common/usb_hub.c
index e1d93b8333..33aaeb8e44 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -64,7 +64,7 @@ static inline bool usb_hub_is_superspeed(struct usb_device 
*hdev)
return hdev->descriptor.bDeviceProtocol == 3;
 }
 
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
 bool usb_hub_is_root_hub(struct udevice *hub)
 {
if (device_get_uclass_id(hub->parent) != UCLASS_USB_HUB)
@@ -125,7 +125,7 @@ int usb_get_port_status(struct usb_device *dev, int port, 
void *data)
USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port,
data, sizeof(struct usb_port_status), USB_CNTL_TIMEOUT);
 
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
if (ret < 0)
return ret;
 
@@ -209,7 +209,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
  max(100, (int)pgood_delay) + 1000);
 }
 
-#ifndef CONFIG_DM_USB
+#if !CONFIG_IS_ENABLED(DM_USB)
 static struct usb_hub_device hub_dev[USB_MAX_HUB];
 static int usb_hub_index;
 
@@ -273,7 +273,7 @@ static int usb_hub_port_reset(struct usb_device *dev, int 
port,
unsigned short portstatus, portchange;
int delay = HUB_SHORT_RESET_TIME; /* start with short reset delay */
 
-#ifdef CONFIG_DM_USB
+#if CONFIG_IS_ENABLED(DM_USB)
debug("%s: resetting '%s' 

[U-Boot] [PATCH v3 2/5] usb: am335x_evm: Disable CONFIG_SPL_DM_USB

2018-11-19 Thread Sven Schwermer
This configuration doesn't use USB in the SPL, so we need to disable
driver model for USB in the SPL.

Signed-off-by: Sven Schwermer 
---
 configs/am335x_evm_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index b6cd49a469..6cc170ad40 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -40,15 +40,16 @@ CONFIG_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_ETH=y
-CONFIG_DRIVER_TI_CPSW=y
 CONFIG_PHY_GIGE=y
 CONFIG_MII=y
+CONFIG_DRIVER_TI_CPSW=y
 CONFIG_SPI=y
 CONFIG_OMAP3_SPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+# CONFIG_SPL_DM_USB is not set
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_USB_MUSB_TI=y
-- 
2.17.1

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


[U-Boot] [PATCH v3 1/5] usb: Introduce CONFIG_SPL_DM_USB

2018-11-19 Thread Sven Schwermer
This allows building the SPL without driver model for USB. Since
CONFIG_SPL_DM_USB is enabled if and only if CONFIG_DM_USB was enabled
before, this patch does not change the build behaviour.

Signed-off-by: Sven Schwermer 
---
 drivers/usb/Kconfig | 5 +
 drivers/usb/common/Makefile | 2 +-
 drivers/usb/host/Makefile   | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 4fbe172e05..03746dd12f 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -47,6 +47,11 @@ config DM_USB
  declared with the U_BOOT_USB_DEVICE() macro and will be
  automatically probed when found on the bus.
 
+config SPL_DM_USB
+   bool "Enable driver model for USB in SPL"
+   depends on DM_USB
+   default y
+
 source "drivers/usb/host/Kconfig"
 
 source "drivers/usb/dwc3/Kconfig"
diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile
index 55e0547b16..3bedbf213f 100644
--- a/drivers/usb/common/Makefile
+++ b/drivers/usb/common/Makefile
@@ -3,6 +3,6 @@
 # (C) Copyright 2016 Freescale Semiconductor, Inc.
 #
 
-obj-$(CONFIG_DM_USB) += common.o
+obj-$(CONFIG_$(SPL_)DM_USB) += common.o
 obj-$(CONFIG_USB_EHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
 obj-$(CONFIG_USB_XHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index cb8c315a15..bfa565c4c3 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -3,7 +3,7 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 
-ifdef CONFIG_DM_USB
+ifdef CONFIG_$(SPL_)DM_USB
 obj-$(CONFIG_CMD_USB) += usb-uclass.o
 obj-$(CONFIG_SANDBOX) += usb-sandbox.o
 endif
-- 
2.17.1

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


Re: [U-Boot] [PATCH v6 00/27] TF-A Boot support for NXP Chassis 2 platforms

2018-11-19 Thread York Sun
On 11/5/18 10:01 AM, Rajesh Bhagat wrote:
> Includes changes in u-boot framework to support TF-A for NXP Chassis 2
> platforms. A new defconfig is added namely ls*_tfa_defconfig which will
> be used for all boot sources when TF-A is used.   
>   
>   
>   
> Tested on LS1043A, LS1046A and LS1012A platforms.
> 
> Changes in v6:
>  - Rebased to master 

Rajesh,

I suggest you resend this set with patman, or manually run
get_maintainer.pl for each patch. There are several patches change
common files for env. It is good to keep other maintainers in the loop.

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


Re: [U-Boot] [PATCH 00/93] dm: Move towards completing CONFIG_BLK migration

2018-11-19 Thread Adam Ford
On Mon, Nov 19, 2018 at 12:36 PM Tom Rini  wrote:
>
> On Mon, Nov 19, 2018 at 10:54 AM Simon Glass  wrote:
> >
> > All boards should now be migrated to use CONFIG_BLK. This series removes
> > those with build problems using this option.
> >
> > If maintainers want to keep these boards in they should send a patch in
> > the next week or two. Otherwise the board will be removed in the next
> > release, and will need to be added and re-reviewed later.
> >
> > The goal is to have all boards use driver model. But so far, we do allow
> > CONFIG_DM to not be defined.
> >
> > PLEASE NOTE: This is not an easy process. It is possible that your board
> > does work, or works with only minor changes. Please try to understand that
> > the removal of a board is not done because people don't like your board.
> > In fact the board might have been the first one I used when trying out
> > U-Boot! It's just that we expect maintainers to keep up with the migration
> > to driver model which has been running now for 4 years. It just isn't
> > possible for a few people to migrate and test hundreds of boards.
> >
> > So, send a patch!
>
> OK, so with the intention of "need to light a fire", consider the fire
> lit!  But, I think v2 of this series needs to:
> - Address the bug that's been noted of you checking on "DM_BLK" when
>   it's really just "BLK".
> - Do a test build with BLK just being unconditional now.  For example,
>   you're deleting the am335x_evm family but it builds fine with BLK
>   being enabled now.  I even gave it a run time test via test.py and
>   we're fine.  So, I think a new run where you see what fails to build
>   with BLK enabled by default now is in order to come up with a new
>   delete list.
>

When we were migrating toward GCC 6, we introduced a warning message
that was displayed at build indicating older versions of GCC would be
unsupported, and GCC 6 would become a requirement.  The
CONFIG_DM_I2C_COMPAT generates a build warning and suggests that it be
removed.  I would like to propose that in the future, when setting
deadlines, we insert something into the build mechanism that generates
a warning to tell people that something is going to happen.

Just my 2-cents.

adam
> Thanks!
>
> --
> Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v14 0/4] efi_loader: Code refactoring and improvement

2018-11-19 Thread Heinrich Schuchardt
On 11/19/18 2:49 AM, Simon Glass wrote:
> Hi Heinrich,
> 
> On Sun, 18 Nov 2018 at 08:20, Simon Glass  wrote:
>>
>> Hi Alex,
>>
>> On Wed, 14 Nov 2018 at 16:11, Simon Glass  wrote:
>>>
>>> This collects the patches previously sent to break up the very large
>>> functions in efi_loader into smaller pieces. Now that the other sandbox
>>> stuff is applied, perhaps it is time to apply these patches.
>>>
>>> This also adds a few new patches to fix more recent breakages.
>>> Unfortunately we still cannot enable the efi loader tests since one of
>>> the tests fails. Thus we should expect additional failures to appear
>>> until that is resolved.
>>>
>>> Changes in v14:
>>> - Fix condition for invalid pointer
>>> - Go back to the horrible long variable names
>>> - Hopefully correct error paths in do_bootefi_exec()
>>
>> Any thoughts on this series please?
> 
> Could you please take another look at this? I would very much like to
> put it to bed.
> 
> Regards,
> Simon
> 

Refactoring into shorter functions makes sense to me.

The errors I mentioned in the review comments for the individual patches
were not introduced by you but we should not simply copy but correct them.

Best regards

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


Re: [U-Boot] [PATCH v14 4/4] efi: Rename bootefi_test_finish() to bootefi_run_finish()

2018-11-19 Thread Heinrich Schuchardt
On 11/15/18 12:11 AM, Simon Glass wrote:
> This function can be used from do_bootefi_exec() so that we use mostly the
> same code for a normal EFI application and an EFI test.
> 
> Rename the function and use it in both places.
> 
> Signed-off-by: Simon Glass 
> ---
> 
> Changes in v14:
> - Go back to the horrible long variable names
> - Hopefully correct error paths in do_bootefi_exec()
> 
> Changes in v13:
> - Drop 'efi_loader: Drop setup_ok' as we have an existing patch for that
> - Drop patches previously applied
> 
> Changes in v12: None
> Changes in v11:
> - Drop patches previously applied
> 
> Changes in v9: None
> Changes in v7:
> - Drop patch "efi: Init the 'rows' and 'cols' variables"
> - Drop patches previous applied
> 
> Changes in v5:
> - Rebase to master
> 
> Changes in v4:
> - Rebase to master
> 
> Changes in v3:
> - Add new patch to rename bootefi_test_finish() to bootefi_run_finish()
> 
>  cmd/bootefi.c | 46 --
>  1 file changed, 24 insertions(+), 22 deletions(-)
> 
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index ab7ada9f2d6..a627f689f95 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -350,6 +350,20 @@ static efi_status_t bootefi_run_prepare(const char 
> *load_options_path,
>   return 0;
>  }
>  
> +/**
> + * bootefi_run_finish() - finish up after running an EFI test
> + *
> + * @loaded_image_info: Pointer to a struct which holds the loaded image info
> + * @image_objj: Pointer to a struct which holds the loaded image object
> + */
> +static void bootefi_run_finish(struct efi_loaded_image_obj *image_obj,
> +struct efi_loaded_image *loaded_image_info)
> +{
> + efi_restore_gd();
> + free(loaded_image_info->load_options);
> + efi_delete_handle(_obj->header);
> +}
> +
>  /**
>   * do_bootefi_exec() - execute EFI binary
>   *
> @@ -390,11 +404,11 @@ static efi_status_t do_bootefi_exec(void *efi,
>*/
>   ret = efi_create_handle(_handle);
>   if (ret != EFI_SUCCESS)
> - goto exit;

You are leaking a device path.

Best regards

Heinrich

> + return ret;
>   ret = efi_add_protocol(mem_handle, _guid_device_path,
>  device_path);
>   if (ret != EFI_SUCCESS)
> - goto exit;
> + goto err_add_protocol;
>   } else {
>   assert(device_path && image_path);
>   }
> @@ -402,13 +416,13 @@ static efi_status_t do_bootefi_exec(void *efi,
>   ret = bootefi_run_prepare("bootargs", device_path, image_path,
> _obj, _image_info);
>   if (ret)
> - return ret;
> + goto err_prepare;
>  
>   /* Load the EFI payload */
>   entry = efi_load_pe(image_obj, efi, loaded_image_info);
>   if (!entry) {
>   ret = EFI_LOAD_ERROR;
> - goto exit;
> + goto err_prepare;
>   }
>  
>   if (memdp) {
> @@ -428,7 +442,7 @@ static efi_status_t do_bootefi_exec(void *efi,
>  
>   if (setjmp(_obj->exit_jmp)) {
>   ret = image_obj->exit_status;
> - goto exit;
> + goto err_prepare;
>   }
>  
>  #ifdef CONFIG_ARM64
> @@ -466,10 +480,11 @@ static efi_status_t do_bootefi_exec(void *efi,
>  
>   ret = efi_do_enter(_obj->header, , entry);
>  
> -exit:
> +err_prepare:
>   /* image has returned, loaded-image obj goes *poof*: */
> - if (image_obj)
> - efi_delete_handle(_obj->header);
> + bootefi_run_finish(image_obj, loaded_image_info);
> +
> +err_add_protocol:
>   if (mem_handle)
>   efi_delete_handle(mem_handle);
>  
> @@ -510,19 +525,6 @@ static efi_status_t bootefi_test_prepare(
>  loaded_image_infop);
>  }
>  
> -/**
> - * bootefi_test_finish() - finish up after running an EFI test
> - *
> - * @image_obj: Pointer to a struct which holds the loaded image object
> - * @loaded_image_info: Pointer to a struct which holds the loaded image info
> - */
> -static void bootefi_test_finish(struct efi_loaded_image_obj *image_obj,
> - struct efi_loaded_image *loaded_image_info)
> -{
> - efi_restore_gd();
> - free(loaded_image_info->load_options);
> - efi_delete_handle(_obj->header);
> -}
>  #endif /* CONFIG_CMD_BOOTEFI_SELFTEST */
>  
>  static int do_bootefi_bootmgr_exec(void)
> @@ -607,7 +609,7 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>  
>   /* Execute the test */
>   r = efi_selftest(_obj->header, );
> - bootefi_test_finish(image_obj, loaded_image_info);
> + bootefi_run_finish(image_obj, loaded_image_info);
>   return r != EFI_SUCCESS;
>   } else
>  #endif
> 

___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [PATCH v14 3/4] efi: Create a function to set up for running EFI code

2018-11-19 Thread Heinrich Schuchardt
On 11/15/18 12:11 AM, Simon Glass wrote:
> There is still duplicated code in efi_loader for tests and normal
> operation.
> 
> Add a new bootefi_run_prepare() function which holds common code used to
> set up U-Boot to run EFI code. Make use of this from the existing
> bootefi_test_prepare() function, as well as do_bootefi_exec().
> 
> Also shorten a few variable names.
> 
> Signed-off-by: Simon Glass 
> ---
> 
> Changes in v14:
> - Go back to the horrible long variable names
> 
> Changes in v13: None
> Changes in v12: None
> Changes in v11: None
> Changes in v9: None
> Changes in v7: None
> Changes in v5:
> - Drop call to efi_init_obj_list() which is now done in do_bootefi()
> - Introduce load_options_path to specifyc U-Boot env var for load_options_path
> 
> Changes in v4:
> - Rebase to master
> 
> Changes in v3:
> - Add patch to create a function to set up for running EFI code
> 
>  cmd/bootefi.c | 63 ++-
>  1 file changed, 37 insertions(+), 26 deletions(-)
> 
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index b633e956c23..ab7ada9f2d6 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -325,6 +325,31 @@ static efi_status_t efi_install_fdt(ulong fdt_addr)
>   return ret;
>  }
>  
> +static efi_status_t bootefi_run_prepare(const char *load_options_path,
> + struct efi_device_path *device_path,
> + struct efi_device_path *image_path,
> + struct efi_loaded_image_obj **image_objp,
> + struct efi_loaded_image **loaded_image_infop)
> +{
> + efi_status_t ret;
> +
> + ret = efi_setup_loaded_image(device_path, image_path, image_objp,
> +  loaded_image_infop);
> + if (ret != EFI_SUCCESS)
> + return ret;
> +
> + /*
> +  * gd lives in a fixed register which may get clobbered while we execute
> +  * the payload. So save it here and restore it on every callback entry
> +  */
> + efi_save_gd();
> +
> + /* Transfer environment variable as load options */
> + set_load_options(*loaded_image_infop, load_options_path);
> +
> + return 0;
> +}
> +
>  /**
>   * do_bootefi_exec() - execute EFI binary
>   *
> @@ -374,13 +399,11 @@ static efi_status_t do_bootefi_exec(void *efi,
>   assert(device_path && image_path);
>   }
>  
> - ret = efi_setup_loaded_image(device_path, image_path, _obj,
> -  _image_info);
> - if (ret != EFI_SUCCESS)
> - goto exit;
> + ret = bootefi_run_prepare("bootargs", device_path, image_path,
> +   _obj, _image_info);
> + if (ret)
> + return ret;
>  
> - /* Transfer environment variable bootargs as load options */
> - set_load_options(loaded_image_info, "bootargs");
>   /* Load the EFI payload */
>   entry = efi_load_pe(image_obj, efi, loaded_image_info);
>   if (!entry) {
> @@ -468,35 +491,23 @@ exit:
>   * @path: File path to the test being run (often just the test name with a
>   *backslash before it
>   * @test_func: Address of the test function that is being run
> + * @load_options_path: U-Boot environment variable to use as load options
>   * @return 0 if OK, -ve on error
>   */
>  static efi_status_t bootefi_test_prepare(

CHECK: Alignment should match open parenthesis
#29: FILE: cmd/bootefi.c:330:
+static efi_status_t bootefi_run_prepare(const char *load_options_path,
+   struct efi_device_path *device_path,

>   struct efi_loaded_image_obj **image_objp,
> - struct efi_loaded_image **loaded_image_infop,
> - const char *path,
> - ulong test_func)
> + struct efi_loaded_image **loaded_image_infop, const char *path,
> + ulong test_func, const char *load_options_path)
>  {
> - efi_status_t r;
> -
>   /* Construct a dummy device path */
>   bootefi_device_path = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE,
> (uintptr_t)test_func,
> (uintptr_t)test_func);
>   bootefi_image_path = efi_dp_from_file(NULL, 0, path);
> - r = efi_setup_loaded_image(bootefi_device_path, bootefi_image_path,
> -image_objp, loaded_image_infop);
> - if (r)
> - return r;
> - /*
> -  * gd lives in a fixed register which may get clobbered while we execute
> -  * the payload. So save it here and restore it on every callback entry
> -  */
> - efi_save_gd();
> -
> - /* Transfer environment variable efi_selftest as load options */
> - set_load_options(*loaded_image_infop, "efi_selftest");
>  
> - return 0;
> + return bootefi_run_prepare(load_options_path, bootefi_device_path,
> +bootefi_image_path, image_objp,
> +loaded_image_infop);
>  }
>  
>  /**
> @@ -590,8 +601,8 @@ static int 

Re: [U-Boot] [PATCH v14 2/4] efi: Split out test init/uninit into functions

2018-11-19 Thread Heinrich Schuchardt
On 11/15/18 12:11 AM, Simon Glass wrote:
> The functions in bootefi are very long because they mix high-level code
> and control with the low-level implementation. To help with this, create
> functions which handle preparing for running the test and cleaning up
> afterwards.
> 
> Also shorten the awfully long variable names here.
> 
> Signed-off-by: Simon Glass 
> ---
> 
> Changes in v14:
> - Go back to the horrible long variable names
> 
> Changes in v13:
> - Rebase to efi/efi-next
> 
> Changes in v12:
> - Rename image to image_prot
> 
> Changes in v11: None
> Changes in v9:
> - Add comments to bootefi_test_prepare() about the memset()s
> 
> Changes in v7: None
> Changes in v5:
> - Drop call to efi_init_obj_list() which is now done in do_bootefi()
> 
> Changes in v4: None
> Changes in v3:
> - Add new patch to split out test init/uninit into functions
> 
>  cmd/bootefi.c | 81 +--
>  1 file changed, 65 insertions(+), 16 deletions(-)
> 
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index 3e37805ea13..b633e956c23 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -453,6 +453,67 @@ exit:
>   return ret;
>  }
>  
> +#ifdef CONFIG_CMD_BOOTEFI_SELFTEST
> +/**
> + * bootefi_test_prepare() - prepare to run an EFI test
> + *
> + * This sets things up so we can call EFI functions. This involves preparing
> + * the 'gd' pointer and setting up the load ed image data structures.
> + *
> + * @image_objp: loaded_image_infop: Pointer to a struct which will hold the
> + *loaded image object. This struct will be inited by this function before
> + *use.
> + * @loaded_image_infop: Pointer to a struct which will hold the loaded image
> + *info. This struct will be inited by this function before use.
> + * @path: File path to the test being run (often just the test name with a
> + *backslash before it
> + * @test_func: Address of the test function that is being run
> + * @return 0 if OK, -ve on error
> + */
> +static efi_status_t bootefi_test_prepare(

CHECK: Lines should not end with a '('
#43: FILE: cmd/bootefi.c:474:
+static efi_status_t bootefi_test_prepare(

So the parenthesis has to go onto the next line.

> + struct efi_loaded_image_obj **image_objp,

(struct efi_loaded_image_obj **image_objp,

> + struct efi_loaded_image **loaded_image_infop,
> + const char *path,
> + ulong test_func)
> +{
> + efi_status_t r;
> +
> + /* Construct a dummy device path */
> + bootefi_device_path = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE,
> +   (uintptr_t)test_func,
> +   (uintptr_t)test_func);

We have to check the return value. It may be NULL.

> + bootefi_image_path = efi_dp_from_file(NULL, 0, path);

Same here.

> + r = efi_setup_loaded_image(bootefi_device_path, bootefi_image_path,
> +image_objp, loaded_image_infop);
> + if (r)
> + return r;
> + /*
> +  * gd lives in a fixed register which may get clobbered while we execute
> +  * the payload. So save it here and restore it on every callback entry
> +  */
> + efi_save_gd();

We do this already in efi_init_obj_list().

Best regards

Heinrich

> +
> + /* Transfer environment variable efi_selftest as load options */
> + set_load_options(*loaded_image_infop, "efi_selftest");
> +
> + return 0;
> +}
> +
> +/**
> + * bootefi_test_finish() - finish up after running an EFI test
> + *
> + * @image_obj: Pointer to a struct which holds the loaded image object
> + * @loaded_image_info: Pointer to a struct which holds the loaded image info
> + */
> +static void bootefi_test_finish(struct efi_loaded_image_obj *image_obj,
> + struct efi_loaded_image *loaded_image_info)
> +{
> + efi_restore_gd();
> + free(loaded_image_info->load_options);
> + efi_delete_handle(_obj->header);
> +}
> +#endif /* CONFIG_CMD_BOOTEFI_SELFTEST */
> +
>  static int do_bootefi_bootmgr_exec(void)
>  {
>   struct efi_device_path *device_path, *file_path;
> @@ -528,26 +589,14 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int 
> argc, char * const argv[])
>   struct efi_loaded_image_obj *image_obj;
>   struct efi_loaded_image *loaded_image_info;
>  
> - /* Construct a dummy device path. */
> - bootefi_device_path = efi_dp_from_mem(EFI_RESERVED_MEMORY_TYPE,
> -   (uintptr_t)_selftest,
> -   (uintptr_t)_selftest);
> - bootefi_image_path = efi_dp_from_file(NULL, 0, "\\selftest");
> -
> - r = efi_setup_loaded_image(bootefi_device_path,
> -bootefi_image_path, _obj,
> -_image_info);
> - if (r != EFI_SUCCESS)
> + 

Re: [U-Boot] [PATCH v2 1/2] spl_spi: Read default speed and mode values from DT

2018-11-19 Thread Simon Goldschmidt

On 19.11.2018 18:33, Patrick Delaunay wrote:

In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node.

Signed-off-by: Christophe Kerello 
Signed-off-by: Patrick Delaunay 


I was commenting about code duplication, which is better now, so:

Reviewed-by: Simon Goldschmidt 

I do think it would be nice to invert the logic. That way, we could get 
completely rid of those two CONFIG_SF_DEFAULT settings for DM_SPI_FLASH 
boards (and eventually for all boards - when's the deadline for that?). 
But there are other places that still do it like you do here, so it's 
probably better to change them all at once...


Simon


---

Changes in v2:
- use variables to avoid duplicated code

  common/spl/spl_spi.c | 10 --
  1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 8cd4830..b348b45 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -74,15 +74,21 @@ static int spl_spi_load_image(struct spl_image_info 
*spl_image,
unsigned payload_offs = CONFIG_SYS_SPI_U_BOOT_OFFS;
struct spi_flash *flash;
struct image_header *header;
+   unsigned int max_hz = CONFIG_SF_DEFAULT_SPEED;
+   unsigned int spi_mode = CONFIG_SF_DEFAULT_MODE;
  
+#ifdef CONFIG_DM_SPI_FLASH

+   /* In DM mode defaults will be taken from DT */
+   max_hz = 0, spi_mode = 0;
+#endif
/*
 * Load U-Boot image from SPI flash into RAM
 */
  
  	flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,

CONFIG_SF_DEFAULT_CS,
-   CONFIG_SF_DEFAULT_SPEED,
-   CONFIG_SF_DEFAULT_MODE);
+   max_hz,
+   spi_mode);
if (!flash) {
puts("SPI probe failed.\n");
return -ENODEV;



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


Re: [U-Boot] [PATCH 00/93] dm: Move towards completing CONFIG_BLK migration

2018-11-19 Thread Tom Rini
On Mon, Nov 19, 2018 at 10:54 AM Simon Glass  wrote:
>
> All boards should now be migrated to use CONFIG_BLK. This series removes
> those with build problems using this option.
>
> If maintainers want to keep these boards in they should send a patch in
> the next week or two. Otherwise the board will be removed in the next
> release, and will need to be added and re-reviewed later.
>
> The goal is to have all boards use driver model. But so far, we do allow
> CONFIG_DM to not be defined.
>
> PLEASE NOTE: This is not an easy process. It is possible that your board
> does work, or works with only minor changes. Please try to understand that
> the removal of a board is not done because people don't like your board.
> In fact the board might have been the first one I used when trying out
> U-Boot! It's just that we expect maintainers to keep up with the migration
> to driver model which has been running now for 4 years. It just isn't
> possible for a few people to migrate and test hundreds of boards.
>
> So, send a patch!

OK, so with the intention of "need to light a fire", consider the fire
lit!  But, I think v2 of this series needs to:
- Address the bug that's been noted of you checking on "DM_BLK" when
  it's really just "BLK".
- Do a test build with BLK just being unconditional now.  For example,
  you're deleting the am335x_evm family but it builds fine with BLK
  being enabled now.  I even gave it a run time test via test.py and
  we're fine.  So, I think a new run where you see what fails to build
  with BLK enabled by default now is in order to come up with a new
  delete list.

Thanks!

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


Re: [U-Boot] [PATCH 01/93] Add a simple script to remove boards

2018-11-19 Thread Adam Ford
On Mon, Nov 19, 2018 at 9:54 AM Simon Glass  wrote:
>
> This script attempts to create a git commit which removes a single board.
> It is quite fallible and everything it does needs checking. But it can
> help speed up the process.
>

This patch looks like it goes through the configs, finds boards and
blindly deletes them.  What happens in the instance where multiple
defconfig files use the same include/configs file or C source?  If one
of the defconfigs is missing something, does it then delete the
others?  It seems like it should make sure that all variations don't
comply before blowing away the source and include/configs.

adam

> Signed-off-by: Simon Glass 
> ---
>
>  tools/rmboard.py | 145 +++
>  1 file changed, 145 insertions(+)
>  create mode 100755 tools/rmboard.py
>
> diff --git a/tools/rmboard.py b/tools/rmboard.py
> new file mode 100755
> index 000..c6be434c9ed
> --- /dev/null
> +++ b/tools/rmboard.py
> @@ -0,0 +1,145 @@
> +#! /usr/bin/python
> +
> +'''
> +Script to remove boards
> +
> +Usage:
> +   rmboard.py ...
> +
> +A single commit is created for each board removed.
> +
> +Some boards may depend on files provided by another and this will cause
> +problems.
> +
> +This script works by:
> +- Looking through the MAINTAINERS files which mention a board to find out
> +what files the board uses
> +- Looking through the Kconfig files which mention a board to find one 
> that
> +needs to have material removed
> +'''
> +
> +import glob
> +import os
> +import re
> +import sys
> +
> +# Bring in the patman libraries
> +our_path = os.path.dirname(os.path.realpath(__file__))
> +sys.path.append(os.path.join(our_path, '../patman'))
> +
> +import command
> +
> +def rm_kconfig_include(path):
> +"""Remove a path from Kconfig files
> +
> +This function finds the given path in a 'source' statement in a Kconfig
> +file and removes that line from the file. This is needed because the path
> +is going to be removed, so any reference to it will cause a problem with
> +Kconfig parsing.
> +
> +The changes are made locally and then added to the git staging area.
> +
> +Args:
> +path: Path to search for and remove
> +"""
> +print 'path', path
> +cmd = ['git', 'grep', path]
> +stdout = command.RunPipe([cmd], capture=True, 
> raise_on_error=False).stdout
> +if not stdout:
> +return
> +fname = stdout.split(':')[0]
> +
> +print "Fixing up '%s' to remove reference to '%s'" % (fname, path)
> +cmd = ['sed', '-i', '\|%s|d' % path, fname]
> +stdout = command.RunPipe([cmd], capture=True).stdout
> +
> +cmd = ['git', 'add', fname]
> +stdout = command.RunPipe([cmd], capture=True).stdout
> +
> +def rm_board(board):
> +"""Handle creating a commit which removes a single board
> +
> +Args:
> +board: Board name to remove
> +"""
> +
> +# Find all MAINTAINERS and Kconfig files which mention the board
> +cmd = ['git', 'grep', '-l', board]
> +stdout = command.RunPipe([cmd], capture=True).stdout
> +maintain = []
> +kconfig = []
> +for line in stdout.splitlines():
> +line = line.strip()
> +if 'MAINTAINERS' in line:
> +if line not in maintain:
> +maintain.append(line)
> +elif 'Kconfig' in line:
> +kconfig.append(line)
> +paths = []
> +cc = []
> +print 'maintain', maintain
> +
> +# Look through the MAINTAINERS file to find things to remove
> +for fname in maintain:
> +with open(fname) as fd:
> +for line in fd:
> +line = line.strip()
> +fields = re.split('[ \t]', line, 1)
> +print fields
> +if len(fields) == 2:
> +if fields[0] == 'M:':
> +cc.append(fields[1])
> +elif fields[0] == 'F:':
> +paths.append(fields[1].strip())
> +print 'paths', paths
> +
> +# Expannd any wildcards in the MAINTAINRERS file
> +real = []
> +for path in paths:
> +if path[-1] == '/':
> +path = path[:-1]
> +if '*' in path:
> +globbed = glob.glob(path)
> +print "Expanded '%s' to '%s'" % (path, globbed)
> +real += globbed
> +else:
> +real.append(path)
> +print 'real', real
> +
> +# Search for Kconfig files in the resulting list. Remove any 'source' 
> lines
> +# which referenced Kconfig files we want to remove
> +for path in real:
> +cmd = ['find', path]
> +stdout = (command.RunPipe([cmd], capture=True, raise_on_error=False).
> +  stdout)
> +for fname in stdout.splitlines():
> +if fname.endswith('Kconfig'):
> +rm_kconfig_include(fname)
> +
> +# Remove unwanted files
> +cmd = ['git', 'rm', '-r'] + real
> +stdout = 

Re: [U-Boot] [PATCH 48/93] arm: Remove imx6q_logic board

2018-11-19 Thread Adam Ford
On Mon, Nov 19, 2018 at 9:55 AM Simon Glass  wrote:
>
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.
>

NAK.  I disagree with your assessment.

make imx6q_logic_defconfig
cat .config | grep BLK
CONFIG_BLK=y
CONFIG_SPL_BLK=y

Like the other board, I think you're looking for CONFIG_DM_BLK when
you should be looking for CONFIG_BLK which is dependent on DM

adam

> Signed-off-by: Simon Glass 
> ---
>
>  arch/arm/mach-imx/mx6/Kconfig  |   1 -
>  board/logicpd/imx6/Kconfig |  12 --
>  board/logicpd/imx6/MAINTAINERS |   6 -
>  board/logicpd/imx6/Makefile|  10 -
>  board/logicpd/imx6/README  |  37 
>  board/logicpd/imx6/imx6logic.c | 325 -
>  configs/imx6q_logic_defconfig  |  77 
>  include/configs/imx6_logic.h   | 172 -
>  8 files changed, 640 deletions(-)
>  delete mode 100644 board/logicpd/imx6/Kconfig
>  delete mode 100644 board/logicpd/imx6/MAINTAINERS
>  delete mode 100644 board/logicpd/imx6/Makefile
>  delete mode 100644 board/logicpd/imx6/README
>  delete mode 100644 board/logicpd/imx6/imx6logic.c
>  delete mode 100644 configs/imx6q_logic_defconfig
>  delete mode 100644 include/configs/imx6_logic.h
>
> diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> index face0f09827..7e0f9369eaf 100644
> --- a/arch/arm/mach-imx/mx6/Kconfig
> +++ b/arch/arm/mach-imx/mx6/Kconfig
> @@ -548,7 +548,6 @@ source "board/freescale/mx6ullevk/Kconfig"
>  source "board/grinn/liteboard/Kconfig"
>  source "board/kosagi/novena/Kconfig"
>  source "board/liebherr/display5/Kconfig"
> -source "board/logicpd/imx6/Kconfig"
>  source "board/seco/Kconfig"
>  source "board/solidrun/mx6cuboxi/Kconfig"
>  source "board/technexion/pico-imx6ul/Kconfig"
> diff --git a/board/logicpd/imx6/Kconfig b/board/logicpd/imx6/Kconfig
> deleted file mode 100644
> index f5e2f58b12b..000
> --- a/board/logicpd/imx6/Kconfig
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -if TARGET_MX6LOGICPD
> -
> -config SYS_BOARD
> -   default "imx6"
> -
> -config SYS_VENDOR
> -   default "logicpd"
> -
> -config SYS_CONFIG_NAME
> -   default "imx6_logic"
> -
> -endif
> diff --git a/board/logicpd/imx6/MAINTAINERS b/board/logicpd/imx6/MAINTAINERS
> deleted file mode 100644
> index 5db7d2cadd9..000
> --- a/board/logicpd/imx6/MAINTAINERS
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -MX6LOGICPD BOARD
> -M: Adam Ford 
> -S: Maintained
> -F: board/logicpd/imx6/
> -F: include/configs/imx6_logic.h
> -F: configs/imx6q_logic_defconfig
> diff --git a/board/logicpd/imx6/Makefile b/board/logicpd/imx6/Makefile
> deleted file mode 100644
> index 337df9247df..000
> --- a/board/logicpd/imx6/Makefile
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -#
> -# Copyright (C) 2007, Guennadi Liakhovetski 
> -#
> -# (C) Copyright 2011 Freescale Semiconductor, Inc.
> -#
> -# SPDX-License-Identifier: GPL-2.0+
> -#
> -
> -obj-y  := imx6logic.o
> -
> diff --git a/board/logicpd/imx6/README b/board/logicpd/imx6/README
> deleted file mode 100644
> index df43b55d6bf..000
> --- a/board/logicpd/imx6/README
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -U-Boot for LogicPD i.MX6 Development Kit
> -
> -
> -This file contains information for the port of U-Boot to the Logic PD 
> Development kit.
> -
> -Logic PD has an i.MX6 System On Module (SOM) and a correspondong development
> -board.  SOM has a built-in microSD socket, DDR and NAND flash.  The 
> development kit has
> -an SMSC Ethernet PHY, serial debug port and a variety of peripherals.
> -
> -On the intial release, the SOM came with either an i.MX6D or i.MX6Q.
> -
> -For more details about Logic PD i.MX6 Development kit, visit:
> -https://www.logicpd.com/
> -
> -Building U-Boot for Logic PD Development Kit
> -
> -To build U-Boot for the Dual and Quad variants:
> -
> - make imx6q_logic_defconfig
> - make u-boot.imx ARCH=arm CROSS_COMPILE=arm-linux-
> -
> -
> -Flashing U-Boot into the SD card
> -
> -
> -See README.imximage for details on booting from SD
> -
> -Flashing U-Boot into NAND
> --
> -Once in Linux with MTD support for the NAND on /dev/mtd0, program U-Boot 
> with the following:
> -with:
> -
> -  kobs-ng init -v -x u-boot-dtb.imx
> -
> -Additional Support Documentation can be found at:
> -https://support.logicpd.com/
> -
> diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
> deleted file mode 100644
> index ce1c8a5d6bc..000
> --- a/board/logicpd/imx6/imx6logic.c
> +++ /dev/null
> @@ -1,325 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0+
> -/*
> - * Copyright (C) 2017 Logic PD, Inc.
> - *
> - * Author: Adam Ford 
> - *
> - * Based on SabreSD by Fabio Estevam 
> - * and updates by Jagan Teki 
> - */
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> 

Re: [U-Boot] [PATCH 51/93] arm: Remove omap3_logic_somlv board

2018-11-19 Thread Adam Ford
On Mon, Nov 19, 2018 at 9:55 AM Simon Glass  wrote:
>
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.

NAK!  This board does support BLK.  I think your algorithm is looking
for CONFIG_DM_BLK when it should be looking for CONFIG_BLK which
depends on DM.

make omap3_logic_somlv_defconfig
cat .config | grep BLK


CONFIG_BLK=y
CONFIG_SPL_BLK=y



>
> Signed-off-by: Simon Glass 
> ---
>
>  arch/arm/mach-omap2/omap3/Kconfig|   1 -
>  board/logicpd/omap3som/Kconfig   |  14 --
>  board/logicpd/omap3som/MAINTAINERS   |   9 -
>  board/logicpd/omap3som/Makefile  |   6 -
>  board/logicpd/omap3som/README|  56 -
>  board/logicpd/omap3som/omap3logic.c  | 329 ---
>  board/logicpd/omap3som/omap3logic.h  | 236 ---
>  configs/omap35_logic_defconfig   |  72 --
>  configs/omap35_logic_somlv_defconfig |  78 ---
>  configs/omap3_logic_defconfig|  73 --
>  configs/omap3_logic_somlv_defconfig  |  78 ---
>  include/configs/omap3_logic.h| 210 -
>  12 files changed, 1162 deletions(-)
>  delete mode 100644 board/logicpd/omap3som/Kconfig
>  delete mode 100644 board/logicpd/omap3som/MAINTAINERS
>  delete mode 100644 board/logicpd/omap3som/Makefile
>  delete mode 100644 board/logicpd/omap3som/README
>  delete mode 100644 board/logicpd/omap3som/omap3logic.c
>  delete mode 100644 board/logicpd/omap3som/omap3logic.h
>  delete mode 100644 configs/omap35_logic_defconfig
>  delete mode 100644 configs/omap35_logic_somlv_defconfig
>  delete mode 100644 configs/omap3_logic_defconfig
>  delete mode 100644 configs/omap3_logic_somlv_defconfig
>  delete mode 100644 include/configs/omap3_logic.h
>
> diff --git a/arch/arm/mach-omap2/omap3/Kconfig 
> b/arch/arm/mach-omap2/omap3/Kconfig
> index edd5e3f255b..6e3942ad2d3 100644
> --- a/arch/arm/mach-omap2/omap3/Kconfig
> +++ b/arch/arm/mach-omap2/omap3/Kconfig
> @@ -203,7 +203,6 @@ source "board/ti/am3517crane/Kconfig"
>  source "board/8dtech/eco5pk/Kconfig"
>  source "board/corscience/tricorder/Kconfig"
>  source "board/htkw/mcx/Kconfig"
> -source "board/logicpd/omap3som/Kconfig"
>  source "board/nokia/rx51/Kconfig"
>  source "board/technexion/tao3530/Kconfig"
>  source "board/technexion/twister/Kconfig"
> diff --git a/board/logicpd/omap3som/Kconfig b/board/logicpd/omap3som/Kconfig
> deleted file mode 100644
> index 68d40dcd62d..000
> --- a/board/logicpd/omap3som/Kconfig
> +++ /dev/null
> @@ -1,14 +0,0 @@
> -if TARGET_OMAP3_LOGIC
> -
> -config SYS_BOARD
> -   default "omap3som"
> -
> -config SYS_VENDOR
> -   default "logicpd"
> -
> -config SYS_CONFIG_NAME
> -   default "omap3_logic"
> -
> -source "board/ti/common/Kconfig"
> -
> -endif
> diff --git a/board/logicpd/omap3som/MAINTAINERS 
> b/board/logicpd/omap3som/MAINTAINERS
> deleted file mode 100644
> index 459393cf54c..000
> --- a/board/logicpd/omap3som/MAINTAINERS
> +++ /dev/null
> @@ -1,9 +0,0 @@
> -OMAP3SOM BOARD
> -M: Adam Ford 
> -S: Maintained
> -F: board/logicpd/omap3som/
> -F: include/configs/omap3_logic.h
> -F: configs/omap3_logic_defconfig
> -F: configs/omap35_logic_defconfig
> -F: configs/omap35_logic_somlv_defconfig
> -F: configs/omap3_logic_somlv_defconfig
> diff --git a/board/logicpd/omap3som/Makefile b/board/logicpd/omap3som/Makefile
> deleted file mode 100644
> index 61ef14e87a0..000
> --- a/board/logicpd/omap3som/Makefile
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0+
> -#
> -# (C) Copyright 2000, 2001, 2002
> -# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
> -
> -obj-y  := omap3logic.o
> diff --git a/board/logicpd/omap3som/README b/board/logicpd/omap3som/README
> deleted file mode 100644
> index 5aaf58f0a69..000
> --- a/board/logicpd/omap3som/README
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -Summary
> -===
> -
> -The source for omap3logic.c encompases the OMAP35 and DM3730 SOM-LV and 
> DM3730 Torpedo platforms, but there are device trees custom taylored to each 
> board.
> -
> -omap3_logic_defconfig = DM37 Torpedo / Torpedo + Wireless
> -omap35_logic_defconfig = OMAP35 Torpedo
> -omap3_logic_somlv_defconfig = DM37 SOM-LV
> -omap35_logic_somlv_defconfig = OMAP35 SOM-LV
> -
> -The device tree included with each of the defconfig files will also direct 
> the board as to which dtb file to load when loading the kernel, so it is not
> -recomended to mix and match the defconfig files.
> -
> -Falcon Mode: FAT SD cards
> -=
> -
> -In this case the additional file is written to the filesystem.  In this
> -example we assume that the uImage and device tree to be used are already on
> -the FAT filesystem (only the uImage MUST be for this to function
> -afterwards) along with a Falcon Mode aware MLO and the FAT partition has
> -already been created and marked bootable:
> -
> -U-Boot # mmc rescan
> -# Load kernel and device tree into memory, perform export
> -U-Boot # 

Re: [U-Boot] [PATCH] cmd: add clear screen 'cls' command

2018-11-19 Thread Patrick DELAUNAY
Hi Anatolij
> From: Anatolij Gustschin 
> Sent: samedi 17 novembre 2018 15:30
> 
> Add common clear screen command for configurations CONFIG_DM_VIDEO,
> CONFIG_LCD and CONFIG_CFB_CONSOLE.
> 
> Remove the existing cls command implementation from lcd.c code and activate
> the command for all boards enabling CONFIG_LCD for compatibility reasons.
> 
> Signed-off-by: Anatolij Gustschin 
> ---
>  cmd/Kconfig   |  7 
>  cmd/Makefile  |  1 +
>  cmd/cls.c | 35 +++
>  common/lcd.c  |  8 -
>  configs/at91sam9261ek_dataflash_cs0_defconfig |  1 +
> configs/at91sam9261ek_dataflash_cs3_defconfig |  1 +
>  configs/at91sam9261ek_nandflash_defconfig |  1 +
>  configs/at91sam9263ek_dataflash_cs0_defconfig |  1 +
>  configs/at91sam9263ek_dataflash_defconfig |  1 +
>  configs/at91sam9263ek_nandflash_defconfig |  1 +
>  configs/at91sam9263ek_norflash_boot_defconfig |  1 +
>  configs/at91sam9263ek_norflash_defconfig  |  1 +
>  configs/at91sam9g10ek_dataflash_cs0_defconfig |  1 +
> configs/at91sam9g10ek_dataflash_cs3_defconfig |  1 +
>  configs/at91sam9g10ek_nandflash_defconfig |  1 +
>  configs/at91sam9m10g45ek_mmc_defconfig|  1 +
>  configs/at91sam9m10g45ek_nandflash_defconfig  |  1 +
>  configs/at91sam9n12ek_mmc_defconfig   |  1 +
>  configs/at91sam9n12ek_nandflash_defconfig |  1 +
>  configs/at91sam9n12ek_spiflash_defconfig  |  1 +
>  configs/at91sam9rlek_dataflash_defconfig  |  1 +
>  configs/at91sam9rlek_mmc_defconfig|  1 +
>  configs/at91sam9rlek_nandflash_defconfig  |  1 +
>  configs/brxre1_defconfig  |  1 +
>  configs/cm_t3517_defconfig|  1 +
>  configs/cm_t35_defconfig  |  1 +
>  configs/peach-pi_defconfig|  1 +
>  configs/peach-pit_defconfig   |  1 +
>  configs/picosam9g45_defconfig |  1 +
>  configs/pm9261_defconfig  |  1 +
>  configs/pm9263_defconfig  |  1 +
>  configs/snow_defconfig|  1 +
>  configs/spring_defconfig  |  1 +
>  configs/zipitz2_defconfig |  1 +
>  34 files changed, 73 insertions(+), 8 deletions(-)  create mode 100644 
> cmd/cls.c
> 
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index d609f9d1c9..6023867007 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -1372,6 +1372,13 @@ config CMD_CONITRACE
> Enable the 'conitrace' command which displays the codes received
> from the console input as hexadecimal numbers.
> 
> +config CMD_CLS
> + bool "Enable clear screen command 'cls'"
> + depends on CFB_CONSOLE || DM_VIDEO || LCD || VIDEO

Just a minor remark, you can also add :

default y  if !DM_VIDEO

To avoid the defconfig modifications in the patch.
(lcd.o if compiled ifndef CONFIG_DM_VIDEO) / command previously always define 
in this case)
But you prefer perhaps to have clear CONFIG_CMD configuration in each defconfig.

> + help
> +   Enable the 'cls' command which clears the screen contents
> +   on video frame buffer.
> +
>  config CMD_DISPLAY
>   bool "Enable the 'display' command, for character displays"
>   help
> diff --git a/cmd/Makefile b/cmd/Makefile index 12a1330b06..2cb07df3c8
> 100644
> --- a/cmd/Makefile
> +++ b/cmd/Makefile

But Ok for the rest. 
Tested on my board (stm32mp157_ev1 with DM_VIDEO activated)

Regards, Patrick.

Tested-by: Patrick.Delaunay 


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


Re: [U-Boot] [PATCH 25/93] arm: Remove warp7 board

2018-11-19 Thread Fabio Estevam
Hi Simon,

On Mon, Nov 19, 2018 at 2:29 PM Simon Glass  wrote:
>
> This board has not been converted to CONFIG_DM_BLK by the deadline.

CONFIG_DM_BLK does not exist.

Which deadline? Shouldn't we have a warning to let people know that
the board should be converted?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] Re : Re: Re : Re: [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Tom Rini
On Mon, Nov 19, 2018 at 06:03:45PM +0100, Guillaume GARDET wrote:
 
> - Tom Rini  a écrit :
> > On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
> > > 
> > > - Tom Rini  a écrit :
> > > > On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
> > > > 
> > > > > This patch allows SPL to load a bigger BL2 (u-boot.bin).
> > > > > This is needed for and has been tested on Arndale board, as 
> > > > > u-boot.bin is 
> > > > > now bigger than 512K with GCC8.
> > > > > 
> > > > > Signed-off-by: Guillaume GARDET 
> > > > > 
> > > > > Cc: Minkyu Kang 
> > > > > Cc: Tom Rini 
> > > > > ---
> > > > >  include/configs/exynos5-common.h | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > Are these platforms using thumb2 to build?  Were it not for some early
> > > > Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a
> > > > global switch to making that option default.
> > > 
> > > No, they are not using thumb2:
> > > # CONFIG_SYS_THUMB_BUILD is not set
> > > # CONFIG_SPL_SYS_THUMB_BUILD is not set
> > 
> > I would suggest switching that on instead then.  I'm always wary of
> > changing stuff on the flash layout.
> 
> I tested thumb2 for SPL and u-boot.bin on arndale and it does boot properly.
> u-boot.bin is 397KB with thumb2, which is OK.
> 
> Should I make the switch for Arndale board only, or on a bigger range?

I'd go ahead and switch all exynos platforms.  My recollection is it's
really only very old / early Cortex-A platforms with issues and I'm
pretty sure we either have the appropriate errata enabled or they've all
been discarded at this point in time.

-- 
Tom


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


[U-Boot] [PATCH v2 0/2] Read default speed and mode values from DT

2018-11-19 Thread Patrick Delaunay

This serie generalize the commit 96907c0fe50a
("dm: spi: Read default speed and mode values from DT")

In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node. This will make sure that boards
with multiple SPI/QSPI controllers can be probed at different
bus frequencies and SPI modes.

Today it is only done in the command sf; this patch do the same
for the other user of the spi_flash_probe(): spl and splash
to avoid probe issue.


Changes in v2:
- use variables to avoid duplicated code
- use variables to avoid duplicated code

Patrick Delaunay (2):
  spl_spi: Read default speed and mode values from DT
  splash: sf: Read default speed and mode values from DT

 common/spl/spl_spi.c   | 10 --
 common/splash_source.c | 12 ++--
 2 files changed, 18 insertions(+), 4 deletions(-)

-- 
2.7.4

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


[U-Boot] [PATCH v2 2/2] splash: sf: Read default speed and mode values from DT

2018-11-19 Thread Patrick Delaunay
In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node.

Signed-off-by: Patrick Delaunay 
---

Changes in v2:
- use variables to avoid duplicated code

 common/splash_source.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/common/splash_source.c b/common/splash_source.c
index 62763b9..427196c 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -24,11 +24,19 @@ DECLARE_GLOBAL_DATA_PTR;
 static struct spi_flash *sf;
 static int splash_sf_read_raw(u32 bmp_load_addr, int offset, size_t read_size)
 {
+   unsigned int max_hz = CONFIG_SF_DEFAULT_SPEED;
+   unsigned int spi_mode = CONFIG_SF_DEFAULT_MODE;
+
+#ifdef CONFIG_DM_SPI_FLASH
+   /* In DM mode defaults will be taken from DT */
+   max_hz = 0, spi_mode = 0;
+#endif
+
if (!sf) {
sf = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
 CONFIG_SF_DEFAULT_CS,
-CONFIG_SF_DEFAULT_SPEED,
-CONFIG_SF_DEFAULT_MODE);
+max_hz,
+spi_mode);
if (!sf)
return -ENODEV;
}
-- 
2.7.4

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


Re: [U-Boot] [PATCH v2] mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()

2018-11-19 Thread Ricardo Salveti
On Mon, Nov 19, 2018 at 12:42 PM Fabio Estevam  wrote:
>
> Hi Ricardo,
>
> On Mon, Nov 19, 2018 at 12:25 PM Ricardo Salveti  
> wrote:
>
> > Looking a bit further, this ends up adding a significant boot delay
> > because the mmc driver still tries to send another two additional
> > commands, so it ends executing this timeout logic 3 times in total.
> > Guess this can be improved at
> > http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/mmc.c;h=d6b9cdc99229d8bfe0c8be3adfd6e5209a11601c;hb=HEAD#l2633
> > by either checking for mmc first or by simply just checking and
> > handling the return code from mmc_send_if_cond, but this could be
> > another patch.
>
> Yes, I think you are right.
>
> Does only adding the error check below avoid the hang in your case?
>
> /* Test for SD version 2 */
>  err = mmc_send_if_cond(mmc);
>  if (err)
> return err;

You patch is still required as the hang I was getting was happening in
the while loop itself. Adding this change on top of your patch would
just reduce the delay as the code path would avoid another 2 extra
commands (both returning timeout).

The only issue, as pointed out by Baruch, is that we already had a
check that was ignoring the timeout here before, so I guess the
current behavior is correct/expected.

+1 for your patch as it is a good fix anyway and unblocks the boot
process on my som/board, even if it adds a longer boot delay.

Tested-by: Ricardo Salveti 

Thanks,
-- 
Ricardo Salveti de Araujo
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2 1/2] spl_spi: Read default speed and mode values from DT

2018-11-19 Thread Patrick Delaunay
In case of DT boot, don't read default speed and mode for SPI from
CONFIG_*, instead read from DT node.

Signed-off-by: Christophe Kerello 
Signed-off-by: Patrick Delaunay 
---

Changes in v2:
- use variables to avoid duplicated code

 common/spl/spl_spi.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index 8cd4830..b348b45 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -74,15 +74,21 @@ static int spl_spi_load_image(struct spl_image_info 
*spl_image,
unsigned payload_offs = CONFIG_SYS_SPI_U_BOOT_OFFS;
struct spi_flash *flash;
struct image_header *header;
+   unsigned int max_hz = CONFIG_SF_DEFAULT_SPEED;
+   unsigned int spi_mode = CONFIG_SF_DEFAULT_MODE;
 
+#ifdef CONFIG_DM_SPI_FLASH
+   /* In DM mode defaults will be taken from DT */
+   max_hz = 0, spi_mode = 0;
+#endif
/*
 * Load U-Boot image from SPI flash into RAM
 */
 
flash = spi_flash_probe(CONFIG_SF_DEFAULT_BUS,
CONFIG_SF_DEFAULT_CS,
-   CONFIG_SF_DEFAULT_SPEED,
-   CONFIG_SF_DEFAULT_MODE);
+   max_hz,
+   spi_mode);
if (!flash) {
puts("SPI probe failed.\n");
return -ENODEV;
-- 
2.7.4

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


Re: [U-Boot] [PATCH 00/93] dm: Move towards completing CONFIG_BLK migration

2018-11-19 Thread Otavio Salvador
Hello Simon,

On Mon, Nov 19, 2018 at 1:52 PM Simon Glass  wrote:
> All boards should now be migrated to use CONFIG_BLK. This series removes
> those with build problems using this option.

I understand and support the goal here but it seems a little abrupt to
send it on a short notice. It'd be nice if the build were triggering a
build warning to notify about the deadline. I wasn't aware of the
deadline.


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854  Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Guillaume GARDET
This patch allows SPL to load a bigger BL2 (u-boot.bin).
This is needed for and has been tested on Arndale board, as u-boot.bin is 
now bigger than 512K with GCC8.

Signed-off-by: Guillaume GARDET 

Cc: Minkyu Kang 
Cc: Tom Rini 
---
 include/configs/exynos5-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index cd2a9046af..7da4be5ca8 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -89,7 +89,7 @@
 /* Configuration of BL1, BL2, ENV Blocks on mmc */
 #define CONFIG_RES_BLOCK_SIZE  (512)
 #define CONFIG_BL1_SIZE(16 << 10) /*16 K reserved for BL1*/
-#define CONFIG_BL2_SIZE(512UL << 10UL) /* 512 KB */
+#define CONFIG_BL2_SIZE(512UL << 11UL) /* 1 MB */
 #define CONFIG_ENV_SIZE(16 << 10) /* 16 KB */
 
 #define CONFIG_BL1_OFFSET  (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
-- 
2.19.1

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


Re: [U-Boot] [PATCH 68/93] arm: Remove am65x_evm_a53 board

2018-11-19 Thread Lokesh Vutla
Hi Simon,

On 11/19/2018 9:23 PM, Simon Glass wrote:
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.
> 
> Signed-off-by: Simon Glass 

Not sure if this is by mistake, but I see CONFIG_BLK is enabled in both
the configs. Am I missing something?

➜  u-boot git:(master) make am65x_evm_r5_defconfig;cat .config | grep BLK
#
# configuration written to .config
#
CONFIG_BLK=y
CONFIG_SPL_BLK=y

➜  u-boot git:(master) make am65x_evm_a53_defconfig;cat .config | grep BLK
#
# configuration written to .config
#
CONFIG_BLK=y
CONFIG_SPL_BLK=y

Thanks and regards,
Lokesh

> ---
> 
>  arch/arm/mach-k3/Kconfig|   1 -
>  board/ti/am65x/Kconfig  |  52 
>  board/ti/am65x/MAINTAINERS  |   7 --
>  board/ti/am65x/Makefile |   8 --
>  board/ti/am65x/README   | 211 
>  board/ti/am65x/evm.c|  68 --
>  configs/am65x_evm_a53_defconfig |  71 ---
>  configs/am65x_evm_r5_defconfig  |  87 -
>  include/configs/am65x_evm.h |  75 
>  9 files changed, 580 deletions(-)
>  delete mode 100644 board/ti/am65x/Kconfig
>  delete mode 100644 board/ti/am65x/MAINTAINERS
>  delete mode 100644 board/ti/am65x/Makefile
>  delete mode 100644 board/ti/am65x/README
>  delete mode 100644 board/ti/am65x/evm.c
>  delete mode 100644 configs/am65x_evm_a53_defconfig
>  delete mode 100644 configs/am65x_evm_r5_defconfig
>  delete mode 100644 include/configs/am65x_evm.h
> 
> diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
> index e677a2e01b8..6b55b3c8c1f 100644
> --- a/arch/arm/mach-k3/Kconfig
> +++ b/arch/arm/mach-k3/Kconfig
> @@ -65,5 +65,4 @@ config SYS_K3_SPL_ATF
> Enabling this will try to start Cortex-A (typically with ATF)
> after SPL from R5.
>  
> -source "board/ti/am65x/Kconfig"
>  endif
> diff --git a/board/ti/am65x/Kconfig b/board/ti/am65x/Kconfig
> deleted file mode 100644
> index d4b36dbb42f..000
> --- a/board/ti/am65x/Kconfig
> +++ /dev/null
> @@ -1,52 +0,0 @@
> -# SPDX-License-Identifier: GPL-2.0+
> -#
> -# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
> -#Lokesh Vutla 
> -
> -choice
> - prompt "K3 AM65 based boards"
> - optional
> -
> -config TARGET_AM654_A53_EVM
> - bool "TI K3 based AM654 EVM running on A53"
> - select ARM64
> - select SOC_K3_AM6
> -
> -config TARGET_AM654_R5_EVM
> - bool "TI K3 based AM654 EVM running on R5"
> - select CPU_V7R
> - select SYS_THUMB_BUILD
> - select SOC_K3_AM6
> - select K3_AM654_DDRSS
> - imply SYS_K3_SPL_ATF
> -
> -endchoice
> -
> -if TARGET_AM654_A53_EVM
> -
> -config SYS_BOARD
> -   default "am65x"
> -
> -config SYS_VENDOR
> -   default "ti"
> -
> -config SYS_CONFIG_NAME
> -   default "am65x_evm"
> -
> -endif
> -
> -if TARGET_AM654_R5_EVM
> -
> -config SYS_BOARD
> -   default "am65x"
> -
> -config SYS_VENDOR
> -   default "ti"
> -
> -config SYS_CONFIG_NAME
> -   default "am65x_evm"
> -
> -config SPL_LDSCRIPT
> - default "arch/arm/mach-omap2/u-boot-spl.lds"
> -
> -endif
> diff --git a/board/ti/am65x/MAINTAINERS b/board/ti/am65x/MAINTAINERS
> deleted file mode 100644
> index 7c52e7599e0..000
> --- a/board/ti/am65x/MAINTAINERS
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -AM65x BOARD
> -M:   Lokesh Vutla 
> -S:   Maintained
> -F:   board/ti/am65x/
> -F:   include/configs/am65x_evm.h
> -F:   configs/am65x_evm_a53_defconfig
> -F:   configs/am65x_evm_r5_defconfig
> diff --git a/board/ti/am65x/Makefile b/board/ti/am65x/Makefile
> deleted file mode 100644
> index 94dddfcc4a5..000
> --- a/board/ti/am65x/Makefile
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -#
> -# Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
> -#Lokesh Vutla 
> -#
> -# SPDX-License-Identifier: GPL-2.0+
> -#
> -
> -obj-y  := evm.o
> diff --git a/board/ti/am65x/README b/board/ti/am65x/README
> deleted file mode 100644
> index 0b82bd557b5..000
> --- a/board/ti/am65x/README
> +++ /dev/null
> @@ -1,211 +0,0 @@
> -Introduction:
> --
> -The AM65x family of SoCs is the first device family from K3 Multicore
> -SoC architecture, targeted for broad market and industrial control with
> -aim to meet the complex processing needs of modern embedded products.
> -
> -The device is built over three domains, each containing specific processing
> -cores, voltage domains and peripherals:
> -1. Wake-up (WKUP) domain:
> - - Device Management and Security Controller (DMSC)
> -2. Microcontroller (MCU) domain:
> - - Dual Core ARM Cortex-R5F processor
> -3. MAIN domain:
> - - Quad core 64-bit ARM Cortex-A53
> -
> -More info can be found in TRM: http://www.ti.com/lit/pdf/spruid7
> -
> -Boot Flow:
> ---
> -On AM65x family devices, ROM supports boot only via MCU(R5). This means that
> -bootloader has to run on R5 core. In order to meet this constraint, and for
> -the following reasons the boot flow is 

Re: [U-Boot] [PATCH] imx: Add PHYTEC phyBOARD-i.MX6UL-Segin

2018-11-19 Thread Martyn Welch
On Thu, 2018-11-15 at 01:25 +0100, Lukasz Majewski wrote:
> Hi Martyn,
> 
> > Port for the PHYTEC phyBOARD-i.MX6UL-Segin single board computer.
> > Based on the PHYTEC phyCORE-i.MX6UL SOM (PCL063). This port
> > provides
> > both SPL and DCD based boot options (hence the two defconfigs).
> > 
> > CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
> > CPU:   Industrial temperature grade (-40C to 105C) at 44C
> > Reset cause: POR
> > Board: PHYTEC phyCORE-i.MX6UL
> > I2C:   ready
> > DRAM:  256 MiB
> > NAND:  512 MiB
> > MMC:   FSL_SDHC: 0
> > In:serial
> > Out:   serial
> > Err:   serial
> > Net:   FEC0
> > 
> > Working:
> >  - Eth0
> >  - Eth1
> >  - i2C
> >  - MMC/SD
> >  - NAND
> >  - UART (1 & 5)
> >  - USB (host & otg)
> 
> Could you double check if maybe you could use Driver Model versions
> of
> some drivers? To be more specific - the ETH interfaces, I2C, eMMC,
> etc.
> 

Hi Lukasz,

I've so far managed to get SD card, i2c and USB working via the driver
model, though I'm stuggling to get the Eth interfaces working - the
driver model probe doesn't seem to get the PHY addresses from the
device tree and I suspect it's also not able to pick up that both phys
are on the same MDIO bus form it either. Is this support still work in
progress?

Martyn

> > Signed-off-by: Martyn Welch 
> > 
> > ---
> > 
> >  arch/arm/mach-imx/mx6/Kconfig|   8 +
> >  board/phytec/pcl063/Kconfig  |  12 +
> >  board/phytec/pcl063/MAINTAINERS  |   7 +
> >  board/phytec/pcl063/Makefile |   7 +
> >  board/phytec/pcl063/README   |  43 +++
> >  board/phytec/pcl063/imximage.cfg | 177 +
> >  board/phytec/pcl063/pcl063.c | 379
> > +++ board/phytec/pcl063/spl.c|
> > 118 + configs/phycore_pcl063_defconfig |  47 
> >  configs/phycore_pcl063_spl_defconfig |  55 
> >  include/configs/pcl063.h | 107 
> >  11 files changed, 960 insertions(+)
> >  create mode 100644 board/phytec/pcl063/Kconfig
> >  create mode 100644 board/phytec/pcl063/MAINTAINERS
> >  create mode 100644 board/phytec/pcl063/Makefile
> >  create mode 100644 board/phytec/pcl063/README
> >  create mode 100644 board/phytec/pcl063/imximage.cfg
> >  create mode 100644 board/phytec/pcl063/pcl063.c
> >  create mode 100644 board/phytec/pcl063/spl.c
> >  create mode 100644 configs/phycore_pcl063_defconfig
> >  create mode 100644 configs/phycore_pcl063_spl_defconfig
> >  create mode 100644 include/configs/pcl063.h
> > 
> > diff --git a/arch/arm/mach-imx/mx6/Kconfig
> > b/arch/arm/mach-imx/mx6/Kconfig index 06c25bae36..22aea99f8f 100644
> > --- a/arch/arm/mach-imx/mx6/Kconfig
> > +++ b/arch/arm/mach-imx/mx6/Kconfig
> > @@ -428,6 +428,13 @@ config TARGET_PFLA02
> > select MX6QDL
> > select SUPPORT_SPL
> >  
> > +config TARGET_PCL063
> > +   bool "PHYTEC PCL063 (phyCORE-i.MX6UL)"
> > +   select MX6UL
> > +   select DM
> > +   select DM_THERMAL
> > +   select SUPPORT_SPL
> 
> Your board is only selecting DM_THERMAL.
> 
> One good way to check the list of DM aware (used) blocks is to run
> "dm
> list"
> 
> > +
> >  config TARGET_SECOMX6
> > bool "secomx6 boards"
> >  
> > @@ -550,6 +557,7 @@ source "board/freescale/mx6ullevk/Kconfig"
> >  source "board/grinn/liteboard/Kconfig"
> >  source "board/phytec/pcm058/Kconfig"
> >  source "board/phytec/pfla02/Kconfig"
> > +source "board/phytec/pcl063/Kconfig"
> >  source "board/gateworks/gw_ventana/Kconfig"
> >  source "board/kosagi/novena/Kconfig"
> >  source "board/samtec/vining_2000/Kconfig"
> > diff --git a/board/phytec/pcl063/Kconfig
> > b/board/phytec/pcl063/Kconfig
> > new file mode 100644
> > index 00..977db70f64
> > --- /dev/null
> > +++ b/board/phytec/pcl063/Kconfig
> > @@ -0,0 +1,12 @@
> > +if TARGET_PCL063
> > +
> > +config SYS_BOARD
> > +   default "pcl063"
> > +
> > +config SYS_VENDOR
> > +   default "phytec"
> > +
> > +config SYS_CONFIG_NAME
> > +   default "pcl063"
> > +
> > +endif
> > diff --git a/board/phytec/pcl063/MAINTAINERS
> > b/board/phytec/pcl063/MAINTAINERS new file mode 100644
> > index 00..8edc45827c
> > --- /dev/null
> > +++ b/board/phytec/pcl063/MAINTAINERS
> > @@ -0,0 +1,7 @@
> > +PCL063 BOARD
> > +M: Martyn Welch 
> > +S: Maintained
> > +F: board/phytec/pcl063/
> > +F: configs/phycore_pcl063_defconfig
> > +F: configs/phycore_pcl063_spl_defconfig
> > +F: include/configs/pcl063.h
> > diff --git a/board/phytec/pcl063/Makefile
> > b/board/phytec/pcl063/Makefile new file mode 100644
> > index 00..53c73c9b08
> > --- /dev/null
> > +++ b/board/phytec/pcl063/Makefile
> > @@ -0,0 +1,7 @@
> > +# Copyright (C) 2018 Collabora Ltd.
> > +#
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +
> > +obj-y  := pcl063.o
> > +obj-$(CONFIG_SPL_BUILD) += spl.o
> > diff --git a/board/phytec/pcl063/README
> > b/board/phytec/pcl063/README
> > new file mode 100644
> > index 00..d73e90e83d
> > --- /dev/null
> > +++ b/board/phytec/pcl063/README
> > @@ -0,0 

Re: [U-Boot] [PATCH] video: add command cls

2018-11-19 Thread Patrick DELAUNAY
Hi Anatolij,

> From: Anatolij Gustschin  
> Sent: samedi 17 novembre 2018 15:37
> 
Hi Patrick,
> 
> On Sat, 17 Nov 2018 14:50:26 +0100
> Anatolij Gustschin ag...@denx.de wrote:
> ...
>> Thanks for the patch! But I think we should remove this existing lcd 
>> specific cls and add a common command under cmd/cls.c. I'll submit a 
>> path for this.
>>
>> Please test using this patch [1].
>> 
>> [1] http://patchwork.ozlabs.org/patch/999320/

I agree, that adding a new command file in cmd directory is cleaner.
I hesitate to do the same when I prepare my patch.

This patchset is superseded by (1), tested on my side for DM_VIDEO 
configuration (stm32mp157 board).

> --
>Anatolij

Regards
Patrick
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 3/4] arm: socfpga: stratix10: Add Stratix10 FPGA into FPGA device table

2018-11-19 Thread Ang, Chee Hong
On Mon, 2018-11-19 at 14:12 +0100, Marek Vasut wrote:
> On 11/19/2018 10:57 AM, Simon Goldschmidt wrote:
> > 
> > On Mon, Nov 19, 2018 at 10:46 AM  wrote:
> > > 
> > > 
> > > From: "Ang, Chee Hong" 
> > > 
> > > Enable 'fpga' command in u-boot. User will be able to use the
> > > FPGA
> > > command to program the FPGA on Stratix10 SoC.
> > > 
> > > Signed-off-by: Ang, Chee Hong 
> > > ---
> > >  arch/arm/mach-socfpga/Makefile|  4 +++
> > >  arch/arm/mach-socfpga/fpga_device.c   | 59
> > > +++
> > >  arch/arm/mach-socfpga/include/mach/misc.h |  4 ---
> > >  arch/arm/mach-socfpga/misc.c  | 31 +---
> > >  arch/arm/mach-socfpga/misc_s10.c  |  2 ++
> > >  drivers/fpga/altera.c |  6 
> > >  include/altera.h  |  4 +++
> > >  7 files changed, 76 insertions(+), 34 deletions(-)
> > >  create mode 100644 arch/arm/mach-socfpga/fpga_device.c
> > > 
> > > diff --git a/arch/arm/mach-socfpga/Makefile b/arch/arm/mach-
> > > socfpga/Makefile
> > > index e667204..2ff1b3f 100644
> > > --- a/arch/arm/mach-socfpga/Makefile
> > > +++ b/arch/arm/mach-socfpga/Makefile
> > > @@ -10,6 +10,10 @@ obj-y+= clock_manager.o
> > >  obj-y  += misc.o
> > >  obj-y  += reset_manager.o
> > > 
> > > +ifdef CONFIG_FPGA
> > > +obj-y  += fpga_device.o
> > > +endif
> > > +
> > >  ifdef CONFIG_TARGET_SOCFPGA_GEN5
> > >  obj-y  += clock_manager_gen5.o
> > >  obj-y  += misc_gen5.o
> > > diff --git a/arch/arm/mach-socfpga/fpga_device.c b/arch/arm/mach-
> > > socfpga/fpga_device.c
> > > new file mode 100644
> > > index 000..97b27eb
> > > --- /dev/null
> > > +++ b/arch/arm/mach-socfpga/fpga_device.c
> > > @@ -0,0 +1,59 @@
> > > +// SPDX-License-Identifier: GPL-2.0+
> > > +/*
> > > + * Copyright (C) 2018 Intel Corporation 
> > > + */
> > > +
> > > +#include 
> > > +#include 
> > > +
> > > +#ifdef CONFIG_FPGA_STRATIX10
> > > +/*
> > > + * FPGA programming support for SoC FPGA Stratix 10
> > > + */
> > > +static Altera_desc altera_fpga[] = {
> > > +   {
> > > +   /* Family */
> > > +   Intel_FPGA_Stratix10,
> > > +   /* Interface type */
> > > +   secure_device_manager_mailbox,
> > > +   /* No limitation as additional data will be
> > > ignored */
> > > +   -1,
> > > +   /* No device function table */
> > > +   NULL,
> > > +   /* Base interface address specified in driver */
> > > +   NULL,
> > > +   /* No cookie implementation */
> > > +   0
> > > +   },
> > > +};
> > > +#else
> > > +/*
> > > + * FPGA programming support for SoC FPGA Cyclone V
> > > + */
> > > +static Altera_desc altera_fpga[] = {
> > > +   {
> > > +   /* Family */
> > > +   Altera_SoCFPGA,
> > > +   /* Interface type */
> > > +   fast_passive_parallel,
> > > +   /* No limitation as additional data will be
> > > ignored */
> > > +   -1,
> > > +   /* No device function table */
> > > +   NULL,
> > > +   /* Base interface address specified in driver */
> > > +   NULL,
> > > +   /* No cookie implementation */
> > > +   0
> > > +   },
> > > +};
> > > +#endif
> > > +
> > > +/* add device descriptor to FPGA device table */
> > > +void socfpga_fpga_add(void)
> > > +{
> > > +   int i;
> > > +
> > > +   fpga_init();
> > > +   for (i = 0; i < ARRAY_SIZE(altera_fpga); i++)
> > > +   fpga_add(fpga_altera, _fpga[i]);
> > > +}
> > > diff --git a/arch/arm/mach-socfpga/include/mach/misc.h
> > > b/arch/arm/mach-socfpga/include/mach/misc.h
> > > index 4fc9570..6fa9495 100644
> > > --- a/arch/arm/mach-socfpga/include/mach/misc.h
> > > +++ b/arch/arm/mach-socfpga/include/mach/misc.h
> > > @@ -15,11 +15,7 @@ struct bsel {
> > > 
> > >  extern struct bsel bsel_str[];
> > > 
> > > -#ifdef CONFIG_FPGA
> > >  void socfpga_fpga_add(void);
> > > -#else
> > > -static inline void socfpga_fpga_add(void) {}
> > > -#endif
> > > 
> > >  #ifdef CONFIG_TARGET_SOCFPGA_GEN5
> > >  void socfpga_sdram_remap_zero(void);
> > > diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-
> > > socfpga/misc.c
> > > index a4f6d5c..55f846a 100644
> > > --- a/arch/arm/mach-socfpga/misc.c
> > > +++ b/arch/arm/mach-socfpga/misc.c
> > > @@ -87,36 +87,7 @@ int overwrite_console(void)
> > >  }
> > >  #endif
> > > 
> > > -#ifdef CONFIG_FPGA
> > > -/*
> > > - * FPGA programming support for SoC FPGA Cyclone V
> > > - */
> > > -static Altera_desc altera_fpga[] = {
> > > -   {
> > > -   /* Family */
> > > -   Altera_SoCFPGA,
> > > -   /* Interface type */
> > > -   fast_passive_parallel,
> > > -   /* No limitation as additional data will be
> > > ignored */
> > > -   -1,
> > > -   /* No device function 

[U-Boot] Re : Re: [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Guillaume GARDET

- Tom Rini  a écrit :
> On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
> 
> > This patch allows SPL to load a bigger BL2 (u-boot.bin).
> > This is needed for and has been tested on Arndale board, as u-boot.bin is 
> > now bigger than 512K with GCC8.
> > 
> > Signed-off-by: Guillaume GARDET 
> > 
> > Cc: Minkyu Kang 
> > Cc: Tom Rini 
> > ---
> >  include/configs/exynos5-common.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Are these platforms using thumb2 to build?  Were it not for some early
> Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a
> global switch to making that option default.

No, they are not using thumb2:
# CONFIG_SYS_THUMB_BUILD is not set
# CONFIG_SPL_SYS_THUMB_BUILD is not set


Guillaume

> 
> -- 
> Tom

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


Re: [U-Boot] [PATCH v7 00/11] [RESEND] Add support for DM_USB and DM_USB_DEV for TI's DRA7 EVMs and AM57 EVMs platforms.

2018-11-19 Thread Jean-Jacques Hiblot

Hi Lukasz,

On 19/11/2018 09:11, Lukasz Majewski wrote:

Hi Jean-Jacques,


Resending this series after rebasing on top of latest u-boot.
This series applies on top of the series "[PATCH v3 0/7] Improvements
for the dwc3_generic driver"

Moving to DM_USB and DM_USB_DEV brings some benefits:
- it is required to support DM_ETH and USB network adapters with the
same binary.
- support for USB3 on AM57x comes almost for free
- removal of platform code related to USB

Tested on:
- dra76 evm
- AM572 evm


I've tried to merge and test your patches:
SHA1: 0c4b382f9041f9f2f00246c8a0ece90dae5451be
https://github.com/lmajewski/u-boot-dfu/commits/testing


The results from Travis-CI:
https://travis-ci.org/lmajewski/u-boot-dfu/jobs/456736504

It breaks for e.g. OMAP.


Thanks for testing it.

This series applies on top of the series "[PATCH v3 0/7] Improvements 
for the dwc3_generic driver". This is required to set the direction of 
PHY (peripheral or host).


This is the reason why it fails to build properly.


JJ



Could you check this problem and resubmit patches?

Thanks in advance,
Łukasz


Changes in v7:
- replace remaining if() statements with ut_assert()
- Fix build issue "multiple definition of
`usb_gadget_handle_interrupts'"
- Fixed build issue "multiple definition of
`usb_gadget_handle_interrupts'"

Changes in v6:
- ti-pipe3-phy: take PLL out of IDLE in pipe3_init(). The PLL may have
   been put into idle by pipe3_exit()
- DRA7 configs: enable DM_USB and DM_USB_DEV. Use DWC3_GENERIC in
place of DWC3_OF_SIMPLE. disable non DM USB options
- AM57 configs: enable DM_USB and DM_USB_DEV. Use DWC3_GENERIC in
place of DWC3_OF_SIMPLE. disable non DM USB options
- Supports DM USB for peripherals
- Removed DTS changes that disabled USB1 on DRA7 because DM_USB_DEV is
   now supported

Changes in v5:
- Rebased on latest u-boot
- Removed patches that have already been merged

Changes in v4:
- Fix word missing in commit log
- Remove dependency on MISC
- Renamed the commit (DM_USB is already enabled, the only missing
option is for the USB2 phy driver)
- Remove dependency on MISC
- Remove omap specific glue layer and use dwc3-of-simple glue layer

Changes in v3:
- in syscon_regmap_lookup_by_phandle(), use dev_dbg() instead of
printf()
- added unit test for syscon_regmap_lookup_by_phandle()

Changes in v2:
- Add USB3 support to ti-pipe3-phy driver
- omap-usb2-phy: Implement power_on and power_off callbacks
- am57xx boards: when DM_USB is used, turn on the required USB clocks
- split dts changes in 2 commits: one for binding the children of
   ocp2scp@4a08, and one to disable USB1  on all DRA7 EVMs
- Enable DM_USB in am57xx_evm_defconfig. USB3 (super speed) is
supported.

Jean-Jacques Hiblot (9):
   syscon: dm: Add a new method to get a regmap from DTS
   phy: Add a new driver for OMAP's USB2 PHYs
   dwc3-generic: Add support for the TI DWC3 glue
   board: ti: dra7xx-evm: turn on USB clocks in late init stage
   dts: dra7x: make ocp2scp@4a08 compatible with simple-bus
   configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
   configs: am57xx_evm: Enable DM_USB and DM_USB_DEV
   board: ti: dra7-evm: remove USB platform code
   board: ti: am57xx: remove USB platform code

Vignesh R (2):
   phy: ti-pip3-phy: Add support for USB3 PHY
   board; ti: am57xx: turn on USB clocks

  arch/arm/dts/omap5-u-boot.dtsi  |   4 +
  arch/sandbox/dts/test.dts   |   6 +-
  board/ti/am57xx/board.c | 106 --
  board/ti/dra7xx/evm.c   | 123 -
  configs/am57xx_evm_defconfig|  10 +-
  configs/am57xx_hs_evm_defconfig |  10 +-
  configs/dra7xx_evm_defconfig|   8 +-
  configs/dra7xx_hs_evm_defconfig |   8 +-
  drivers/core/syscon-uclass.c|  23 +
  drivers/phy/Kconfig |   9 ++
  drivers/phy/Makefile|   1 +
  drivers/phy/omap-usb2-phy.c | 196

drivers/phy/ti-pipe3-phy.c  |  32 +--
drivers/usb/dwc3/dwc3-generic.c |  85 +
include/syscon.h|  13 +++
test/dm/syscon.c|  29 ++ 16 files changed, 448
insertions(+), 215 deletions(-) create mode 100644
drivers/phy/omap-usb2-phy.c





Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de

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


Re: [U-Boot] [PATCH 50/93] arm: Remove imx6dl_mamoj board

2018-11-19 Thread Jagan Teki
On Mon, Nov 19, 2018 at 9:25 PM Simon Glass  wrote:
>
> This board has not been converted to CONFIG_DM_BLK by the deadline.
> Remove it.

It is CONFIG_BLK right? which is driver model block layer and it's
already enabled. Did I missed anything?

₹ ls drivers/block/*.o
drivers/block/blkcache.o  drivers/block/blk-uclass.o  drivers/block/built-in.o
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Re : Re: Re : Re: [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Guillaume GARDET

- Tom Rini  a écrit :
> On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
> > 
> > - Tom Rini  a écrit :
> > > On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
> > > 
> > > > This patch allows SPL to load a bigger BL2 (u-boot.bin).
> > > > This is needed for and has been tested on Arndale board, as u-boot.bin 
> > > > is 
> > > > now bigger than 512K with GCC8.
> > > > 
> > > > Signed-off-by: Guillaume GARDET 
> > > > 
> > > > Cc: Minkyu Kang 
> > > > Cc: Tom Rini 
> > > > ---
> > > >  include/configs/exynos5-common.h | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > Are these platforms using thumb2 to build?  Were it not for some early
> > > Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a
> > > global switch to making that option default.
> > 
> > No, they are not using thumb2:
> > # CONFIG_SYS_THUMB_BUILD is not set
> > # CONFIG_SPL_SYS_THUMB_BUILD is not set
> 
> I would suggest switching that on instead then.  I'm always wary of
> changing stuff on the flash layout.

I tested thumb2 for SPL and u-boot.bin on arndale and it does boot properly.
u-boot.bin is 397KB with thumb2, which is OK.

Should I make the switch for Arndale board only, or on a bigger range?

Guillaume

> 
> -- 
> Tom

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


Re: [U-Boot] [PATCH v7 00/11] [RESEND] Add support for DM_USB and DM_USB_DEV for TI's DRA7 EVMs and AM57 EVMs platforms.

2018-11-19 Thread Lukasz Majewski
Hi Jean-Jacques,

> Hi Lukasz,
> 
> On 19/11/2018 09:11, Lukasz Majewski wrote:
> > Hi Jean-Jacques,
> >  
> >> Resending this series after rebasing on top of latest u-boot.
> >> This series applies on top of the series "[PATCH v3 0/7]
> >> Improvements for the dwc3_generic driver"
> >>
> >> Moving to DM_USB and DM_USB_DEV brings some benefits:
> >> - it is required to support DM_ETH and USB network adapters with
> >> the same binary.
> >> - support for USB3 on AM57x comes almost for free
> >> - removal of platform code related to USB
> >>
> >> Tested on:
> >> - dra76 evm
> >> - AM572 evm
> >>  
> > I've tried to merge and test your patches:
> > SHA1: 0c4b382f9041f9f2f00246c8a0ece90dae5451be
> > https://github.com/lmajewski/u-boot-dfu/commits/testing
> >
> >
> > The results from Travis-CI:
> > https://travis-ci.org/lmajewski/u-boot-dfu/jobs/456736504
> >
> > It breaks for e.g. OMAP.  
> 
> Thanks for testing it.
> 
> This series applies on top of the series "[PATCH v3 0/7] Improvements 
> for the dwc3_generic driver". This is required to set the direction
> of PHY (peripheral or host).

Ach... Ok. I will re-test it. Thanks for the hint.

> 
> This is the reason why it fails to build properly.
> 
> 
> JJ
> 
> >
> > Could you check this problem and resubmit patches?
> >
> > Thanks in advance,
> > Łukasz
> >  
> >> Changes in v7:
> >> - replace remaining if() statements with ut_assert()
> >> - Fix build issue "multiple definition of
> >> `usb_gadget_handle_interrupts'"
> >> - Fixed build issue "multiple definition of
> >> `usb_gadget_handle_interrupts'"
> >>
> >> Changes in v6:
> >> - ti-pipe3-phy: take PLL out of IDLE in pipe3_init(). The PLL may
> >> have been put into idle by pipe3_exit()
> >> - DRA7 configs: enable DM_USB and DM_USB_DEV. Use DWC3_GENERIC in
> >> place of DWC3_OF_SIMPLE. disable non DM USB options
> >> - AM57 configs: enable DM_USB and DM_USB_DEV. Use DWC3_GENERIC in
> >> place of DWC3_OF_SIMPLE. disable non DM USB options
> >> - Supports DM USB for peripherals
> >> - Removed DTS changes that disabled USB1 on DRA7 because
> >> DM_USB_DEV is now supported
> >>
> >> Changes in v5:
> >> - Rebased on latest u-boot
> >> - Removed patches that have already been merged
> >>
> >> Changes in v4:
> >> - Fix word missing in commit log
> >> - Remove dependency on MISC
> >> - Renamed the commit (DM_USB is already enabled, the only missing
> >> option is for the USB2 phy driver)
> >> - Remove dependency on MISC
> >> - Remove omap specific glue layer and use dwc3-of-simple glue layer
> >>
> >> Changes in v3:
> >> - in syscon_regmap_lookup_by_phandle(), use dev_dbg() instead of
> >> printf()
> >> - added unit test for syscon_regmap_lookup_by_phandle()
> >>
> >> Changes in v2:
> >> - Add USB3 support to ti-pipe3-phy driver
> >> - omap-usb2-phy: Implement power_on and power_off callbacks
> >> - am57xx boards: when DM_USB is used, turn on the required USB
> >> clocks
> >> - split dts changes in 2 commits: one for binding the children of
> >>ocp2scp@4a08, and one to disable USB1  on all DRA7 EVMs
> >> - Enable DM_USB in am57xx_evm_defconfig. USB3 (super speed) is
> >> supported.
> >>
> >> Jean-Jacques Hiblot (9):
> >>syscon: dm: Add a new method to get a regmap from DTS
> >>phy: Add a new driver for OMAP's USB2 PHYs
> >>dwc3-generic: Add support for the TI DWC3 glue
> >>board: ti: dra7xx-evm: turn on USB clocks in late init stage
> >>dts: dra7x: make ocp2scp@4a08 compatible with simple-bus
> >>configs: enable DM_USB and DM_USB_DEV for all DRA7 platforms
> >>configs: am57xx_evm: Enable DM_USB and DM_USB_DEV
> >>board: ti: dra7-evm: remove USB platform code
> >>board: ti: am57xx: remove USB platform code
> >>
> >> Vignesh R (2):
> >>phy: ti-pip3-phy: Add support for USB3 PHY
> >>board; ti: am57xx: turn on USB clocks
> >>
> >>   arch/arm/dts/omap5-u-boot.dtsi  |   4 +
> >>   arch/sandbox/dts/test.dts   |   6 +-
> >>   board/ti/am57xx/board.c | 106 --
> >>   board/ti/dra7xx/evm.c   | 123 -
> >>   configs/am57xx_evm_defconfig|  10 +-
> >>   configs/am57xx_hs_evm_defconfig |  10 +-
> >>   configs/dra7xx_evm_defconfig|   8 +-
> >>   configs/dra7xx_hs_evm_defconfig |   8 +-
> >>   drivers/core/syscon-uclass.c|  23 +
> >>   drivers/phy/Kconfig |   9 ++
> >>   drivers/phy/Makefile|   1 +
> >>   drivers/phy/omap-usb2-phy.c | 196
> >> 
> >> drivers/phy/ti-pipe3-phy.c  |  32 +--
> >> drivers/usb/dwc3/dwc3-generic.c |  85 +
> >> include/syscon.h|  13 +++
> >> test/dm/syscon.c|  29 ++ 16 files changed, 448
> >> insertions(+), 215 deletions(-) create mode 100644
> >> drivers/phy/omap-usb2-phy.c
> >>  
> >
> >
> >
> > Best regards,
> >
> > Lukasz Majewski
> >
> > --
> >
> > DENX Software Engineering GmbH,  Managing Director: Wolfgang
> > Denk HRB 165235 Munich, 

Re: [U-Boot] Re : Re: [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Tom Rini
On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
> 
> - Tom Rini  a écrit :
> > On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
> > 
> > > This patch allows SPL to load a bigger BL2 (u-boot.bin).
> > > This is needed for and has been tested on Arndale board, as u-boot.bin is 
> > > now bigger than 512K with GCC8.
> > > 
> > > Signed-off-by: Guillaume GARDET 
> > > 
> > > Cc: Minkyu Kang 
> > > Cc: Tom Rini 
> > > ---
> > >  include/configs/exynos5-common.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Are these platforms using thumb2 to build?  Were it not for some early
> > Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a
> > global switch to making that option default.
> 
> No, they are not using thumb2:
> # CONFIG_SYS_THUMB_BUILD is not set
> # CONFIG_SPL_SYS_THUMB_BUILD is not set

I would suggest switching that on instead then.  I'm always wary of
changing stuff on the flash layout.

-- 
Tom


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


Re: [U-Boot] [PATCH v5 05/18] arm: MediaTek: add basic support for MT7623 boards

2018-11-19 Thread Simon Glass
Hi Weijie,

On Mon, 19 Nov 2018 at 00:16, Weijie Gao  wrote:
>
> On Fri, 2018-11-16 at 11:26 -0700, Simon Glass wrote:
> > Hi Weijie,
> >
> > On 15 November 2018 at 23:08, Weijie Gao 
> > wrote:
> > > On Thu, 2018-11-15 at 11:21 -0800, Simon Glass wrote:
> > >> Hi,
> > >>
> > >> On 14 November 2018 at 18:07, Ryder Lee 
> > wrote:
> > >> > From: Weijie Gao 
> > >> >
> > >> > This adds a general board file based on MT7623 SoCs from
> > MediaTek.
> > >> >
> > >> > As this u-boot is loaded by MTK proprietary preloader, there is
> > no
> > >> > low level initializtion codes.
> > >> >
> > >> > Signed-off-by: Weijie Gao 
> > >> > Signed-off-by: Ryder Lee 
> > >> > Tested-by: Matthias Brugger 
> > >> > ---
> > >> > Changes since v5: None
> > >> > Changes since v4:
> > >> > -Add gd->bd->bi_boot_params for legacy method - ATAGs.
> > >> > ---
> > >> >  arch/arm/mach-mediatek/Kconfig| 13 
> > >> >  arch/arm/mach-mediatek/Makefile   |  1 +
> > >> >  arch/arm/mach-mediatek/mt7623/Makefile|  4 ++
> > >> >  arch/arm/mach-mediatek/mt7623/init.c  | 54
> > +++
> > >> >  arch/arm/mach-mediatek/mt7623/lowlevel_init.S | 22 ++
> > >> >  arch/arm/mach-mediatek/mt7623/preloader.h | 99
> > +++
> > >> >  board/mediatek/mt7623/Kconfig | 13 
> > >> >  board/mediatek/mt7623/MAINTAINERS |  7 ++
> > >> >  board/mediatek/mt7623/Makefile|  3 +
> > >> >  board/mediatek/mt7623/mt7623_rfb.c| 16 +
> > >> >  configs/mt7623n_bpir2_defconfig   | 54
> > +++
> > >> >  include/configs/mt7623.h  | 56
> > +++
> > >> >  12 files changed, 342 insertions(+)
> > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/Makefile
> > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/init.c
> > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/lowlevel_init.S
> > >> >  create mode 100644 arch/arm/mach-mediatek/mt7623/preloader.h
> > >> >  create mode 100644 board/mediatek/mt7623/Kconfig
> > >> >  create mode 100644 board/mediatek/mt7623/MAINTAINERS
> > >> >  create mode 100644 board/mediatek/mt7623/Makefile
> > >> >  create mode 100644 board/mediatek/mt7623/mt7623_rfb.c
> > >> >  create mode 100644 configs/mt7623n_bpir2_defconfig
> > >> >  create mode 100644 include/configs/mt7623.h
> > >>
> > >> Can this use the bloblist feature which should land soon?
> > >>
> > >> For now, see dm/spl-working.
> > >>
> > >> Regards,
> > >> Simon
> > >
> > > Hi Simon,
> > >
> > > I've read the code for spl handoff. It's a good way though but
> > > unfortunately it cannot be applied to the MT7623 boards.
> > >
> > > The reason is that MT7623 uses a MediaTek proprietary preloader
> > which
> > > has the same function as the U-Boot SPL. But the preloader is
> > > close-sourced (by company policy) and only available in binary
> > release.
> > > This means we can't use a real U-Boot SPL to replace the preloader.
> >
> > Can you work to get U-Boot SPL running on the chip?
> >
> > What is the reason for the proprietary SPL?
> >
> > >
> > > At present this chip has already been used in many products. We
> > can't
> > > either release a different preloader which introduces compatibility
> > > issues.
> >
> > What sort of compatibility issues? I cannot see any advantage with a
> > proprietary SPL.
> >
> > >
> > > So the conclusion is that we cannot use the bloblist feature for
> > this
> > > SoC.
> >
> > Regards,
> > Simon
> >
> Hi Simon,
>
>
> Sorry for that I didn't describe the function of the preloader clearly.
>
> The MT7623 is like a smart phone SoC which has the ability to upgrade
> bootloader/firmware via a USB cable. This function is always available
> even if there is no valid preloader/bootloader.
>
> This is done by cooperation of the BootROM and preloader. This is a
> simple description of the flow:
> 1. Connect the MT7623 board to the PC using USB cable. Do not power up.
> 2. Run MediaTek's FlashTool and start downloading.
> 3. Power up the board.
> 4. The BootROM will initialize the USB device immediately for few
>seconds and waiting for commands from PC.
> 5. The PC will start transmit commands to the board as soon as it
>detects the board device.
> 6. Thee BootROM will then download the preloader into SRAM, and run it.
>Several informations will be passed to the preloader, to let it
>continue to communicate with the FlashTool.
> 7. The preloader will initialize the DRAM, download data via USB and
>write it to flash.
>
> So the preloader is not only a simple SPL. It initializes DRAM and many
> other components which will only be initialized once or used by
> preloader. It also performs USB downloading and other things.
>
> The preloader is also used by other MediaTek's smart phone SoCs. The
> DRAM initialization code is the mainly part that are not allowed to be
> open-sourced.
>
> The preloader has so many functions which are not 

Re: [U-Boot] [PATCH 0/2] dm: Complete CONFIG_BLK migration

2018-11-19 Thread Dennis Gilmore
El mié, 27-06-2018 a las 17:40 -0400, Tom Rini escribió:
> On Sat, Jun 23, 2018 at 07:59:30AM -0600, Simon Glass wrote:
> > The time has come to migrate all boards to use CONFIG_BLK. This
> > series
> > is just a test to see what boards would have to be removed if we
> > required
> > CONFIG_BLK, as we plan to after the next release.
> > 
> > This should help maintainers see what is impacted.
> > 
> > Hopefully maintainers will be able to convert their boards over in
> > the
> > next month so we we can avoid having to remove any boards.
> > 
> > The goal is to have all boards use driver model. But so far, we do
> > allow
> > CONFIG_DM to not be defined.
> > 
> > 
> > For 'Force BLK', here is the buildman output showing failed boards
> > and the
> > relatively small number of command errors:
> > 
> > 03: Force BLK
> >   mips:  +   pic32mzdask
> >arm:  +   mixtile_loftq colibri_imx6_nospl sniper
> > omap3_zoom1 tbs2910 Mele_A1000G_quad
> > am335x_igep003x mx6ul_14x14_evk mk802_a10s am43xx_hs_evm devkit3250
> > pcm051_rev3
> > am57xx_hs_evm Empire_electronix_m712 Auxtek-T003 pcm058 zc5202
> > am335x_shc
> > am335x_shc_ict Hummingbird_A31 vining_2000 am335x_evm_usbspl
> > ot1200_spl igep00x0
> > Mele_I7 Wobo_i5 r7-tv-dongle liteboard omap3_overo am335x_boneblack
> > evb-ast2500
> > warp7 gwventana_gw5904 cairo A13-OLinuXinoM mccmon6_sd
> > apalis_imx6_nospl_it
> > wandboard birdland_bav335a colibri_imx7 colibri_imx6 inet_q972
> > xpress_spl
> > stm32f429-evaluation udoo_neo igep0032 Mele_M9 A13-OLinuXino
> > inet98v_rev2
> > A10s-OLinuXino-M riotboard snapper9260 am43xx_evm pfla02
> > mx6qsabrelite
> > apalis_imx6_nospl_com s5p_goni colibri_pxa270 snapper9g20
> > Yones_Toptech_BS1078_V2 am335x_shc_sdboot_prompt k2g_hs_evm cl-som-
> > imx7
> > am335x_shc_sdboot vf610twr_nand stm32f469-discovery am335x_evm_nor
> > mx53cx9020
> > Empire_electronix_d709 vf610twr cm_t43 pengwyn stm32f746-disco
> > Sinovoip_BPI_M2
> > Sinovoip_BPI_M3 Sinlinx_SinA31s pico-imx7d am43xx_evm_rtconly
> > LicheePi_Zero
> > pcm051_rev1 mccmon6_nor mx6sabreauto display5_factory
> > am335x_shc_prompt
> > gwventana_nand Bananapi_M2_Ultra Auxtek-T004 tbs_a711 cm_t335
> > h8_homlet_v2
> > Colombus am43xx_evm_usbhost_boot chiliboard am335x_baltos
> > colibri_vf
> > mx6ul_9x9_evk kp_imx6q_tpc bk4r1 udoo difrnce_dit4350
> > am335x_evm_norboot
> > UTOO_P66 iNet_86VS marsboard MSI_Primo81 apalis_imx6
> > bananapi_m2_berry
> > xilinx_zynqmp_r5 birdland_bav335b am43xx_evm_qspiboot CSQ_CS908
> > Ampe_A76
> > kp_imx53 am335x_evm_spiboot Cubietruck_plus k2g_evm mx6sabresd
> > omap3_logic
> > pepper colorfly_e708_q1 pcm052 gwventana_emmc
> > am335x_boneblack_vboot
> > am335x_shc_netboot xpress ot1200 cgtqmx6eval zc5601 devkit8000
> > dh_imx6 mx6cuboxi
> > am57xx_evm am335x_sl50 q8_a13_tablet sksimx6
> > 
> > microblaze:  +   microblaze-generic
> >powerpc:  +   P1010RDB-PA_36BIT_NOR_SECBOOT
> > BSC9132QDS_SDCARD_DDRCLK100_SECURE
> > P1010RDB-PB_SPIFLASH_SECBOOT T1024QDS_DDR4_SECURE_BOOT
> > controlcenterd_36BIT_SDCARD BSC9132QDS_SDCARD_DDRCLK133_SECURE
> > P1010RDB-PA_SPIFLASH_SECBOOT BSC9132QDS_NAND_DDRCLK133_SECURE
> > P1010RDB-PA_36BIT_SPIFLASH_SECBOOT P2041RDB_SECURE_BOOT
> > P5020DS_NAND_SECURE_BOOT
> > P1010RDB-PB_36BIT_NOR_SECBOOT BSC9132QDS_NOR_DDRCLK100_SECURE
> > P3041DS_SECURE_BOOT T1042D4RDB_SECURE_BOOT T1042RDB_SECURE_BOOT
> > T4240QDS_SECURE_BOOT P1010RDB-PB_36BIT_SPIFLASH_SECBOOT P1010RDB-
> > PB_NAND_SECBOOT
> > BSC9132QDS_SPIFLASH_DDRCLK100_SECURE P3041DS_NAND_SECURE_BOOT
> > T4160QDS_SECURE_BOOT T2080RDB_SECURE_BOOT B4860QDS_SECURE_BOOT
> > P4080DS_SECURE_BOOT T2080QDS_SECURE_BOOT P5040DS_SECURE_BOOT
> > P1010RDB-PB_36BIT_NAND_SECBOOT controlcenterd_36BIT_SDCARD_DEVELOP
> > P1010RDB-PA_NAND_SECBOOT BSC9132QDS_SPIFLASH_DDRCLK133_SECURE
> > P1010RDB-PA_NOR_SECBOOT controlcenterd_TRAILBLAZER_DEVELOP
> > P5020DS_SECURE_BOOT
> > T1024QDS_SECURE_BOOT T1040QDS_SECURE_BOOT
> > BSC9132QDS_NOR_DDRCLK133_SECURE
> > T1024RDB_SECURE_BOOT P5040DS_NAND_SECURE_BOOT P1010RDB-
> > PA_36BIT_NAND_SECBOOT
> > T1042RDB_PI_NAND_SECURE_BOOT T1040RDB_SECURE_BOOT
> > T1040D4RDB_SECURE_BOOT
> > BSC9132QDS_NAND_DDRCLK100_SECURE P1010RDB-PB_NOR_SECBOOT
> > T1023RDB_SECURE_BOOT
> > controlcenterd_TRAILBLAZER
> 
> So, how are the maintainers CC'd on this feeling about the
> deadline?  It
> was supposed to be 2018.05, but it's looking like we would enforce it
> for 2018.09 at this point in time.

My board was added around this time according to the email list it was
added on June 12th, 11 days before this email went out. I have not
changed anything that would affect this in the meantime, and there was
zero followups until today. I feel a bit caught off guard by it all. is
there a doc somewhere that outlines the needed changes?

Dennis

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


Re: [U-Boot] [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

2018-11-19 Thread Tom Rini
On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:

> This patch allows SPL to load a bigger BL2 (u-boot.bin).
> This is needed for and has been tested on Arndale board, as u-boot.bin is 
> now bigger than 512K with GCC8.
> 
> Signed-off-by: Guillaume GARDET 
> 
> Cc: Minkyu Kang 
> Cc: Tom Rini 
> ---
>  include/configs/exynos5-common.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Are these platforms using thumb2 to build?  Were it not for some early
Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a
global switch to making that option default.

-- 
Tom


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


[U-Boot] [PATCH 70/93] arm: Remove ap121 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/mips/mach-ath79/Kconfig |  1 -
 board/qca/ap121/Kconfig  | 27 
 board/qca/ap121/MAINTAINERS  |  6 
 board/qca/ap121/Makefile |  3 --
 board/qca/ap121/ap121.c  | 46 ---
 configs/ap121_defconfig  | 60 
 include/configs/ap121.h  | 46 ---
 7 files changed, 189 deletions(-)
 delete mode 100644 board/qca/ap121/Kconfig
 delete mode 100644 board/qca/ap121/MAINTAINERS
 delete mode 100644 board/qca/ap121/Makefile
 delete mode 100644 board/qca/ap121/ap121.c
 delete mode 100644 configs/ap121_defconfig
 delete mode 100644 include/configs/ap121.h

diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index 1553aabcea7..3d9c616bc0e 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -50,7 +50,6 @@ config BOARD_TPLINK_WDR4300
 
 endchoice
 
-source "board/qca/ap121/Kconfig"
 source "board/tplink/wdr4300/Kconfig"
 
 endmenu
diff --git a/board/qca/ap121/Kconfig b/board/qca/ap121/Kconfig
deleted file mode 100644
index 4fd6a7167a5..000
--- a/board/qca/ap121/Kconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-if TARGET_AP121
-
-config SYS_VENDOR
-   default "qca"
-
-config SYS_BOARD
-   default "ap121"
-
-config SYS_CONFIG_NAME
-   default "ap121"
-
-config SYS_TEXT_BASE
-   default 0x9f00
-
-config SYS_DCACHE_SIZE
-   default 32768
-
-config SYS_DCACHE_LINE_SIZE
-   default 32
-
-config SYS_ICACHE_SIZE
-   default 65536
-
-config SYS_ICACHE_LINE_SIZE
-   default 32
-
-endif
diff --git a/board/qca/ap121/MAINTAINERS b/board/qca/ap121/MAINTAINERS
deleted file mode 100644
index 8b02988d605..000
--- a/board/qca/ap121/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-AP121 BOARD
-M: Wills Wang 
-S: Maintained
-F: board/qca/ap121/
-F: include/configs/ap121.h
-F: configs/ap121_defconfig
diff --git a/board/qca/ap121/Makefile b/board/qca/ap121/Makefile
deleted file mode 100644
index 7cdf53cf9ec..000
--- a/board/qca/ap121/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-
-obj-y  = ap121.o
diff --git a/board/qca/ap121/ap121.c b/board/qca/ap121/ap121.c
deleted file mode 100644
index 24acdcb2e6f..000
--- a/board/qca/ap121/ap121.c
+++ /dev/null
@@ -1,46 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2015-2016 Wills Wang 
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#ifdef CONFIG_DEBUG_UART_BOARD_INIT
-void board_debug_uart_init(void)
-{
-   void __iomem *regs;
-   u32 val;
-
-   regs = map_physmem(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE,
-  MAP_NOCACHE);
-
-   /*
-* GPIO9 as input, GPIO10 as output
-*/
-   val = readl(regs + AR71XX_GPIO_REG_OE);
-   val &= ~AR933X_GPIO(9);
-   val |= AR933X_GPIO(10);
-   writel(val, regs + AR71XX_GPIO_REG_OE);
-
-   /*
-* Enable UART, GPIO9 as UART_SI, GPIO10 as UART_SO
-*/
-   val = readl(regs + AR71XX_GPIO_REG_FUNC);
-   val |= AR933X_GPIO_FUNC_UART_EN | AR933X_GPIO_FUNC_RES_TRUE;
-   writel(val, regs + AR71XX_GPIO_REG_FUNC);
-}
-#endif
-
-int board_early_init_f(void)
-{
-   ddr_init();
-   ath79_eth_reset();
-   return 0;
-}
diff --git a/configs/ap121_defconfig b/configs/ap121_defconfig
deleted file mode 100644
index 5d54267cd34..000
--- a/configs/ap121_defconfig
+++ /dev/null
@@ -1,60 +0,0 @@
-CONFIG_MIPS=y
-CONFIG_SYS_TEXT_BASE=0x9F00
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_DEBUG_UART_BOARD_INIT=y
-CONFIG_DEBUG_UART_BASE=0xb802
-CONFIG_DEBUG_UART_CLOCK=2500
-CONFIG_ARCH_ATH79=y
-CONFIG_DEBUG_UART=y
-CONFIG_BOOTDELAY=3
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs"
-CONFIG_DISPLAY_CPUINFO=y
-CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_SYS_PROMPT="ap121 # "
-# CONFIG_CMD_BDI is not set
-# CONFIG_CMD_CONSOLE is not set
-# CONFIG_CMD_ELF is not set
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_IMPORTENV is not set
-# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_CRC32 is not set
-CONFIG_CMD_MEMTEST=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_MTDPARTS=y
-CONFIG_MTDIDS_DEFAULT="nor0=spi-flash.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6144k(rootfs),1600k(uImage),64k(NVRAM),64k(ART)"
-# CONFIG_ISO_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="ap121"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_DM_SPI_FLASH=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_BAR=y
-CONFIG_SPI_FLASH_ATMEL=y
-CONFIG_SPI_FLASH_EON=y
-CONFIG_SPI_FLASH_GIGADEVICE=y
-CONFIG_SPI_FLASH_MACRONIX=y
-CONFIG_SPI_FLASH_SPANSION=y
-CONFIG_SPI_FLASH_STMICRO=y

[U-Boot] [PATCH 91/93] dm: Enable CONFIG_BLK

2018-11-19 Thread Simon Glass
As per the migration plan in MIGRATION.txt all boards should now be
migrated to use CONFIG_BLK.

Enable the CONFIG_BLK option for all boards that use CONFIG_DM. Allow
sandbox_noblk to continue to build until migration is complete.

Signed-off-by: Simon Glass 
---

 drivers/block/Kconfig | 2 +-
 drivers/mmc/Kconfig   | 2 +-
 drivers/usb/Kconfig   | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 33f4aa24185..2e6b87a48a7 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -1,7 +1,7 @@
 config BLK
bool "Support block devices"
depends on DM
-   default y if DM_MMC
+   default y
help
  Enable support for block devices, such as SCSI, MMC and USB
  flash sticks. These provide a block-level interface which permits
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 27246ee4658..1ec23145aa3 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -26,6 +26,7 @@ config MMC_BROKEN_CD
 config DM_MMC
bool "Enable MMC controllers using Driver Model"
depends on DM
+   default y && !SANDBOX  # Allow sandbox_noblk to work
help
  This enables the MultiMediaCard (MMC) uclass which supports MMC and
  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
@@ -36,7 +37,6 @@ config DM_MMC
 config SPL_DM_MMC
bool "Enable MMC controllers using Driver Model in SPL"
depends on SPL_DM && DM_MMC
-   default y
help
  This enables the MultiMediaCard (MMC) uclass which supports MMC and
  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index 4fbe172e05c..38b8e2e5f5d 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -36,6 +36,7 @@ if USB
 config DM_USB
bool "Enable driver model for USB"
depends on USB && DM
+   default y if !SANDBOX  # Allow sandbox_noblk to work
help
  Enable driver model for USB. The USB interface is then implemented
  by the USB uclass. Multiple USB controllers of different types
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 93/93] RFC: dm: Force CONFIG_BLK for all boards with DM

2018-11-19 Thread Simon Glass
This forces CONFIG_BLK to be used for all boards. At present it causes
significant fallout.

(This is not intended to be applied, just for testing)

Signed-off-by: Simon Glass 
---

 drivers/core/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index e8ba20ca82d..daaafb187dc 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -2,6 +2,7 @@ menu "Generic Driver Options"
 
 config DM
bool "Enable Driver Model"
+   select BLK
help
  This config option enables Driver Model. This brings in the core
  support, including scanning of platform data on start-up. If
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 92/93] dm: Update driver-model migration schedule for CONFIG_BLK

2018-11-19 Thread Simon Glass
The deadline has passed, so add a note to indicate that board removal is
in progress.

Signed-off-by: Simon Glass 
---

 doc/driver-model/MIGRATION.txt | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/driver-model/MIGRATION.txt b/doc/driver-model/MIGRATION.txt
index 5ebefd608b9..b0f8b410ae8 100644
--- a/doc/driver-model/MIGRATION.txt
+++ b/doc/driver-model/MIGRATION.txt
@@ -10,15 +10,15 @@ CONFIG_BLK
 --
 
 Status: In progress
-Deadline: 2018.05
+Deadline: 2018.05 (passed)
 
-Maintainers should submit patches for enabling CONFIG_BLK on all boards in
-time for inclusion in the 2018.05 release. Boards not converted by this
-time may be removed in a subsequent release.
+Boards which do not build with CONFIG_BLK enabled for U-Boot proper are being
+removed at present.
 
 Note that this implies use of driver model for all block devices (e.g.
 MMC, USB, SCSI, SATA).
 
+
 CONFIG_DM_SPI
 CONFIG_DM_SPI_FLASH
 ---
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 89/93] arm: Remove socfpga_vining_fpga board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_vining_fpga_defconfig |  94 --
 include/configs/socfpga_vining_fpga.h | 180 --
 2 files changed, 274 deletions(-)
 delete mode 100644 configs/socfpga_vining_fpga_defconfig
 delete mode 100644 include/configs/socfpga_vining_fpga.h

diff --git a/configs/socfpga_vining_fpga_defconfig 
b/configs/socfpga_vining_fpga_defconfig
deleted file mode 100644
index 6fcf8c66f8a..000
--- a/configs/socfpga_vining_fpga_defconfig
+++ /dev/null
@@ -1,94 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_SAMTEC_VINING_FPGA=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-CONFIG_BOOTDELAY=5
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200"
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_MISC_INIT_R=y
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-CONFIG_CMD_EEPROM=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),64k(env1),64k(env2),256k(samtec1),256k(samtec2),-(rcvrfs);"
-CONFIG_CMD_UBI=y
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_vining_fpga"
-CONFIG_ENV_IS_IN_SPI_FLASH=y
-CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPL_DM=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_DFU_MMC=y
-CONFIG_DFU_RAM=y
-CONFIG_DFU_SF=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS_GPIO=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=48
-CONFIG_LED_STATUS1=y
-CONFIG_LED_STATUS_BIT1=53
-CONFIG_LED_STATUS2=y
-CONFIG_LED_STATUS_BIT2=54
-CONFIG_LED_STATUS3=y
-CONFIG_LED_STATUS_BIT3=65
-CONFIG_LED_STATUS_CMD=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_SPANSION=y
-CONFIG_SPI_FLASH_STMICRO=y
-# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
-CONFIG_MTD_UBI_FASTMAP=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="samtec"
-CONFIG_USB_GADGET_VENDOR_NUM=0x0525
-CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_vining_fpga.h 
b/include/configs/socfpga_vining_fpga.h
deleted file mode 100644
index 5517ed722d4..000
--- a/include/configs/socfpga_vining_fpga.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2015 Marek Vasut 
- */
-#ifndef __CONFIG_SAMTEC_VINING_FPGA_H__
-#define __CONFIG_SAMTEC_VINING_FPGA_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB on VINING_FPGA 
*/
-
-/* Booting Linux */
-#define CONFIG_BOOTFILE
"openwrt-socfpga-socfpga_cyclone5_vining_fpga-fit-uImage.itb"
-#define CONFIG_BOOTCOMMAND "run selboot"
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* I2C EEPROM */
-#ifdef CONFIG_CMD_EEPROM
-#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
-#define CONFIG_SYS_I2C_EEPROM_BUS  0
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS  3
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  70
-#endif
-
-/*
- * Status LEDs:
- *   0 ... Top Green
- *   1 ... Top Red
- *   2 ... Bottom Green
- *   3 ... Bottom Red
- */
-
-/* Ethernet on SoC (EMAC) */
-#if defined(CONFIG_CMD_NET)
-#define CONFIG_BOOTP_SEND_HOSTNAME
-/* PHY */
-#endif
-
-/* Extra Environment */
-#define CONFIG_HOSTNAME"socfpga_vining_fpga"
-
-/*
- * Active LOW GPIO buttons:
- * A: GPIO 77 ... the button between USB B and ethernet
- * B: GPIO 78 ... the button between USB A ports
- *
- * The logic:
- *  if button B is not pressed, boot normal Linux system immediatelly
- *  if button B is pressed, wait $bootdelay and boot recovery system
- */
-#define CONFIG_PREBOOT \
-   "setenv hostname vining-${unit_serial} ; "  \
-   "setenv PS1 

[U-Boot] [PATCH 84/93] arm: Remove dns325 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-kirkwood/Kconfig   |   1 -
 board/d-link/dns325/Kconfig  |  12 --
 board/d-link/dns325/MAINTAINERS  |   6 -
 board/d-link/dns325/Makefile |  11 --
 board/d-link/dns325/dns325.c | 131 -
 board/d-link/dns325/dns325.h |  31 -
 board/d-link/dns325/kwbimage.cfg | 190 ---
 configs/dns325_defconfig |  41 ---
 include/configs/dns325.h | 118 ---
 9 files changed, 541 deletions(-)
 delete mode 100644 board/d-link/dns325/Kconfig
 delete mode 100644 board/d-link/dns325/MAINTAINERS
 delete mode 100644 board/d-link/dns325/Makefile
 delete mode 100644 board/d-link/dns325/dns325.c
 delete mode 100644 board/d-link/dns325/dns325.h
 delete mode 100644 board/d-link/dns325/kwbimage.cfg
 delete mode 100644 configs/dns325_defconfig
 delete mode 100644 include/configs/dns325.h

diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 9261b606bb4..e592d07d797 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -72,7 +72,6 @@ config SYS_SOC
 
 source "board/Marvell/openrd/Kconfig"
 source "board/cloudengines/pogo_e02/Kconfig"
-source "board/d-link/dns325/Kconfig"
 source "board/iomega/iconnect/Kconfig"
 source "board/keymile/km_arm/Kconfig"
 source "board/LaCie/net2big_v2/Kconfig"
diff --git a/board/d-link/dns325/Kconfig b/board/d-link/dns325/Kconfig
deleted file mode 100644
index f6341ada607..000
--- a/board/d-link/dns325/Kconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-if TARGET_DNS325
-
-config SYS_BOARD
-   default "dns325"
-
-config SYS_VENDOR
-   default "d-link"
-
-config SYS_CONFIG_NAME
-   default "dns325"
-
-endif
diff --git a/board/d-link/dns325/MAINTAINERS b/board/d-link/dns325/MAINTAINERS
deleted file mode 100644
index a37b7990e08..000
--- a/board/d-link/dns325/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-DNS325 BOARD
-M: Stefan Herbrechtsmeier 
-S: Maintained
-F: board/d-link/dns325/
-F: include/configs/dns325.h
-F: configs/dns325_defconfig
diff --git a/board/d-link/dns325/Makefile b/board/d-link/dns325/Makefile
deleted file mode 100644
index e78f6d9c337..000
--- a/board/d-link/dns325/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2011
-# Stefan Herbrechtsmeier 
-#
-# Based on Kirkwood support:
-# (C) Copyright 2009
-# Marvell Semiconductor 
-# Written-by: Prafulla Wadaskar 
-
-obj-y  := dns325.o
diff --git a/board/d-link/dns325/dns325.c b/board/d-link/dns325/dns325.c
deleted file mode 100644
index a1d987bedaa..000
--- a/board/d-link/dns325/dns325.c
+++ /dev/null
@@ -1,131 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2011
- * Stefan Herbrechtsmeier 
- *
- * Based on Kirkwood support:
- * (C) Copyright 2009
- * Marvell Semiconductor 
- * Written-by: Prafulla Wadaskar 
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "dns325.h"
-
-DECLARE_GLOBAL_DATA_PTR;
-
-int board_early_init_f(void)
-{
-   /* Gpio configuration */
-   mvebu_config_gpio(DNS325_OE_VAL_LOW, DNS325_OE_VAL_HIGH,
- DNS325_OE_LOW, DNS325_OE_HIGH);
-
-   /* Multi-Purpose Pins Functionality configuration */
-   static const u32 kwmpp_config[] = {
-   MPP0_NF_IO2,
-   MPP1_NF_IO3,
-   MPP2_NF_IO4,
-   MPP3_NF_IO5,
-   MPP4_NF_IO6,
-   MPP5_NF_IO7,
-   MPP6_SYSRST_OUTn,
-   MPP7_GPO,
-   MPP8_TW_SDA,
-   MPP9_TW_SCK,
-   MPP10_UART0_TXD,
-   MPP11_UART0_RXD,
-   MPP12_SD_CLK,
-   MPP13_SD_CMD,
-   MPP14_SD_D0,
-   MPP15_SD_D1,
-   MPP16_SD_D2,
-   MPP17_SD_D3,
-   MPP18_NF_IO0,
-   MPP19_NF_IO1,
-   MPP20_SATA1_ACTn,   /* sata1(left) status led */
-   MPP21_SATA0_ACTn,   /* sata0(right) status led */
-   MPP22_GPIO,
-   MPP23_GPIO,
-   MPP24_GPIO, /* power off out */
-   MPP25_GPIO,
-   MPP26_GPIO, /* power led */
-   MPP27_GPIO, /* sata0(right) error led */
-   MPP28_GPIO, /* sata1(left) error led */
-   MPP29_GPIO, /* usb error led */
-   MPP30_GPIO,
-   MPP31_GPIO,
-   MPP32_GPIO,
-   MPP33_GPIO,
-   MPP34_GPIO, /* power key */
-   MPP35_GPIO,
-   MPP36_GPIO,
-   MPP37_GPIO,
-   MPP38_GPIO,
-   MPP39_GPIO, /* enable sata 0 */
-   MPP40_GPIO, /* enable sata 1 */
-   

[U-Boot] [PATCH 86/93] arm: Remove brppt1_mmc board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-omap2/Kconfig   |   1 -
 board/BuR/brppt1/Kconfig  |  15 --
 board/BuR/brppt1/MAINTAINERS  |   8 --
 board/BuR/brppt1/Makefile |  12 --
 board/BuR/brppt1/board.c  | 190 -
 board/BuR/brppt1/config.mk|  36 -
 board/BuR/brppt1/mux.c| 253 --
 configs/brppt1_mmc_defconfig  |  95 -
 configs/brppt1_nand_defconfig |  99 -
 configs/brppt1_spi_defconfig  | 109 ---
 include/configs/brppt1.h  | 214 
 11 files changed, 1032 deletions(-)
 delete mode 100644 board/BuR/brppt1/Kconfig
 delete mode 100644 board/BuR/brppt1/MAINTAINERS
 delete mode 100644 board/BuR/brppt1/Makefile
 delete mode 100644 board/BuR/brppt1/board.c
 delete mode 100644 board/BuR/brppt1/config.mk
 delete mode 100644 board/BuR/brppt1/mux.c
 delete mode 100644 configs/brppt1_mmc_defconfig
 delete mode 100644 configs/brppt1_nand_defconfig
 delete mode 100644 configs/brppt1_spi_defconfig
 delete mode 100644 include/configs/brppt1.h

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 5caf4bae6f8..7ccbe2db227 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -176,7 +176,6 @@ source "arch/arm/mach-omap2/omap5/Kconfig"
 source "arch/arm/mach-omap2/am33xx/Kconfig"
 
 source "board/BuR/brxre1/Kconfig"
-source "board/BuR/brppt1/Kconfig"
 source "board/siemens/draco/Kconfig"
 source "board/siemens/pxm2/Kconfig"
 source "board/siemens/rut/Kconfig"
diff --git a/board/BuR/brppt1/Kconfig b/board/BuR/brppt1/Kconfig
deleted file mode 100644
index e006c80e6ed..000
--- a/board/BuR/brppt1/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_BRPPT1
-
-config SYS_BOARD
-   default "brppt1"
-
-config SYS_VENDOR
-   default "BuR"
-
-config SYS_SOC
-   default "am33xx"
-
-config SYS_CONFIG_NAME
-   default "brppt1"
-
-endif
diff --git a/board/BuR/brppt1/MAINTAINERS b/board/BuR/brppt1/MAINTAINERS
deleted file mode 100644
index 9eddab42089..000
--- a/board/BuR/brppt1/MAINTAINERS
+++ /dev/null
@@ -1,8 +0,0 @@
-BRPPT1 BOARD
-M: Hannes Schmelzer 
-S: Maintained
-F: board/BuR/brppt1/
-F: include/configs/brppt1.h
-F: configs/brppt1_mmc_defconfig
-F: configs/brppt1_nand_defconfig
-F: configs/brppt1_spi_defconfig
diff --git a/board/BuR/brppt1/Makefile b/board/BuR/brppt1/Makefile
deleted file mode 100644
index 3dec0e6522a..000
--- a/board/BuR/brppt1/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Makefile
-#
-# Copyright (C) 2013 Hannes Schmelzer 
-# Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
-
-ifeq ($(CONFIG_SPL_BUILD),y)
-obj-y  := mux.o
-endif
-obj-y  += ../common/common.o
-obj-y  += board.o
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c
deleted file mode 100644
index d2e7c722423..000
--- a/board/BuR/brppt1/board.c
+++ /dev/null
@@ -1,190 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * board.c
- *
- * Board functions for B BRPPT1
- *
- * Copyright (C) 2013 Hannes Schmelzer 
- * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "../common/bur_common.h"
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* --*/
-/* -- defines for GPIO -- */
-#defineREPSWITCH   (0+20)  /* GPIO0_20 */
-
-#if defined(CONFIG_SPL_BUILD)
-/* TODO: check ram-timing ! */
-static const struct ddr_data ddr3_data = {
-   .datardsratio0 = MT41K256M16HA125E_RD_DQS,
-   .datawdsratio0 = MT41K256M16HA125E_WR_DQS,
-   .datafwsratio0 = MT41K256M16HA125E_PHY_FIFO_WE,
-   .datawrsratio0 = MT41K256M16HA125E_PHY_WR_DATA,
-};
-
-static const struct cmd_control ddr3_cmd_ctrl_data = {
-   .cmd0csratio = MT41K256M16HA125E_RATIO,
-   .cmd0iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
-
-   .cmd1csratio = MT41K256M16HA125E_RATIO,
-   .cmd1iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
-
-   .cmd2csratio = MT41K256M16HA125E_RATIO,
-   .cmd2iclkout = MT41K256M16HA125E_INVERT_CLKOUT,
-};
-
-static struct emif_regs ddr3_emif_reg_data = {
-   .sdram_config = MT41K256M16HA125E_EMIF_SDCFG,
-   .ref_ctrl = MT41K256M16HA125E_EMIF_SDREF,
-   .sdram_tim1 = MT41K256M16HA125E_EMIF_TIM1,
-   .sdram_tim2 = MT41K256M16HA125E_EMIF_TIM2,
-   .sdram_tim3 = MT41K256M16HA125E_EMIF_TIM3,
-   .zq_config = MT41K256M16HA125E_ZQ_CFG,
-   .emif_ddr_phy_ctlr_1 = MT41K256M16HA125E_EMIF_READ_LATENCY,
-};
-
-static const struct ctrl_ioregs ddr3_ioregs = {
-   .cm0ioctl = MT41K256M16HA125E_IOCTRL_VALUE,
-   

[U-Boot] [PATCH 87/93] arm: Remove db-mv784mp-gp board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/Marvell/db-mv784mp-gp/MAINTAINERS |   6 -
 board/Marvell/db-mv784mp-gp/Makefile|   5 -
 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c | 117 
 configs/db-mv784mp-gp_defconfig |  64 ---
 include/configs/db-mv784mp-gp.h |  99 -
 5 files changed, 291 deletions(-)
 delete mode 100644 board/Marvell/db-mv784mp-gp/MAINTAINERS
 delete mode 100644 board/Marvell/db-mv784mp-gp/Makefile
 delete mode 100644 board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
 delete mode 100644 configs/db-mv784mp-gp_defconfig
 delete mode 100644 include/configs/db-mv784mp-gp.h

diff --git a/board/Marvell/db-mv784mp-gp/MAINTAINERS 
b/board/Marvell/db-mv784mp-gp/MAINTAINERS
deleted file mode 100644
index a095f898d40..000
--- a/board/Marvell/db-mv784mp-gp/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-DB_MV784MP_GP BOARD
-M: Stefan Roese 
-S: Maintained
-F: board/Marvell/db-mv784mp-gp/
-F: include/configs/db-mv784mp-gp.h
-F: configs/db-mv784mp-gp_defconfig
diff --git a/board/Marvell/db-mv784mp-gp/Makefile 
b/board/Marvell/db-mv784mp-gp/Makefile
deleted file mode 100644
index 1bd2388afb3..000
--- a/board/Marvell/db-mv784mp-gp/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2014 Stefan Roese 
-
-obj-y  := db-mv784mp-gp.o
diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c 
b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
deleted file mode 100644
index 604e8c1670b..000
--- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
+++ /dev/null
@@ -1,117 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2014 Stefan Roese 
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define ETH_PHY_CTRL_REG   0
-#define ETH_PHY_CTRL_POWER_DOWN_BIT11
-#define ETH_PHY_CTRL_POWER_DOWN_MASK   (1 << ETH_PHY_CTRL_POWER_DOWN_BIT)
-
-/*
- * Those values and defines are taken from the Marvell U-Boot version
- * "u-boot-2011.12-2014_T1.0" for the board rd78460gp aka
- * "RD-AXP-GP rev 1.0".
- *
- * GPPs
- * MPP#NAMEIN/OUT
- * --
- * 21  SW_Reset_   OUT
- * 25  Phy_Int#IN
- * 28  SDI_WP  IN
- * 29  SDI_Status  IN
- * 54-61   On GPP Connector?
- * 62  Switch InterruptIN
- * 63-65   Reserved from SW Board  ?
- * 66  SW_BRD connectedIN
- */
-#define RD_78460_GP_GPP_OUT_ENA_LOW(~(BIT(21) | BIT(20)))
-#define RD_78460_GP_GPP_OUT_ENA_MID(~(BIT(26) | BIT(27)))
-#define RD_78460_GP_GPP_OUT_ENA_HIGH   (~(0x0))
-
-#define RD_78460_GP_GPP_OUT_VAL_LOW(BIT(21) | BIT(20))
-#define RD_78460_GP_GPP_OUT_VAL_MID(BIT(26) | BIT(27))
-#define RD_78460_GP_GPP_OUT_VAL_HIGH   0x0
-
-int board_early_init_f(void)
-{
-   /* Configure MPP */
-   writel(0x, MVEBU_MPP_BASE + 0x00);
-   writel(0x, MVEBU_MPP_BASE + 0x04);
-   writel(0x3300, MVEBU_MPP_BASE + 0x08);
-   writel(0x1100, MVEBU_MPP_BASE + 0x0c);
-   writel(0x, MVEBU_MPP_BASE + 0x10);
-   writel(0x00221100, MVEBU_MPP_BASE + 0x14);
-   writel(0x0003, MVEBU_MPP_BASE + 0x18);
-   writel(0x, MVEBU_MPP_BASE + 0x1c);
-   writel(0x, MVEBU_MPP_BASE + 0x20);
-
-   /* Configure GPIO */
-   writel(RD_78460_GP_GPP_OUT_VAL_LOW, MVEBU_GPIO0_BASE + 0x00);
-   writel(RD_78460_GP_GPP_OUT_ENA_LOW, MVEBU_GPIO0_BASE + 0x04);
-   writel(RD_78460_GP_GPP_OUT_VAL_MID, MVEBU_GPIO1_BASE + 0x00);
-   writel(RD_78460_GP_GPP_OUT_ENA_MID, MVEBU_GPIO1_BASE + 0x04);
-   writel(RD_78460_GP_GPP_OUT_VAL_HIGH, MVEBU_GPIO2_BASE + 0x00);
-   writel(RD_78460_GP_GPP_OUT_ENA_HIGH, MVEBU_GPIO2_BASE + 0x04);
-
-   return 0;
-}
-
-int board_init(void)
-{
-   /* adress of boot parameters */
-   gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
-
-   return 0;
-}
-
-int checkboard(void)
-{
-   puts("Board: Marvell DB-MV784MP-GP\n");
-
-   return 0;
-}
-
-int board_eth_init(bd_t *bis)
-{
-   cpu_eth_init(bis); /* Built in controller(s) come first */
-   return pci_eth_init(bis);
-}
-
-int board_phy_config(struct phy_device *phydev)
-{
-   u16 reg;
-
-   /* Enable QSGMII AN */
-   /* Set page to 4 */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x16, 4);
-   /* Enable AN */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x0, 0x1140);
-   /* Set page to 0 */
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x16, 0);
-
-   /* Phy C_ANEG */
-   reg = phy_read(phydev, MDIO_DEVAD_NONE, 0x4);
-   reg |= 0x1E0;
-   phy_write(phydev, MDIO_DEVAD_NONE, 0x4, reg);
-
-   /* Soft-Reset */
-   phy_write(phydev, MDIO_DEVAD_NONE, 22, 

[U-Boot] [PATCH 85/93] arm: Remove socfpga_is1 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/is1/MAINTAINERS |   6 -
 board/is1/Makefile|   5 -
 board/is1/qts/iocsr_config.h  | 659 --
 board/is1/qts/pinmux_config.h | 218 ---
 board/is1/qts/pll_config.h|  84 -
 board/is1/qts/sdram_config.h  | 343 --
 board/is1/socfpga.c   |   4 -
 configs/socfpga_is1_defconfig |  60 
 include/configs/socfpga_is1.h |  34 --
 9 files changed, 1413 deletions(-)
 delete mode 100644 board/is1/MAINTAINERS
 delete mode 100644 board/is1/Makefile
 delete mode 100644 board/is1/qts/iocsr_config.h
 delete mode 100644 board/is1/qts/pinmux_config.h
 delete mode 100644 board/is1/qts/pll_config.h
 delete mode 100644 board/is1/qts/sdram_config.h
 delete mode 100644 board/is1/socfpga.c
 delete mode 100644 configs/socfpga_is1_defconfig
 delete mode 100644 include/configs/socfpga_is1.h

diff --git a/board/is1/MAINTAINERS b/board/is1/MAINTAINERS
deleted file mode 100644
index a737e13f834..000
--- a/board/is1/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-SOCFPGA IS1 BOARD
-M: Pavel Machek 
-S: Maintained
-F: board/is1/
-F: include/configs/socfpga_is1.h
-F: configs/socfpga_is1_defconfig
diff --git a/board/is1/Makefile b/board/is1/Makefile
deleted file mode 100644
index e499116b676..000
--- a/board/is1/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2015 Stefan Roese 
-
-obj-y  := socfpga.o
diff --git a/board/is1/qts/iocsr_config.h b/board/is1/qts/iocsr_config.h
deleted file mode 100644
index 1d2774aa41a..000
--- a/board/is1/qts/iocsr_config.h
+++ /dev/null
@@ -1,659 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Altera SoCFPGA IOCSR configuration
- */
-
-#ifndef __SOCFPGA_IOCSR_CONFIG_H__
-#define __SOCFPGA_IOCSR_CONFIG_H__
-
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH 764
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH 1719
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH 955
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH 16766
-
-const unsigned long iocsr_scan_chain0_table[] = {
-   0x,
-   0x,
-   0x0FF0,
-   0xC000,
-   0x003F,
-   0x8000,
-   0x00060180,
-   0x1806,
-   0x1800,
-   0x00018060,
-   0x,
-   0x4000,
-   0x000300C0,
-   0x0C03,
-   0x0C00,
-   0x0030,
-   0xC030,
-   0x2000,
-   0x0002,
-   0x06018000,
-   0x0600,
-   0x0018,
-   0x6018,
-   0x1000,
-};
-
-const unsigned long iocsr_scan_chain1_table[] = {
-   0x000C0300,
-   0x300C,
-   0x3000,
-   0x00C0,
-   0x000300C0,
-   0x80008000,
-   0x007F,
-   0x0001FE00,
-   0x07F8,
-   0xE000,
-   0x001F,
-   0x4000,
-   0x000300C0,
-   0x0C03,
-   0x0C00,
-   0x0030,
-   0xC030,
-   0x2000,
-   0x06018060,
-   0x7F80,
-   0x01FE,
-   0xF800,
-   0x0007,
-   0x1000,
-   0xC030,
-   0x0300C000,
-   0x0300,
-   0x300C,
-   0x300C,
-   0x0800,
-   0x,
-   0x,
-   0x0180,
-   0x0006,
-   0x00601806,
-   0x0400,
-   0x,
-   0x00C03000,
-   0x0003,
-   0x,
-   0x,
-   0x0200,
-   0x00601806,
-   0x,
-   0x8060,
-   0x8601,
-   0x0601,
-   0x0100,
-   0x00300C03,
-   0xC0300C00,
-   0xC030,
-   0xC300,
-   0x000C0300,
-   0x0080,
-};
-
-const unsigned long iocsr_scan_chain2_table[] = {
-   0x0010,
-   0x300C,
-   0x0FF0,
-   0x,
-   0x0004,
-   0x8000,
-   0x0008,
-   0x,
-   0x1800,
-   0x0060,
-   0x06018060,
-   0x4000,
-   0x0C0300C0,
-   0x0C03,
-   0x0C00,
-   0x0030,
-   0xC030,
-   0x2000,
-   0x06018060,
-   0x06018000,
-   0x0618,
-   0x6018,
-   0x01806018,
-   0x1000,
-   0x0300C030,
-   0x0300C000,
-   0x030C,
-   0x300C,
-   0x00C0300C,
-   0x0800,
-};
-
-const unsigned long iocsr_scan_chain3_table[] = {
-   0x0C420D80,
-   0x082000FF,
-   0x08024001,
-   0x0010,
-   0x0802,
-   0x0010,
-   0x0A80,
-   0x0790,
-   0x0802,
-   0x0010,
-   0x,
-   0x0010,
-   0x00C00722,
-   0x,
-   0x0021,
-   0x8204,
-   0x0540,
-   0x03C8,
-   0x0401,
-   0x0008,
-   0x0540,
-   0x03C8,
-   0x0540,
-  

[U-Boot] [PATCH 88/93] arm: Remove socfpga_arria5 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/altera/arria5-socdk/MAINTAINERS |   7 -
 board/altera/arria5-socdk/Makefile|   7 -
 board/altera/arria5-socdk/qts/iocsr_config.h  | 695 --
 board/altera/arria5-socdk/qts/pinmux_config.h | 218 --
 board/altera/arria5-socdk/qts/pll_config.h|  84 ---
 board/altera/arria5-socdk/qts/sdram_config.h  | 342 -
 board/altera/arria5-socdk/socfpga.c   |   5 -
 configs/socfpga_arria5_defconfig  |  77 --
 include/configs/socfpga_arria5_socdk.h|  22 -
 9 files changed, 1457 deletions(-)
 delete mode 100644 board/altera/arria5-socdk/MAINTAINERS
 delete mode 100644 board/altera/arria5-socdk/Makefile
 delete mode 100644 board/altera/arria5-socdk/qts/iocsr_config.h
 delete mode 100644 board/altera/arria5-socdk/qts/pinmux_config.h
 delete mode 100644 board/altera/arria5-socdk/qts/pll_config.h
 delete mode 100644 board/altera/arria5-socdk/qts/sdram_config.h
 delete mode 100644 board/altera/arria5-socdk/socfpga.c
 delete mode 100644 configs/socfpga_arria5_defconfig
 delete mode 100644 include/configs/socfpga_arria5_socdk.h

diff --git a/board/altera/arria5-socdk/MAINTAINERS 
b/board/altera/arria5-socdk/MAINTAINERS
deleted file mode 100644
index 873ec2be2d9..000
--- a/board/altera/arria5-socdk/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-SOCFPGA BOARD
-M: Dinh Nguyen 
-M: Chin-Liang See 
-S: Maintained
-F: board/altera/arria5-socdk/
-F: include/configs/socfpga_arria5_socdk.h
-F: configs/socfpga_arria5_defconfig
diff --git a/board/altera/arria5-socdk/Makefile 
b/board/altera/arria5-socdk/Makefile
deleted file mode 100644
index e1c8a6b3c7c..000
--- a/board/altera/arria5-socdk/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-# (C) Copyright 2010, Thomas Chou 
-
-obj-y  := socfpga.o
diff --git a/board/altera/arria5-socdk/qts/iocsr_config.h 
b/board/altera/arria5-socdk/qts/iocsr_config.h
deleted file mode 100644
index 69a92de6361..000
--- a/board/altera/arria5-socdk/qts/iocsr_config.h
+++ /dev/null
@@ -1,695 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Altera SoCFPGA IOCSR configuration
- */
-
-#ifndef __SOCFPGA_IOCSR_CONFIG_H__
-#define __SOCFPGA_IOCSR_CONFIG_H__
-
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH 1337
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH 1719
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH 1528
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH 16766
-
-const unsigned long iocsr_scan_chain0_table[] = {
-   0x,
-   0x,
-   0x,
-   0x,
-   0x,
-   0x8000,
-   0x00060180,
-   0x1806,
-   0x1860,
-   0x00018060,
-   0x06018060,
-   0x4000,
-   0x0C0300C0,
-   0x0C03,
-   0x0030,
-   0x,
-   0x,
-   0x2000,
-   0x,
-   0x,
-   0x0600,
-   0x6018,
-   0x01806018,
-   0x1000,
-   0xC030,
-   0x0400,
-   0x0300,
-   0x300C,
-   0x,
-   0x0800,
-   0x6018,
-   0x01806000,
-   0x0180,
-   0x0006,
-   0x1806,
-   0x0400,
-   0x300C,
-   0x00C03000,
-   0x00C0,
-   0x0003,
-   0x0C03,
-   0x0200,
-};
-
-const unsigned long iocsr_scan_chain1_table[] = {
-   0x0010,
-   0x300C,
-   0x30C0,
-   0x00C0,
-   0x000300C0,
-   0x8000,
-   0x00060180,
-   0x1806,
-   0x1800,
-   0x0060,
-   0x00018060,
-   0x4000,
-   0x000300C0,
-   0x1000,
-   0x0C00,
-   0x0030,
-   0xC030,
-   0x2000,
-   0x06018060,
-   0x06018000,
-   0x01FE,
-   0xF800,
-   0x0007,
-   0x1000,
-   0xC030,
-   0x0300C000,
-   0x0300,
-   0x300C,
-   0x300C,
-   0x0800,
-   0x6018,
-   0x01806000,
-   0x0180,
-   0x0006,
-   0x2000,
-   0x0400,
-   0x300C,
-   0x0100,
-   0x,
-   0x0004,
-   0x0C03,
-   0x0200,
-   0x1806,
-   0x0080,
-   0x,
-   0x0002,
-   0x0800,
-   0x0100,
-   0x1000,
-   0x0040,
-   0xC030,
-   0x,
-   0x0400,
-   0x0080,
-};
-
-const unsigned long iocsr_scan_chain2_table[] = {
-   0x0010,
-   0x4000,
-   0x,
-   0x0100,
-   0x0004,
-   0x8000,
-   0x18060180,
-   0x2000,
-   0x,
-   0x0080,
-   0x0002,
-   0x4000,
-

[U-Boot] [PATCH 83/93] arm: Remove socfpga_sockit board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_sockit_defconfig | 78 
 include/configs/socfpga_sockit.h | 22 -
 2 files changed, 100 deletions(-)
 delete mode 100644 configs/socfpga_sockit_defconfig
 delete mode 100644 include/configs/socfpga_sockit.h

diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
deleted file mode 100644
index 66f7733ee86..000
--- a/configs/socfpga_sockit_defconfig
+++ /dev/null
@@ -1,78 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_TERASIC_SOCKIT=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_sockit.dtb"
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
-CONFIG_CMD_UBI=y
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_sockit"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_DFU_MMC=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_SPI_FLASH=y
-CONFIG_SPI_FLASH_BAR=y
-CONFIG_SPI_FLASH_MACRONIX=y
-CONFIG_SPI_FLASH_SPANSION=y
-CONFIG_SPI_FLASH_STMICRO=y
-# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="terasic"
-CONFIG_USB_GADGET_VENDOR_NUM=0x0525
-CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h
deleted file mode 100644
index 3a7f354914a..000
--- a/include/configs/socfpga_sockit.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2015 Marek Vasut 
- */
-#ifndef __CONFIG_TERASIC_SOCKIT_H__
-#define __CONFIG_TERASIC_SOCKIT_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB on SoCDK */
-
-/* Booting Linux */
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* Ethernet on SoC (EMAC) */
-
-/* The rest of the configuration is shared */
-#include 
-
-#endif /* __CONFIG_TERASIC_SOCKIT_H__ */
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 82/93] arm: Remove socfpga_de1_soc board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_de1_soc_defconfig | 60 ---
 include/configs/socfpga_de1_soc.h | 22 
 2 files changed, 82 deletions(-)
 delete mode 100644 configs/socfpga_de1_soc_defconfig
 delete mode 100644 include/configs/socfpga_de1_soc.h

diff --git a/configs/socfpga_de1_soc_defconfig 
b/configs/socfpga_de1_soc_defconfig
deleted file mode 100644
index b6c8e6c84d6..000
--- a/configs/socfpga_de1_soc_defconfig
+++ /dev/null
@@ -1,60 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_TERASIC_DE1_SOC=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de1_soc.dtb"
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_YMODEM_SUPPORT=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_TIME=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de1_soc"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USE_TINY_PRINTF=y
-# CONFIG_EFI_LOADER is not set
diff --git a/include/configs/socfpga_de1_soc.h 
b/include/configs/socfpga_de1_soc.h
deleted file mode 100644
index f37099c58f8..000
--- a/include/configs/socfpga_de1_soc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2016 Marek Vasut 
- */
-#ifndef __CONFIG_TERASIC_DE1_SOC_H__
-#define __CONFIG_TERASIC_DE1_SOC_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB */
-
-/* Booting Linux */
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* Ethernet on SoC (EMAC) */
-
-/* The rest of the configuration is shared */
-#include 
-
-#endif /* __CONFIG_TERASIC_DE1_SOC_H__ */
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 81/93] arm: Remove socfpga_dbm_soc1 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_dbm_soc1_defconfig | 70 --
 include/configs/socfpga_dbm_soc1.h | 95 --
 2 files changed, 165 deletions(-)
 delete mode 100644 configs/socfpga_dbm_soc1_defconfig
 delete mode 100644 include/configs/socfpga_dbm_soc1.h

diff --git a/configs/socfpga_dbm_soc1_defconfig 
b/configs/socfpga_dbm_soc1_defconfig
deleted file mode 100644
index b6f4f8a3dd2..000
--- a/configs/socfpga_dbm_soc1_defconfig
+++ /dev/null
@@ -1,70 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_DEVBOARDS_DBM_SOC1=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200"
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_HUSH_PARSER=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_PXE=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_dbm_soc1"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_DFU_MMC=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_DM_ETH=y
-CONFIG_PHY_GIGE=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="devboards"
-CONFIG_USB_GADGET_VENDOR_NUM=0x0525
-CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_dbm_soc1.h 
b/include/configs/socfpga_dbm_soc1.h
deleted file mode 100644
index b36d7e56fb1..000
--- a/include/configs/socfpga_dbm_soc1.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2018 Marek Vasut 
- */
-#ifndef __CONFIG_DEVBOARDS_DBM_SOC1_H__
-#define __CONFIG_DEVBOARDS_DBM_SOC1_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB */
-
-/* Booting Linux */
-#define CONFIG_BOOTFILE"fitImage"
-#define CONFIG_PREBOOT "run try_bootscript"
-#define CONFIG_BOOTCOMMAND "run mmc_mmc"
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* Environment is in MMC */
-#define CONFIG_ENV_OVERWRITE
-
-/* Extra Environment */
-#define CONFIG_EXTRA_ENV_SETTINGS  \
-   "consdev=ttyS0\0"   \
-   "baudrate=115200\0" \
-   "bootscript=boot.scr\0" \
-   "bootdev=/dev/mmcblk0p2\0"  \
-   "rootdev=/dev/mmcblk0p3\0"  \
-   "netdev=eth0\0" \
-   "hostname=dbm_soc1\0"   \
-   "kernel_addr_r=0x1000\0"\
-   "dfu_alt_info=mmc raw 0 3867148288\0"   \
-   "update_filename=u-boot-with-spl.sfp\0" \
-   "update_sd_offset=0x800\0"  \
-   "update_sd="/* Update the SD firmware partition */  \
-   "if mmc rescan ; then " \
-   "if tftp ${update_filename} ; then "\
-   "setexpr fw_sz ${filesize} / 0x200 ; "  /* SD block size */ \
-   "setexpr fw_sz ${fw_sz} + 1 ; " \
-   "mmc write ${loadaddr} ${update_sd_offset} ${fw_sz} ; " \
-   "fi ; " \
-   "fi\0"  \
-   "fpga_filename=output_file.rbf\0"   \
-   "load_fpga="/* Load FPGA bitstream */   \
-   "if tftp ${fpga_filename} ; then "  \
-   "fpga load 0 $loadaddr $filesize ; "\
-   "bridge enable ; "

[U-Boot] [PATCH 80/93] arm: Remove socfpga_de10_nano board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_de10_nano_defconfig | 68 -
 include/configs/socfpga_de10_nano.h | 22 --
 2 files changed, 90 deletions(-)
 delete mode 100644 configs/socfpga_de10_nano_defconfig
 delete mode 100644 include/configs/socfpga_de10_nano.h

diff --git a/configs/socfpga_de10_nano_defconfig 
b/configs/socfpga_de10_nano_defconfig
deleted file mode 100644
index c9490d47a49..000
--- a/configs/socfpga_de10_nano_defconfig
+++ /dev/null
@@ -1,68 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_TERASIC_DE10_NANO=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de10_nano.dtb"
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de10_nano"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_DFU_MMC=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="terasic"
-CONFIG_USB_GADGET_VENDOR_NUM=0x0525
-CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_de10_nano.h 
b/include/configs/socfpga_de10_nano.h
deleted file mode 100644
index 2fcabff8afb..000
--- a/include/configs/socfpga_de10_nano.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2017, Intel Corporation
- */
-#ifndef __CONFIG_TERASIC_DE10_H__
-#define __CONFIG_TERASIC_DE10_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB */
-
-/* Booting Linux */
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* Ethernet on SoC (EMAC) */
-
-/* The rest of the configuration is shared */
-#include 
-
-#endif /* __CONFIG_TERASIC_DE10_H__ */
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 79/93] arm: Remove ls1021aiot_sdcard board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/arm/Kconfig  |   1 -
 board/freescale/ls1021aiot/Kconfig|  17 --
 board/freescale/ls1021aiot/MAINTAINERS|   7 -
 board/freescale/ls1021aiot/Makefile   |   7 -
 board/freescale/ls1021aiot/README |  58 
 board/freescale/ls1021aiot/dcu.c  |  46 
 board/freescale/ls1021aiot/ls1021aiot.c   | 249 -
 board/freescale/ls1021aiot/ls102xa_pbi.cfg|  14 -
 board/freescale/ls1021aiot/ls102xa_rcw_sd.cfg |  27 --
 board/freescale/ls1021aiot/psci.S |  27 --
 configs/ls1021aiot_qspi_defconfig |  39 ---
 configs/ls1021aiot_sdcard_defconfig   |  44 ---
 include/configs/ls1021aiot.h  | 251 --
 13 files changed, 787 deletions(-)
 delete mode 100644 board/freescale/ls1021aiot/Kconfig
 delete mode 100644 board/freescale/ls1021aiot/MAINTAINERS
 delete mode 100644 board/freescale/ls1021aiot/Makefile
 delete mode 100644 board/freescale/ls1021aiot/README
 delete mode 100644 board/freescale/ls1021aiot/dcu.c
 delete mode 100644 board/freescale/ls1021aiot/ls1021aiot.c
 delete mode 100644 board/freescale/ls1021aiot/ls102xa_pbi.cfg
 delete mode 100644 board/freescale/ls1021aiot/ls102xa_rcw_sd.cfg
 delete mode 100644 board/freescale/ls1021aiot/psci.S
 delete mode 100644 configs/ls1021aiot_qspi_defconfig
 delete mode 100644 configs/ls1021aiot_sdcard_defconfig
 delete mode 100644 include/configs/ls1021aiot.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 97faf09e916..92b65b5bc40 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1508,7 +1508,6 @@ source "board/freescale/ls2080ardb/Kconfig"
 source "board/freescale/ls1088a/Kconfig"
 source "board/freescale/ls1021aqds/Kconfig"
 source "board/freescale/ls1043aqds/Kconfig"
-source "board/freescale/ls1021aiot/Kconfig"
 source "board/freescale/ls1046aqds/Kconfig"
 source "board/freescale/ls1012aqds/Kconfig"
 source "board/freescale/ls1012ardb/Kconfig"
diff --git a/board/freescale/ls1021aiot/Kconfig 
b/board/freescale/ls1021aiot/Kconfig
deleted file mode 100644
index c6b16063a4a..000
--- a/board/freescale/ls1021aiot/Kconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-if TARGET_LS1021AIOT
-
-config SYS_BOARD
-   default "ls1021aiot"
-
-config SYS_VENDOR
-   default "freescale"
-
-config SYS_SOC
-   default "ls102xa"
-
-config SYS_CONFIG_NAME
-   default "ls1021aiot"
-
-source "board/freescale/common/Kconfig"
-
-endif
diff --git a/board/freescale/ls1021aiot/MAINTAINERS 
b/board/freescale/ls1021aiot/MAINTAINERS
deleted file mode 100644
index 2dab7988eeb..000
--- a/board/freescale/ls1021aiot/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-LS1021AIOT BOARD
-M: Feng Li 
-S: Maintained
-F: board/freescale/ls1021aiot/
-F: include/configs/ls1021aiot.h
-F: configs/ls1021aiot_sdcard_defconfig
-F: configs/ls1021aiot_qspi_defconfig
diff --git a/board/freescale/ls1021aiot/Makefile 
b/board/freescale/ls1021aiot/Makefile
deleted file mode 100644
index bec151fd2ac..000
--- a/board/freescale/ls1021aiot/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright 2016 Freescale Semiconductor, Inc.
-
-obj-y += ls1021aiot.o
-obj-$(CONFIG_VIDEO_FSL_DCU_FB) += dcu.o
-obj-$(CONFIG_ARMV7_PSCI) += psci.o
diff --git a/board/freescale/ls1021aiot/README 
b/board/freescale/ls1021aiot/README
deleted file mode 100644
index 08b0268b9bd..000
--- a/board/freescale/ls1021aiot/README
+++ /dev/null
@@ -1,58 +0,0 @@
-Overview
-
-The LS1021A-IOT is a Freescale reference board that hosts
-the LS1021A SoC.
-
-LS1021AIOT board Overview
--
- - DDR Controller
-   - Supports 1GB un-buffered DDR3L SDRAM discrete
-   devices(32-bit bus) with 4 bit ECC
-   - DDR power supplies 1.35V to all devices with
-   automatic tracking of VTT
-   - Soldered DDR chip
-   - Supprot one fixed speed
- - Ethernet
-   - Two on-board SGMII 10/100/1G ethernet ports
-   - One Gbit Etherent RGMII interface to 4-ports switch
-   with 4x 10/100/1000 RJ145 ports
- - CPLD
-   - 8-bit registers in CPLD for system configuration
-   - connected to IFC_AD[0:7]
- - Power Supplies
-   - 12V@5A DC
- - SDHC
-   - SDHC port connects directly to a full 8-bit SD/MMC slot
-   - Support for SDIO devices
- - USB
-   - Two on-board USB 3.0
-   - One on-board USB k22
- - PCIe
-   - Two MiniPCIe Solts
- - SATA
-   - Support SATA Connector
- - AUDIO
-   - AUDIO in and out
- - I/O Expansion
-   - Arduino Shield Connector
-   - Port0 - CAN/GPIO/Flextimer
-   - Port1 - GPIO/CPLD Expansion
-   - Port2 - SPI/I2C/UART
-
-Memory map

-The addresses in brackets are physical addresses.
-
-Start Address  End Address Description Size

[U-Boot] [PATCH 78/93] arm: Remove socfpga_sr1500 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/sr1500/MAINTAINERS |   6 -
 board/sr1500/Makefile|   5 -
 board/sr1500/qts/iocsr_config.h  | 659 ---
 board/sr1500/qts/pinmux_config.h | 218 --
 board/sr1500/qts/pll_config.h|  84 
 board/sr1500/qts/sdram_config.h  | 343 
 board/sr1500/socfpga.c   |  26 --
 configs/socfpga_sr1500_defconfig |  67 
 include/configs/socfpga_sr1500.h |  56 ---
 9 files changed, 1464 deletions(-)
 delete mode 100644 board/sr1500/MAINTAINERS
 delete mode 100644 board/sr1500/Makefile
 delete mode 100644 board/sr1500/qts/iocsr_config.h
 delete mode 100644 board/sr1500/qts/pinmux_config.h
 delete mode 100644 board/sr1500/qts/pll_config.h
 delete mode 100644 board/sr1500/qts/sdram_config.h
 delete mode 100644 board/sr1500/socfpga.c
 delete mode 100644 configs/socfpga_sr1500_defconfig
 delete mode 100644 include/configs/socfpga_sr1500.h

diff --git a/board/sr1500/MAINTAINERS b/board/sr1500/MAINTAINERS
deleted file mode 100644
index ed013a85243..000
--- a/board/sr1500/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-SOCFPGA SR1500 BOARD
-M: Stefan Roese 
-S: Maintained
-F: board/sr1500/
-F: include/configs/socfpga_sr1500.h
-F: configs/socfpga_sr1500_defconfig
diff --git a/board/sr1500/Makefile b/board/sr1500/Makefile
deleted file mode 100644
index e499116b676..000
--- a/board/sr1500/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2015 Stefan Roese 
-
-obj-y  := socfpga.o
diff --git a/board/sr1500/qts/iocsr_config.h b/board/sr1500/qts/iocsr_config.h
deleted file mode 100644
index b3b167fa7fc..000
--- a/board/sr1500/qts/iocsr_config.h
+++ /dev/null
@@ -1,659 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Altera SoCFPGA IOCSR configuration
- */
-
-#ifndef __SOCFPGA_IOCSR_CONFIG_H__
-#define __SOCFPGA_IOCSR_CONFIG_H__
-
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH 764
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH 1719
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH 955
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH 16766
-
-const unsigned long iocsr_scan_chain0_table[] = {
-   0x0010,
-   0x4000,
-   0x0FF0,
-   0xC000,
-   0x003F,
-   0x8000,
-   0x000E0180,
-   0x1806,
-   0x1800,
-   0x00018060,
-   0x0002,
-   0x4000,
-   0x000700C0,
-   0x1C03,
-   0x0C00,
-   0x0070,
-   0x0001C030,
-   0x2000,
-   0x00018060,
-   0x0E018000,
-   0x0600,
-   0x0038,
-   0xE018,
-   0x1000,
-};
-
-const unsigned long iocsr_scan_chain1_table[] = {
-   0x001C0300,
-   0x300C,
-   0x30C0,
-   0x00C0,
-   0x000300C0,
-   0x8000,
-   0x00060180,
-   0x1806,
-   0x1800,
-   0x00E0,
-   0x00018060,
-   0x4000,
-   0x000300C0,
-   0x1C03,
-   0x0C00,
-   0x0030,
-   0xC030,
-   0x2000,
-   0x06018060,
-   0x06018000,
-   0x01FE,
-   0xF800,
-   0x0007,
-   0x1000,
-   0xC030,
-   0x0300C000,
-   0x0300,
-   0x300C,
-   0x300C,
-   0x0800,
-   0x,
-   0x,
-   0x0180,
-   0x0006,
-   0x1806,
-   0x0400,
-   0x,
-   0x00C03000,
-   0x0003,
-   0x,
-   0x,
-   0x0200,
-   0x00601806,
-   0x,
-   0x8060,
-   0x8601,
-   0x0601,
-   0x0100,
-   0x00300C03,
-   0xC0300C00,
-   0xC030,
-   0xC300,
-   0x000C0300,
-   0x0080,
-};
-
-const unsigned long iocsr_scan_chain2_table[] = {
-   0x000C0300,
-   0x700C,
-   0x0FF0,
-   0x,
-   0x000700C0,
-   0x8000,
-   0x00060180,
-   0x1806,
-   0x1800,
-   0x0060,
-   0x00018060,
-   0x4000,
-   0x200300C0,
-   0x0C03,
-   0x0C00,
-   0x0070,
-   0x0001C030,
-   0x2000,
-   0x10018060,
-   0x0E018000,
-   0x0600,
-   0x00010018,
-   0xE018,
-   0x1000,
-   0x0001C030,
-   0x0400,
-   0x0300,
-   0x800C,
-   0x00C0300C,
-   0x0800,
-};
-
-const unsigned long iocsr_scan_chain3_table[] = {
-   0x0C420D80,
-   0x0C3000FF,
-   0x0A804001,
-   0x0790,
-   0x0802,
-   0x0010,
-   0x0A80,
-   0x0790,
-   0x0802,
-   0x0010,
-   0x2043,
-   0x0C003001,
-   0x00C00481,
-   0x,
-   0x0021,
-   0x8204,
-   0x0540,
-   0x03C8,
-   

[U-Boot] [PATCH 77/93] arm: Remove socfpga_socrates board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/altera/cyclone5-socdk/MAINTAINERS   |  12 -
 board/altera/cyclone5-socdk/Makefile  |   7 -
 .../altera/cyclone5-socdk/qts/iocsr_config.h  | 659 --
 .../altera/cyclone5-socdk/qts/pinmux_config.h | 218 --
 board/altera/cyclone5-socdk/qts/pll_config.h  |  84 ---
 .../altera/cyclone5-socdk/qts/sdram_config.h  | 344 -
 board/altera/cyclone5-socdk/socfpga.c |   5 -
 board/ebv/socrates/MAINTAINERS|   6 -
 board/ebv/socrates/Makefile   |   7 -
 board/ebv/socrates/qts/iocsr_config.h | 659 --
 board/ebv/socrates/qts/pinmux_config.h| 218 --
 board/ebv/socrates/qts/pll_config.h   |  84 ---
 board/ebv/socrates/qts/sdram_config.h | 343 -
 board/ebv/socrates/socfpga.c  |   5 -
 configs/socfpga_cyclone5_defconfig|  78 ---
 configs/socfpga_socrates_defconfig|  78 ---
 include/configs/socfpga_cyclone5_socdk.h  |  22 -
 include/configs/socfpga_socrates.h|  22 -
 18 files changed, 2851 deletions(-)
 delete mode 100644 board/altera/cyclone5-socdk/MAINTAINERS
 delete mode 100644 board/altera/cyclone5-socdk/Makefile
 delete mode 100644 board/altera/cyclone5-socdk/qts/iocsr_config.h
 delete mode 100644 board/altera/cyclone5-socdk/qts/pinmux_config.h
 delete mode 100644 board/altera/cyclone5-socdk/qts/pll_config.h
 delete mode 100644 board/altera/cyclone5-socdk/qts/sdram_config.h
 delete mode 100644 board/altera/cyclone5-socdk/socfpga.c
 delete mode 100644 board/ebv/socrates/MAINTAINERS
 delete mode 100644 board/ebv/socrates/Makefile
 delete mode 100644 board/ebv/socrates/qts/iocsr_config.h
 delete mode 100644 board/ebv/socrates/qts/pinmux_config.h
 delete mode 100644 board/ebv/socrates/qts/pll_config.h
 delete mode 100644 board/ebv/socrates/qts/sdram_config.h
 delete mode 100644 board/ebv/socrates/socfpga.c
 delete mode 100644 configs/socfpga_cyclone5_defconfig
 delete mode 100644 configs/socfpga_socrates_defconfig
 delete mode 100644 include/configs/socfpga_cyclone5_socdk.h
 delete mode 100644 include/configs/socfpga_socrates.h

diff --git a/board/altera/cyclone5-socdk/MAINTAINERS 
b/board/altera/cyclone5-socdk/MAINTAINERS
deleted file mode 100644
index ecf1d04f768..000
--- a/board/altera/cyclone5-socdk/MAINTAINERS
+++ /dev/null
@@ -1,12 +0,0 @@
-SOCFPGA BOARD
-M: Dinh Nguyen 
-M: Chin-Liang See 
-S: Maintained
-F: board/altera/cyclone5-socdk/
-F: include/configs/socfpga_cyclone5_socdk.h
-F: configs/socfpga_cyclone5_defconfig
-
-SOCRATES BOARD
-M: Stefan Roese 
-S: Maintained
-F: configs/socfpga_socrates_defconfig
diff --git a/board/altera/cyclone5-socdk/Makefile 
b/board/altera/cyclone5-socdk/Makefile
deleted file mode 100644
index e1c8a6b3c7c..000
--- a/board/altera/cyclone5-socdk/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2001-2006
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-# (C) Copyright 2010, Thomas Chou 
-
-obj-y  := socfpga.o
diff --git a/board/altera/cyclone5-socdk/qts/iocsr_config.h 
b/board/altera/cyclone5-socdk/qts/iocsr_config.h
deleted file mode 100644
index 81c507b842b..000
--- a/board/altera/cyclone5-socdk/qts/iocsr_config.h
+++ /dev/null
@@ -1,659 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Altera SoCFPGA IOCSR configuration
- */
-
-#ifndef __SOCFPGA_IOCSR_CONFIG_H__
-#define __SOCFPGA_IOCSR_CONFIG_H__
-
-#define CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH 764
-#define CONFIG_HPS_IOCSR_SCANCHAIN1_LENGTH 1719
-#define CONFIG_HPS_IOCSR_SCANCHAIN2_LENGTH 955
-#define CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH 16766
-
-const unsigned long iocsr_scan_chain0_table[] = {
-   0x,
-   0x,
-   0x0FF0,
-   0xC000,
-   0x003F,
-   0x8000,
-   0x00020080,
-   0x0802,
-   0x0800,
-   0x00018020,
-   0x,
-   0x4000,
-   0x00010040,
-   0x0401,
-   0x0400,
-   0x0010,
-   0x4010,
-   0x2000,
-   0x0002,
-   0x02008000,
-   0x0200,
-   0x0008,
-   0x2008,
-   0x1000,
-};
-
-const unsigned long iocsr_scan_chain1_table[] = {
-   0x000C0300,
-   0x1004,
-   0x10C0,
-   0x0040,
-   0x00010040,
-   0x8000,
-   0x0008,
-   0x1806,
-   0x1800,
-   0x0060,
-   0x00018060,
-   0x4000,
-   0x00010040,
-   0x1000,
-   0x0400,
-   0x0010,
-   0x4010,
-   0x2000,
-   0x06008020,
-   0x02008000,
-   0x01FE,
-   0xF800,
-   0x0007,
-   0x1000,
-   0x4010,
-   0x01004000,
-   0x0100,
-   0x3004,
-   

[U-Boot] [PATCH 75/93] arm: Remove omap3_beagle board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/arm/mach-omap2/omap3/Kconfig |   1 -
 board/ti/beagle/Kconfig   |  12 -
 board/ti/beagle/MAINTAINERS   |   6 -
 board/ti/beagle/Makefile  |   7 -
 board/ti/beagle/beagle.c  | 591 --
 board/ti/beagle/beagle.h  | 545 ---
 board/ti/beagle/led.c |  71 
 configs/omap3_beagle_defconfig|  82 -
 include/configs/omap3_beagle.h| 233 
 9 files changed, 1548 deletions(-)
 delete mode 100644 board/ti/beagle/Kconfig
 delete mode 100644 board/ti/beagle/MAINTAINERS
 delete mode 100644 board/ti/beagle/Makefile
 delete mode 100644 board/ti/beagle/beagle.c
 delete mode 100644 board/ti/beagle/beagle.h
 delete mode 100644 board/ti/beagle/led.c
 delete mode 100644 configs/omap3_beagle_defconfig
 delete mode 100644 include/configs/omap3_beagle.h

diff --git a/arch/arm/mach-omap2/omap3/Kconfig 
b/arch/arm/mach-omap2/omap3/Kconfig
index 6e3942ad2d3..6f6ad424f84 100644
--- a/arch/arm/mach-omap2/omap3/Kconfig
+++ b/arch/arm/mach-omap2/omap3/Kconfig
@@ -195,7 +195,6 @@ config SYS_SOC
 
 source "board/logicpd/am3517evm/Kconfig"
 source "board/teejet/mt_ventoux/Kconfig"
-source "board/ti/beagle/Kconfig"
 source "board/compulab/cm_t35/Kconfig"
 source "board/compulab/cm_t3517/Kconfig"
 source "board/ti/evm/Kconfig"
diff --git a/board/ti/beagle/Kconfig b/board/ti/beagle/Kconfig
deleted file mode 100644
index c2eff9e71b0..000
--- a/board/ti/beagle/Kconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-if TARGET_OMAP3_BEAGLE
-
-config SYS_BOARD
-   default "beagle"
-
-config SYS_VENDOR
-   default "ti"
-
-config SYS_CONFIG_NAME
-   default "omap3_beagle"
-
-endif
diff --git a/board/ti/beagle/MAINTAINERS b/board/ti/beagle/MAINTAINERS
deleted file mode 100644
index c1d81d4174e..000
--- a/board/ti/beagle/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-BEAGLE BOARD
-M: Tom Rini 
-S: Maintained
-F: board/ti/beagle/
-F: include/configs/omap3_beagle.h
-F: configs/omap3_beagle_defconfig
diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile
deleted file mode 100644
index fc9288cf186..000
--- a/board/ti/beagle/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# (C) Copyright 2000, 2001, 2002
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-
-obj-y  := beagle.o
-obj-$(CONFIG_LED_STATUS) += led.o
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
deleted file mode 100644
index 826aace3fba..000
--- a/board/ti/beagle/beagle.c
+++ /dev/null
@@ -1,591 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2004-2011
- * Texas Instruments, 
- *
- * Author :
- * Sunil Kumar 
- * Shashi Ranjan 
- *
- * Derived from Beagle Board and 3430 SDP code by
- * Richard Woodruff 
- * Syed Mohammed Khasim 
- *
- */
-#include 
-#include 
-#include 
-#ifdef CONFIG_LED_STATUS
-#include 
-#endif
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include "beagle.h"
-#include 
-
-#ifdef CONFIG_USB_EHCI_HCD
-#include 
-#include 
-#endif
-
-#define TWL4030_I2C_BUS0
-#define EXPANSION_EEPROM_I2C_BUS   1
-#define EXPANSION_EEPROM_I2C_ADDRESS   0x50
-
-#define TINCANTOOLS_ZIPPY  0x01000100
-#define TINCANTOOLS_ZIPPY2 0x02000100
-#define TINCANTOOLS_TRAINER0x04000100
-#define TINCANTOOLS_SHOWDOG0x03000100
-#define KBADC_BEAGLEFPGA   0x01000600
-#define LW_BEAGLETOUCH 0x01000700
-#define BRAINMUX_LCDOG 0x01000800
-#define BRAINMUX_LCDOGTOUCH0x02000800
-#define BBTOYS_WIFI0x01000B00
-#define BBTOYS_VGA 0x02000B00
-#define BBTOYS_LCD 0x03000B00
-#define BCT_BRETTL30x01000F00
-#define BCT_BRETTL40x02000F00
-#define LSR_COM6L_ADPT 0x01001300
-#define BEAGLE_NO_EEPROM   0x
-
-DECLARE_GLOBAL_DATA_PTR;
-
-static struct {
-   unsigned int device_vendor;
-   unsigned char revision;
-   unsigned char content;
-   char fab_revision[8];
-   char env_var[16];
-   char env_setting[64];
-} expansion_config;
-
-static const struct ns16550_platdata beagle_serial = {
-   .base = OMAP34XX_UART3,
-   .reg_shift = 2,
-   .clock = V_NS16550_CLK,
-   .fcr = UART_FCR_DEFVAL,
-};
-
-U_BOOT_DEVICE(beagle_uart) = {
-   "ns16550_serial",
-   _serial
-};
-
-/*
- * Routine: board_init
- * Description: Early hardware init.
- */
-int board_init(void)
-{
-   gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
-   /* board id for Linux */
-   gd->bd->bi_arch_number = MACH_TYPE_OMAP3_BEAGLE;
-   /* boot param 

[U-Boot] [PATCH 76/93] arm: Remove helios4 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/kobol/helios4/MAINTAINERS |   6 --
 board/kobol/helios4/Makefile|   5 -
 board/kobol/helios4/README  |  46 -
 board/kobol/helios4/helios4.c   | 163 --
 configs/helios4_defconfig   |  60 ---
 include/configs/helios4.h   | 172 
 6 files changed, 452 deletions(-)
 delete mode 100644 board/kobol/helios4/MAINTAINERS
 delete mode 100644 board/kobol/helios4/Makefile
 delete mode 100644 board/kobol/helios4/README
 delete mode 100644 board/kobol/helios4/helios4.c
 delete mode 100644 configs/helios4_defconfig
 delete mode 100644 include/configs/helios4.h

diff --git a/board/kobol/helios4/MAINTAINERS b/board/kobol/helios4/MAINTAINERS
deleted file mode 100644
index c9610deee76..000
--- a/board/kobol/helios4/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-HELIOS4 BOARD
-M: Dennis Gilmore 
-S: Maintained
-F: board/kobol/helios4/
-F: include/configs/helios4.h
-F: configs/helios4_defconfig
diff --git a/board/kobol/helios4/Makefile b/board/kobol/helios4/Makefile
deleted file mode 100644
index 63f0796397c..000
--- a/board/kobol/helios4/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2018 Dennis Gilmore 
-
-obj-y  := helios4.o
diff --git a/board/kobol/helios4/README b/board/kobol/helios4/README
deleted file mode 100644
index 749f0482782..000
--- a/board/kobol/helios4/README
+++ /dev/null
@@ -1,46 +0,0 @@
-Update from original Marvell U-Boot to mainline U-Boot:

-
-Generate the U-Boot image with these commands:
-
-$ make helios4_defconfig
-$ make
-
-The resulting image including the SPL binary with the
-full DDR setup is "u-boot-spl.kwb".
-
-Now all you need to do is copy this image on a SD card.
-For example with this command:
-
-$ sudo dd if=u-boot-spl.kwb of=/dev/sdX bs=512 seek=1
-
-Please use the correct device node for your setup instead
-of "/dev/sdX" here!
-
-Boot selection:

-
-Before powering up the board, boot selection should be done via the SW1 dip
-switch (0: OFF, 1: ON):
-
- - SPI: 00010
- - SD/eMMC: 00111
- - SATA1:   11100
- - UART:0
-
-Boot from UART:

-
-Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5)
-to your host.
-
-Set the SW1 DIP switches to UART boot (see above).
-
-Run the following command to initiate U-Boot download:
-
-  ./tools/kwboot -p -b u-boot-spl.kwb /dev/ttyUSBX
-
-Use the correct UART device node for /dev/ttyUSBX.
-
-When download finishes start your favorite terminal emulator
-on /dev/ttyUSBX.
diff --git a/board/kobol/helios4/helios4.c b/board/kobol/helios4/helios4.c
deleted file mode 100644
index 341678319a4..000
--- a/board/kobol/helios4/helios4.c
+++ /dev/null
@@ -1,163 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2018 Dennis Gilmore 
- *  based on board/solidrun/clearfog/clearfog.c
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "../drivers/ddr/marvell/a38x/ddr3_init.h"
-#include <../serdes/a38x/high_speed_env_spec.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define ETH_PHY_CTRL_REG   0
-#define ETH_PHY_CTRL_POWER_DOWN_BIT11
-#define ETH_PHY_CTRL_POWER_DOWN_MASK   BIT(ETH_PHY_CTRL_POWER_DOWN_BIT)
-
-/*
- * Those values and defines are taken from the Marvell U-Boot version
- * "u-boot-2013.01-15t1-helios4" as well as the upstream config for clearfog
- */
-#define BOARD_GPP_OUT_ENA_LOW  0x
-#define BOARD_GPP_OUT_ENA_MID  0x
-
-#define BOARD_GPP_OUT_VAL_LOW  0x0
-#define BOARD_GPP_OUT_VAL_MID  0x0
-#define BOARD_GPP_POL_LOW  0x0
-#define BOARD_GPP_POL_MID  0x0
-
-/* IO expander on Marvell GP board includes e.g. fan enabling */
-struct marvell_io_exp {
-   u8 addr;
-   u8 val;
-};
-
-static struct marvell_io_exp io_exp[] = {
-   {6, 0xf9},
-   {2, 0x46}, /* Assert reset signals and enable USB3 current limiter */
-   {6, 0xb9}
-};
-
-static struct serdes_map board_serdes_map[] = {
-   {SATA0, SERDES_SPEED_6_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {USB3_HOST0, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {SATA1, SERDES_SPEED_6_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {SATA3, SERDES_SPEED_6_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {SATA2, SERDES_SPEED_6_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-};
-
-int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
-{
-   *serdes_map_array = board_serdes_map;
-   *count = ARRAY_SIZE(board_serdes_map);
-   return 0;
-}
-
-/*
- * Define the DDR layout / topology here in the board file. This will
- * be used by the DDR3 init code in the SPL U-Boot version to configure
- * the DDR3 controller.
- */
-static 

[U-Boot] [PATCH 73/93] arm: Remove clearfog board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/solidrun/clearfog/MAINTAINERS |   6 --
 board/solidrun/clearfog/Makefile|   5 -
 board/solidrun/clearfog/README  |  51 -
 board/solidrun/clearfog/clearfog.c  | 141 -
 configs/clearfog_defconfig  |  66 
 include/configs/clearfog.h  | 157 
 6 files changed, 426 deletions(-)
 delete mode 100644 board/solidrun/clearfog/MAINTAINERS
 delete mode 100644 board/solidrun/clearfog/Makefile
 delete mode 100644 board/solidrun/clearfog/README
 delete mode 100644 board/solidrun/clearfog/clearfog.c
 delete mode 100644 configs/clearfog_defconfig
 delete mode 100644 include/configs/clearfog.h

diff --git a/board/solidrun/clearfog/MAINTAINERS 
b/board/solidrun/clearfog/MAINTAINERS
deleted file mode 100644
index 6d0c3ef58bd..000
--- a/board/solidrun/clearfog/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-CLEARFOG BOARD
-M: Stefan Roese 
-S: Maintained
-F: board/solidrun/clearfog/
-F: include/configs/clearfog.h
-F: configs/clearfog_defconfig
diff --git a/board/solidrun/clearfog/Makefile b/board/solidrun/clearfog/Makefile
deleted file mode 100644
index 5cfda3283c5..000
--- a/board/solidrun/clearfog/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2015 Stefan Roese 
-
-obj-y  := clearfog.o
diff --git a/board/solidrun/clearfog/README b/board/solidrun/clearfog/README
deleted file mode 100644
index a7bc0d4e23f..000
--- a/board/solidrun/clearfog/README
+++ /dev/null
@@ -1,51 +0,0 @@
-Update from original Marvell U-Boot to mainline U-Boot:

-
-Generate the U-Boot image with these commands:
-
-$ make clearfog_defconfig
-$ make
-
-The resulting image including the SPL binary with the
-full DDR setup is "u-boot-spl.kwb".
-
-Now all you need to do is copy this image on a SD card.
-For example with this command:
-
-$ sudo dd if=u-boot-spl.kwb of=/dev/sdX bs=512 seek=1
-
-Please use the correct device node for your setup instead
-of "/dev/sdX" here!
-
-Boot selection:

-
-Before powering up the board, boot selection should be done via the SW1 dip
-switch (0: OFF, 1: ON):
-
- - SPI: 00010
- - SD/eMMC: 00111
- - M.2 SSD: 11100
- - UART:01001 [1]
-
-[1]: According to SolidRun's manual, 0 should be used for UART booting on
- the ClearFog 'Pro' variant.
- However, this doesn't work (anymore) at least on Rev. 2.1 (but '01001' as
- mentionend for the 'Base' variant does).
-
-Boot from UART:

-
-Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5)
-to your host.
-
-Set the SW1 DIP switches to UART boot (see above).
-
-Run the following command to initiate U-Boot download:
-
-  ./tools/kwboot -b u-boot-spl.kwb /dev/ttyUSBX
-
-Use the correct UART device node for /dev/ttyUSBX.
-
-When download finishes start your favorite terminal emulator
-on /dev/ttyUSBX.
diff --git a/board/solidrun/clearfog/clearfog.c 
b/board/solidrun/clearfog/clearfog.c
deleted file mode 100644
index 4e1386c8a22..000
--- a/board/solidrun/clearfog/clearfog.c
+++ /dev/null
@@ -1,141 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2015 Stefan Roese 
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include "../drivers/ddr/marvell/a38x/ddr3_init.h"
-#include <../serdes/a38x/high_speed_env_spec.h>
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#define ETH_PHY_CTRL_REG   0
-#define ETH_PHY_CTRL_POWER_DOWN_BIT11
-#define ETH_PHY_CTRL_POWER_DOWN_MASK   (1 << ETH_PHY_CTRL_POWER_DOWN_BIT)
-
-/*
- * Those values and defines are taken from the Marvell U-Boot version
- * "u-boot-2013.01-15t1-clearfog"
- */
-#define BOARD_GPP_OUT_ENA_LOW  0x
-#define BOARD_GPP_OUT_ENA_MID  0x
-
-#define BOARD_GPP_OUT_VAL_LOW  0x0
-#define BOARD_GPP_OUT_VAL_MID  0x0
-#define BOARD_GPP_POL_LOW  0x0
-#define BOARD_GPP_POL_MID  0x0
-
-static struct serdes_map board_serdes_map[] = {
-   {SATA0, SERDES_SPEED_3_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {SGMII1, SERDES_SPEED_1_25_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {PEX1, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
-   {USB3_HOST1, SERDES_SPEED_5_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-   {PEX2, SERDES_SPEED_5_GBPS, PEX_ROOT_COMPLEX_X1, 0, 0},
-   {SGMII2, SERDES_SPEED_1_25_GBPS, SERDES_DEFAULT_MODE, 0, 0},
-};
-
-int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
-{
-   *serdes_map_array = board_serdes_map;
-   *count = ARRAY_SIZE(board_serdes_map);
-   return 0;
-}
-
-/*
- * Define the DDR layout / topology here in the board file. This will
- * be used by the DDR3 init code in the SPL U-Boot version to configure
- * the DDR3 controller.
- */
-static struct mv_ddr_topology_map board_topology_map = {
- 

[U-Boot] [PATCH 74/93] arm: Remove socfpga_arria10 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 board/altera/arria10-socdk/Kconfig  | 18 -
 board/altera/arria10-socdk/MAINTAINERS  |  7 
 board/altera/arria10-socdk/Makefile |  5 ---
 board/altera/arria10-socdk/socfpga.c|  6 ---
 configs/socfpga_arria10_defconfig   | 44 --
 include/configs/socfpga_arria10_socdk.h | 50 -
 6 files changed, 130 deletions(-)
 delete mode 100644 board/altera/arria10-socdk/Kconfig
 delete mode 100644 board/altera/arria10-socdk/MAINTAINERS
 delete mode 100644 board/altera/arria10-socdk/Makefile
 delete mode 100644 board/altera/arria10-socdk/socfpga.c
 delete mode 100644 configs/socfpga_arria10_defconfig
 delete mode 100644 include/configs/socfpga_arria10_socdk.h

diff --git a/board/altera/arria10-socdk/Kconfig 
b/board/altera/arria10-socdk/Kconfig
deleted file mode 100644
index b80cc6d6f93..000
--- a/board/altera/arria10-socdk/Kconfig
+++ /dev/null
@@ -1,18 +0,0 @@
-if TARGET_SOCFPGA_ARRIA10
-
-config SYS_CPU
-   default "armv7"
-
-config SYS_BOARD
-   default "socfpga_arria10"
-
-config SYS_VENDOR
-   default "altera"
-
-config SYS_SOC
-   default "socfpga_arria10"
-
-config SYS_CONFIG_NAME
-   default "socfpga_arria10"
-
-endif
diff --git a/board/altera/arria10-socdk/MAINTAINERS 
b/board/altera/arria10-socdk/MAINTAINERS
deleted file mode 100644
index 5a76efb54ba..000
--- a/board/altera/arria10-socdk/MAINTAINERS
+++ /dev/null
@@ -1,7 +0,0 @@
-SOCFPGA BOARD
-M: Dinh Nguyen 
-M: Chin-Liang See 
-S: Maintained
-F: board/altera/arria10-socdk/
-F: include/configs/socfpga_arria10_socdk.h
-F: configs/socfpga_arria10_defconfig
diff --git a/board/altera/arria10-socdk/Makefile 
b/board/altera/arria10-socdk/Makefile
deleted file mode 100644
index 80d00043464..000
--- a/board/altera/arria10-socdk/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Copyright (C) 2015 Altera Corporation 
-
-obj-y  := socfpga.o
diff --git a/board/altera/arria10-socdk/socfpga.c 
b/board/altera/arria10-socdk/socfpga.c
deleted file mode 100644
index 4c466cb9444..000
--- a/board/altera/arria10-socdk/socfpga.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2015 Altera Corporation 
- */
-
-#include 
diff --git a/configs/socfpga_arria10_defconfig 
b/configs/socfpga_arria10_defconfig
deleted file mode 100644
index 6ebda811355..000
--- a/configs/socfpga_arria10_defconfig
+++ /dev/null
@@ -1,44 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_ARRIA10_SOCDK=y
-CONFIG_SPL=y
-CONFIG_IDENT_STRING="socfpga_arria10"
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200"
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb"
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SPL_FPGA_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-# CONFIG_SPL_DOS_PARTITION is not set
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_MMC=y
-CONFIG_MTD_DEVICE=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_SPI=y
-CONFIG_TIMER=y
-CONFIG_SPL_TIMER=y
-CONFIG_DESIGNWARE_APB_TIMER=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_arria10_socdk.h 
b/include/configs/socfpga_arria10_socdk.h
deleted file mode 100644
index 58e446b60a9..000
--- a/include/configs/socfpga_arria10_socdk.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- *  Copyright (C) 2015-2017 Altera Corporation 
- */
-
-#ifndef __CONFIG_SOCFGPA_ARRIA10_H__
-#define __CONFIG_SOCFGPA_ARRIA10_H__
-
-#include 
-
-/* Booting Linux */
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/*
- * U-Boot general configurations
- */
-/* Cache options */
-#define CONFIG_SYS_DCACHE_OFF
-
-/* Memory configurations  */
-#define PHYS_SDRAM_1_SIZE  0x4000
-
-/* Ethernet on SoC (EMAC) */
-
-/*
- * U-Boot environment configurations
- */
-
-/*
- * Serial / UART configurations
- */
-#define CONFIG_SYS_NS16550_MEM32
-#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600, 115200}
-
-/*
- * L4 OSC1 Timer 0
- */
-/* reload value when timer count to zero */
-#define TIMER_LOAD_VAL 0x
-
-/*
- * Flash configurations
- */
-#define CONFIG_SYS_MAX_FLASH_BANKS 1
-
-/* The rest of the 

[U-Boot] [PATCH 72/93] arm: Remove socfpga_de0_nano_soc board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 configs/socfpga_de0_nano_soc_defconfig | 72 --
 include/configs/socfpga_de0_nano_soc.h | 22 
 2 files changed, 94 deletions(-)
 delete mode 100644 configs/socfpga_de0_nano_soc_defconfig
 delete mode 100644 include/configs/socfpga_de0_nano_soc.h

diff --git a/configs/socfpga_de0_nano_soc_defconfig 
b/configs/socfpga_de0_nano_soc_defconfig
deleted file mode 100644
index 1a9f2b60388..000
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ /dev/null
@@ -1,72 +0,0 @@
-CONFIG_ARM=y
-CONFIG_ARCH_SOCFPGA=y
-CONFIG_SYS_TEXT_BASE=0x0140
-CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_TARGET_SOCFPGA_TERASIC_DE0_NANO=y
-CONFIG_SPL=y
-CONFIG_SPL_STACK_R_ADDR=0x0080
-CONFIG_DISTRO_DEFAULTS=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_FIT=y
-# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_SYS_CONSOLE_IS_IN_ENV=y
-CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y
-CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
-CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_de0_nano_soc.dtb"
-CONFIG_VERSION_VARIABLE=y
-# CONFIG_DISPLAY_BOARDINFO is not set
-CONFIG_DISPLAY_BOARDINFO_LATE=y
-# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-CONFIG_SPL_SYS_MALLOC_SIMPLE=y
-CONFIG_SPL_STACK_R=y
-CONFIG_SPL_SPI_LOAD=y
-CONFIG_CMD_ASKENV=y
-CONFIG_CMD_GREPENV=y
-CONFIG_CMD_DFU=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_USB=y
-CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_EXT4_WRITE=y
-CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
-CONFIG_MTDPARTS_DEFAULT="mtdparts=ff705000.spi.0:1m(u-boot),256k(env1),256k(env2),14848k(boot),16m(rootfs),-@1536k(UBI)0"
-CONFIG_CMD_UBI=y
-# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_de0_nano_soc"
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_SPL_DM=y
-CONFIG_DFU_MMC=y
-CONFIG_FPGA_SOCFPGA=y
-CONFIG_DM_GPIO=y
-CONFIG_DWAPB_GPIO=y
-CONFIG_DM_I2C=y
-CONFIG_SYS_I2C_DW=y
-CONFIG_DM_MMC=y
-CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
-CONFIG_PHY_MICREL=y
-CONFIG_PHY_MICREL_KSZ90X1=y
-CONFIG_DM_ETH=y
-CONFIG_ETH_DESIGNWARE=y
-CONFIG_MII=y
-CONFIG_DM_RESET=y
-CONFIG_SPI=y
-CONFIG_CADENCE_QSPI=y
-CONFIG_DESIGNWARE_SPI=y
-CONFIG_USB=y
-CONFIG_DM_USB=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_MANUFACTURER="terasic"
-CONFIG_USB_GADGET_VENDOR_NUM=0x0525
-CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
-CONFIG_USB_GADGET_DWC2_OTG=y
-CONFIG_USB_GADGET_DOWNLOAD=y
-CONFIG_USE_TINY_PRINTF=y
diff --git a/include/configs/socfpga_de0_nano_soc.h 
b/include/configs/socfpga_de0_nano_soc.h
deleted file mode 100644
index d3224d5bd31..000
--- a/include/configs/socfpga_de0_nano_soc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (C) 2015 Marek Vasut 
- */
-#ifndef __CONFIG_TERASIC_DE0_H__
-#define __CONFIG_TERASIC_DE0_H__
-
-#include 
-
-/* Memory configurations */
-#define PHYS_SDRAM_1_SIZE  0x4000  /* 1GiB */
-
-/* Booting Linux */
-#define CONFIG_LOADADDR0x0100
-#define CONFIG_SYS_LOAD_ADDR   CONFIG_LOADADDR
-
-/* Ethernet on SoC (EMAC) */
-
-/* The rest of the configuration is shared */
-#include 
-
-#endif /* __CONFIG_TERASIC_DE0_H__ */
-- 
2.19.1.1215.g8438c0b245-goog

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


[U-Boot] [PATCH 71/93] arm: Remove imgtec_xilfpga board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/mips/Kconfig|  1 -
 board/imgtec/xilfpga/Kconfig | 15 -
 board/imgtec/xilfpga/MAINTAINERS |  6 
 board/imgtec/xilfpga/Makefile|  7 
 board/imgtec/xilfpga/README  | 55 
 board/imgtec/xilfpga/xilfpga.c   | 23 -
 configs/imgtec_xilfpga_defconfig | 27 
 7 files changed, 134 deletions(-)
 delete mode 100644 board/imgtec/xilfpga/Kconfig
 delete mode 100644 board/imgtec/xilfpga/MAINTAINERS
 delete mode 100644 board/imgtec/xilfpga/Makefile
 delete mode 100644 board/imgtec/xilfpga/README
 delete mode 100644 board/imgtec/xilfpga/xilfpga.c
 delete mode 100644 configs/imgtec_xilfpga_defconfig

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 6d646ef9997..b19cb51677b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -131,7 +131,6 @@ endchoice
 
 source "board/imgtec/boston/Kconfig"
 source "board/imgtec/malta/Kconfig"
-source "board/imgtec/xilfpga/Kconfig"
 source "board/micronas/vct/Kconfig"
 source "board/qemu-mips/Kconfig"
 source "arch/mips/mach-ath79/Kconfig"
diff --git a/board/imgtec/xilfpga/Kconfig b/board/imgtec/xilfpga/Kconfig
deleted file mode 100644
index b0782780f64..000
--- a/board/imgtec/xilfpga/Kconfig
+++ /dev/null
@@ -1,15 +0,0 @@
-if TARGET_XILFPGA
-
-config SYS_BOARD
-   default "xilfpga"
-
-config SYS_VENDOR
-   default "imgtec"
-
-config SYS_CONFIG_NAME
-   default "imgtec_xilfpga"
-
-config SYS_TEXT_BASE
-   default 0x80C0
-
-endif
diff --git a/board/imgtec/xilfpga/MAINTAINERS b/board/imgtec/xilfpga/MAINTAINERS
deleted file mode 100644
index aa045325eac..000
--- a/board/imgtec/xilfpga/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-XILFPGA BOARD
-M: Zubair Lutfullah Kakakhel 
-S: Maintained
-F: board/imgtec/xilfpga
-F: include/configs/xilfpga.h
-F: configs/imgtec_xilfpga_defconfig
diff --git a/board/imgtec/xilfpga/Makefile b/board/imgtec/xilfpga/Makefile
deleted file mode 100644
index 9aaf9ce263f..000
--- a/board/imgtec/xilfpga/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Copyright (C) 2016, Imagination Technologies Ltd.
-# Zubair Lutfullah Kakakhel 
-#
-# SPDX-License-Identifier:  GPL-2.0+
-#
-obj-y := xilfpga.o
diff --git a/board/imgtec/xilfpga/README b/board/imgtec/xilfpga/README
deleted file mode 100644
index ac19d485d4a..000
--- a/board/imgtec/xilfpga/README
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016, Imagination Technologies Ltd.
- *
- * Zubair Lutfullah Kakakhel, zubair.kakak...@imgtec.com
- */
-
-MIPSfpga
-===
-
-MIPSfpga is an FPGA based development platform by Imagination Technologies
-As we are dealing with a MIPS core instantiated on an FPGA, specifications
-are fluid and can be varied in RTL.
-
-The example project provided by IMGTEC runs on the Nexys4DDR board by
-Digilent powered by the ARTIX-7 FPGA by Xilinx. Relevant details about
-the example project and the Nexys4DDR board:
-
-- microAptiv UP core m14Kc
-- 50MHz clock speed
-- 128Mbyte DDR RAM at 0x_
-- 8Kbyte RAM   at 0x1000_
-- axi_intc at 0x1020_
-- axi_uart16550at 0x1040_
-- axi_gpio at 0x1060_
-- axi_i2c  at 0x10A0_
-- custom_gpio  at 0x10C0_
-- axi_ethernetlite at 0x10E0_
-- 8Kbyte BootRAM   at 0x1FC0_
-- 16Mbyte QPI  at 0x1D00_
-
-Boot protocol:
---
-
-The BootRAM is a writeable "RAM" in FPGA at 0x1FC0_.
-This is for easy reprogrammibility via JTAG.
-
-DDR initialization is already handled by a HW IP block.
-
-When the example project bitstream is loaded, the cpu_reset button
-needs to be pressed.
-
-The bootram initializes the cache and axi_uart
-Then checks if there is anything non 0x_ at location 0x1D40_
-
-If there is, then that is considered as u-boot. u-boot is copied from
-0x1D40_ to memory and the bootram jumps into u-boot code.
-
-At this point, the board is ready to load the Linux kernel + buildroot 
initramfs
-
-This can be done in multiple ways:
-
-1- JTAG load the binary and jump into it.
-2- Load kernel stored in the QSPI flash at 0x1D80_
-3- Load uImage via tftp. Ethernet works in u-boot.
-   e.g. env set server ip 192.168.154.45; dhcp uImage; bootm
diff --git a/board/imgtec/xilfpga/xilfpga.c b/board/imgtec/xilfpga/xilfpga.c
deleted file mode 100644
index 86645155e64..000
--- a/board/imgtec/xilfpga/xilfpga.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Imagination Technologies MIPSfpga platform code
- *
- * Copyright (C) 2016, Imagination Technologies Ltd.
- *
- * Zubair Lutfullah Kakakhel 
- *
- */
-
-#include 
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* initialize the DDR Controller and PHY */
-int dram_init(void)
-{
-   /* MIG IP block is smart and 

[U-Boot] [PATCH 69/93] arm: Remove ap143 board

2018-11-19 Thread Simon Glass
This board has not been converted to CONFIG_DM_BLK by the deadline.
Remove it.

Signed-off-by: Simon Glass 
---

 arch/mips/mach-ath79/Kconfig |  1 -
 board/qca/ap143/Kconfig  | 27 
 board/qca/ap143/MAINTAINERS  |  6 
 board/qca/ap143/Makefile |  3 --
 board/qca/ap143/ap143.c  | 62 
 configs/ap143_defconfig  | 55 
 include/configs/ap143.h  | 50 -
 7 files changed, 204 deletions(-)
 delete mode 100644 board/qca/ap143/Kconfig
 delete mode 100644 board/qca/ap143/MAINTAINERS
 delete mode 100644 board/qca/ap143/Makefile
 delete mode 100644 board/qca/ap143/ap143.c
 delete mode 100644 configs/ap143_defconfig
 delete mode 100644 include/configs/ap143.h

diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index bc86f591df8..1553aabcea7 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -51,7 +51,6 @@ config BOARD_TPLINK_WDR4300
 endchoice
 
 source "board/qca/ap121/Kconfig"
-source "board/qca/ap143/Kconfig"
 source "board/tplink/wdr4300/Kconfig"
 
 endmenu
diff --git a/board/qca/ap143/Kconfig b/board/qca/ap143/Kconfig
deleted file mode 100644
index 74c632a03e7..000
--- a/board/qca/ap143/Kconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-if TARGET_AP143
-
-config SYS_VENDOR
-   default "qca"
-
-config SYS_BOARD
-   default "ap143"
-
-config SYS_CONFIG_NAME
-   default "ap143"
-
-config SYS_TEXT_BASE
-   default 0x9f00
-
-config SYS_DCACHE_SIZE
-   default 32768
-
-config SYS_DCACHE_LINE_SIZE
-   default 32
-
-config SYS_ICACHE_SIZE
-   default 65536
-
-config SYS_ICACHE_LINE_SIZE
-   default 32
-
-endif
diff --git a/board/qca/ap143/MAINTAINERS b/board/qca/ap143/MAINTAINERS
deleted file mode 100644
index 11cb14fc74d..000
--- a/board/qca/ap143/MAINTAINERS
+++ /dev/null
@@ -1,6 +0,0 @@
-AP143 BOARD
-M: Wills Wang 
-S: Maintained
-F: board/qca/ap143/
-F: include/configs/ap143.h
-F: configs/ap143_defconfig
diff --git a/board/qca/ap143/Makefile b/board/qca/ap143/Makefile
deleted file mode 100644
index bf9fd83af9b..000
--- a/board/qca/ap143/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-
-obj-y  = ap143.o
diff --git a/board/qca/ap143/ap143.c b/board/qca/ap143/ap143.c
deleted file mode 100644
index 8ee26ababaa..000
--- a/board/qca/ap143/ap143.c
+++ /dev/null
@@ -1,62 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright (C) 2015-2016 Wills Wang 
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#ifdef CONFIG_DEBUG_UART_BOARD_INIT
-void board_debug_uart_init(void)
-{
-   void __iomem *regs;
-   u32 val;
-
-   regs = map_physmem(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE,
-  MAP_NOCACHE);
-
-   /*
-* GPIO9 as input, GPIO10 as output
-*/
-   val = readl(regs + AR71XX_GPIO_REG_OE);
-   val |= QCA953X_GPIO(9);
-   val &= ~QCA953X_GPIO(10);
-   writel(val, regs + AR71XX_GPIO_REG_OE);
-
-   /*
-* Enable GPIO10 as UART0_SOUT
-*/
-   val = readl(regs + QCA953X_GPIO_REG_OUT_FUNC2);
-   val &= ~QCA953X_GPIO_MUX_MASK(16);
-   val |= QCA953X_GPIO_OUT_MUX_UART0_SOUT << 16;
-   writel(val, regs + QCA953X_GPIO_REG_OUT_FUNC2);
-
-   /*
-* Enable GPIO9 as UART0_SIN
-*/
-   val = readl(regs + QCA953X_GPIO_REG_IN_ENABLE0);
-   val &= ~QCA953X_GPIO_MUX_MASK(8);
-   val |= QCA953X_GPIO_IN_MUX_UART0_SIN << 8;
-   writel(val, regs + QCA953X_GPIO_REG_IN_ENABLE0);
-
-   /*
-* Enable GPIO10 output
-*/
-   val = readl(regs + AR71XX_GPIO_REG_OUT);
-   val |= QCA953X_GPIO(10);
-   writel(val, regs + AR71XX_GPIO_REG_OUT);
-}
-#endif
-
-int board_early_init_f(void)
-{
-   ddr_init();
-   ath79_eth_reset();
-   return 0;
-}
diff --git a/configs/ap143_defconfig b/configs/ap143_defconfig
deleted file mode 100644
index 83eb583b563..000
--- a/configs/ap143_defconfig
+++ /dev/null
@@ -1,55 +0,0 @@
-CONFIG_MIPS=y
-CONFIG_SYS_TEXT_BASE=0x9F00
-CONFIG_SYS_MALLOC_F_LEN=0x800
-CONFIG_DEBUG_UART_BOARD_INIT=y
-CONFIG_DEBUG_UART_BASE=0xb802
-CONFIG_DEBUG_UART_CLOCK=2500
-CONFIG_ARCH_ATH79=y
-CONFIG_TARGET_AP143=y
-CONFIG_DEBUG_UART=y
-CONFIG_BOOTDELAY=3
-CONFIG_USE_BOOTARGS=y
-CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs"
-CONFIG_DISPLAY_CPUINFO=y
-CONFIG_BOARD_EARLY_INIT_F=y
-CONFIG_SYS_PROMPT="ap143 # "
-# CONFIG_CMD_BDI is not set
-# CONFIG_CMD_CONSOLE is not set
-# CONFIG_CMD_ELF is not set
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_IMPORTENV is not set
-# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_CRC32 is not set
-CONFIG_CMD_MEMTEST=y
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_SF=y
-CONFIG_CMD_SPI=y
-CONFIG_CMD_MTDPARTS=y

  1   2   3   >