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

2016-03-15 Thread Jagan Teki
Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa:

  Prepare v2016.03 (2016-03-14 10:20:21 -0400)

are available in the git repository at:

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

for you to fetch changes up to 77b8d04854f486741471ad02b93b473b5b3d72f8:

  spi: omap3: Convert to driver model (2016-03-14 22:46:28 +0530)


Jagan Teki (3):
  spi: omap3: Move headers code inside the driver
  spi: omap3: Make local functions as static
  spi: omap3: Convert to driver model

 drivers/spi/Kconfig |   7 +
 drivers/spi/omap3_spi.c | 757 +++-
 drivers/spi/omap3_spi.h | 109 ---
 3 files changed, 497 insertions(+), 376 deletions(-)
 delete mode 100644 drivers/spi/omap3_spi.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Please pull : u-boot-video/master

2016-03-15 Thread Anatolij Gustschin
Hi Tom,

The following changes since commit df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa:

  Prepare v2016.03 (2016-03-14 10:20:21 -0400)

are available in the git repository at:

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

for you to fetch changes up to 00b1d2d3178747c113dd8f939cf3e2d449bfaf54:

  imx: mx6: hdmi: handle overflow condition (2016-03-14 22:53:45 +0100)


Jacob Chen (6):
  dm: video: Add a operation to display uclass
  rockchip: Add a binding file for rk3288 video
  rockchip: video: Add a display driver for rockchip LVDS
  rockchip: dts: Add LVDS support
  rockchip: video: Add LVDS support in vop driver
  doc: dt-bindings: Describe rockchip LVDS interface

Peng Fan (3):
  video: ipu: avoid overflow issue
  imx: mx6: correct IPU clock
  imx: mx6: hdmi: handle overflow condition

 arch/arm/cpu/armv7/mx6/soc.c |   13 +-
 arch/arm/dts/rk3288.dtsi |   47 +++-
 arch/arm/include/asm/arch-rockchip/lvds_rk3288.h |   97 +
 arch/arm/include/asm/arch-rockchip/vop_rk3288.h  |1 +
 doc/device-tree-bindings/video/rockchip-lvds.txt |   77 +++
 drivers/video/display-uclass.c   |3 +
 drivers/video/ipu_common.c   |   73 +--
 drivers/video/rockchip/Makefile  |2 +-
 drivers/video/rockchip/rk_lvds.c |  254 ++
 drivers/video/rockchip/rk_vop.c  |   16 +-
 include/configs/mx6sabre_common.h|6 +-
 include/display.h|   11 +-
 include/dt-bindings/video/rk3288.h   |   11 +
 13 files changed, 585 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-rockchip/lvds_rk3288.h
 create mode 100644 doc/device-tree-bindings/video/rockchip-lvds.txt
 create mode 100644 drivers/video/rockchip/rk_lvds.c
 create mode 100644 include/dt-bindings/video/rk3288.h

Please pull. Thanks!

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


[U-Boot] [PATCH] armv8/ls1043a: update env settings for booting kernel

2016-03-15 Thread Gong Qianyu
Signed-off-by: Gong Qianyu 
---
 include/configs/ls1043a_common.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 6150bc1..5039241 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -253,13 +253,13 @@
"ramdisk_size=0x200\0"  \
"fdt_high=0x\0" \
"initrd_high=0x\0"  \
-   "kernel_start=0x6120\0" \
-   "kernel_load=0x807f\0"  \
-   "kernel_size=0x100\0"   \
+   "kernel_start=0x6110\0" \
+   "kernel_load=0xa000\0"  \
+   "kernel_size=0x280\0"   \
"console=ttyAMA0,38400n8\0"
 
 #define CONFIG_BOOTARGS"console=ttyS0,115200 
root=/dev/ram0 " \
-   "earlycon=uart8250,0x21c0500,115200"
+   "earlycon=uart8250,mmio,0x21c0500"
 #define CONFIG_BOOTCOMMAND "cp.b $kernel_start $kernel_load " \
"$kernel_size && bootm $kernel_load"
 #define CONFIG_BOOTDELAY   10
-- 
2.1.0.27.g96db324

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


Re: [U-Boot] [PATCH 1/2] sunxi: Sync dts files with the upstream kernel

2016-03-15 Thread Ian Campbell
On Mon, 2016-03-14 at 21:49 +0100, Hans de Goede wrote:
> Sync dts files with the upstream kernel including
> changes queued for 4.6:
> 
> https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6
> 
> Note this adds a number of new unused board dts files. I've asked the
> authors of the kernel commits adding these to submit a matching defconfig
> to u-boot.
> 
> Signed-off-by: Hans de Goede 

Both patches here: Acked-by: Ian Campbell 

Do you have a script or something which (semi-)automates these imports,
or is it manual faff each time?

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


[U-Boot] [PATCH v4 0/4] usb: Reduce USB scanning time

2016-03-15 Thread Stefan Roese

My current x86 platform (Bay Trail, not in mainline yet) has a quite
complex USB infrastructure with many USB hubs. Here the USB scan takes
an incredible huge amount of time:

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 28.415 seconds

This is of course not acceptable on platforms, where USB needs to get
scanned at every bootup. As this increases the bootup time of this
device by nearly 30 seconds!

This patch series greatly reduces the USB scanning time. This is done
by multiple means:

- Remove or reduce delays and timeouts
- Remove a 2nd reset of the USB hubs
- Change USB port timeout handling and introduce quasi parallel USB
  port scanning

As a result, the USB scanning time is greatly reduced:

starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 1.822 seconds

As you can see, the time is reduced from 28.4 to 1.8 seconds!

Please find more details to the changes in the patch description.

Testing and comments welcome!

Thanks,
Stefan

Changes in v4:
- Minor rewording / fixes of the commit text
- Add Acked-by / Tested-by from Hans and Stephen
- Minor rewording / fixes of the commit text
- Add Acked-by from Hans
- Moved check for query_delay into usb_scan_port() as suggested by Hans
- Correct list handling (drop INIT_LIST_HEAD)
- Added some missing free() calls
- Changed connect_timeout calculation as suggested by Stephen
- Moved usb_scan_list to other globals to be cleaned up in a later patch
- Added timeout check for non-functional ports (usb_get_port_status
  return error
- Reverted if logic in loop to remove an indentation level
- Moved debug() output
- Removed unnecessary if when already connected
- Added Hans's Acked-by
- Added Stephen's Tested-by
- Minor rewording / fixes of the commit text

Changes in v3:
- Changed small timeout from 10ms to 20ms as this results in a
  much faster USB scanning time (10ms too small and 20ms enough
  in many cases)
- Introduced scanning list containing all USB devices of one USB
  controller that need to get scanned
- Don't delay in usb_hub_power_on(). Instead skip querying these devices
  until the delay time is reached.

Changes in v2:
- Add Acked-by / Tested-by from Hans and Stephen
- Make this change unconditional
- Add Acked-by / Tested-by from Hans and Stephen
- Make this change unconditional
- Add Tested-by from Stephen
- Remove static USB port configuration patch (for now)

Stefan Roese (4):
  usb: legacy_hub_port_reset(): Speedup hub reset handling
  usb: Remove 200 ms delay in usb_hub_port_connect_change()
  usb: Don't reset the USB hub a 2nd time
  usb: Change power-on / scanning timeout handling

 common/usb.c |  13 +--
 common/usb_hub.c | 305 +--
 include/usb.h|   3 +
 3 files changed, 212 insertions(+), 109 deletions(-)

-- 
2.7.3

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


[U-Boot] [PATCH v4 3/4] usb: Don't reset the USB hub a 2nd time

2016-03-15 Thread Stefan Roese
Debugging has shown, that all USB hubs are being reset twice while
USB scanning. This introduces additional delays and makes USB scanning
even more slow. Testing has shown that this 2nd USB hub reset doesn't
seem to be necessary.

This patch now removes this 2nd USB hub reset. Resulting in faster USB
scan time. Here the current numbers:

Without this patch:
=> time usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 24.003 seconds

With this patch:
=> time usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 20.392 seconds

So ~3.6 seconds of USB scanning time reduction.

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 
Cc: Marek Vasut 

---

Changes in v4:
- Minor rewording / fixes of the commit text
- Add Acked-by from Hans

Changes in v3: None
Changes in v2:
- Make this change unconditional
- Add Tested-by from Stephen

 common/usb.c | 13 +
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index c7b8b0e..45a5a0f 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -919,19 +919,8 @@ __weak int usb_alloc_device(struct usb_device *udev)
 
 static int usb_hub_port_reset(struct usb_device *dev, struct usb_device *hub)
 {
-   if (hub) {
-   unsigned short portstatus;
-   int err;
-
-   /* reset the port for the second time */
-   err = legacy_hub_port_reset(hub, dev->portnr - 1, &portstatus);
-   if (err < 0) {
-   printf("\n Couldn't reset port %i\n", dev->portnr);
-   return err;
-   }
-   } else {
+   if (!hub)
usb_reset_root_port(dev);
-   }
 
return 0;
 }
-- 
2.7.3

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


[U-Boot] [PATCH v4 4/4] usb: Change power-on / scanning timeout handling

2016-03-15 Thread Stefan Roese
This patch changes the USB port scanning procedure and timeout
handling in the following ways:

a)
The power-on delay in usb_hub_power_on() is now reduced to a value of
max(100ms, "hub->desc.bPwrOn2PwrGood * 2"). The code does not wait
using mdelay, instead usb_hub_power_on() will wait before querying
the device in the scanning loop later. The total timeout for this
hub, which is 1 second + "hub->desc.bPwrOn2PwrGood * 2" is calculated
and will be used in the following per-port scanning loop as the timeout
to detect active USB devices on this hub.

b)
Don't delay the minimum delay (for power to stabilize) in
usb_hub_power_on(). Instead skip querying these devices in the scannig
loop until the delay time is reached.

c)
The ports are now scanned in a quasi parallel way. The current code did
wait for each (unconnected) port to reach its timeout and only then
continue with the next port. This patch now changes this to scan all
ports of all USB hubs quasi simultaneously. For this, all ports are added
to a scanning list. This list is scanned until all ports are ready
by either a) reaching the connection timeout (calculated earlier), or
by b) detecting a USB device. This results in a faster USB scan time as
the recursive scanning of USB hubs connected to the hub that's currently
being scanned will start earlier.

Without this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 20.163 seconds

With this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 1.822 seconds

So ~18.3 seconds of USB scanning time reduction.

Signed-off-by: Stefan Roese 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 

---

Changes in v4:
- Moved check for query_delay into usb_scan_port() as suggested by Hans
- Correct list handling (drop INIT_LIST_HEAD)
- Added some missing free() calls
- Changed connect_timeout calculation as suggested by Stephen
- Moved usb_scan_list to other globals to be cleaned up in a later patch
- Added timeout check for non-functional ports (usb_get_port_status
  return error
- Reverted if logic in loop to remove an indentation level
- Moved debug() output
- Removed unnecessary if when already connected
- Added Hans's Acked-by
- Added Stephen's Tested-by
- Minor rewording / fixes of the commit text

Changes in v3:
- Introduced scanning list containing all USB devices of one USB
  controller that need to get scanned
- Don't delay in usb_hub_power_on(). Instead skip querying these devices
  until the delay time is reached.

Changes in v2:
- Remove static USB port configuration patch (for now)

 common/usb_hub.c | 293 ++-
 include/usb.h|   3 +
 2 files changed, 204 insertions(+), 92 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index d621f50..e8cfc7e 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #ifdef CONFIG_SANDBOX
 #include 
@@ -49,9 +50,17 @@ DECLARE_GLOBAL_DATA_PTR;
 #define HUB_SHORT_RESET_TIME   20
 #define HUB_LONG_RESET_TIME200
 
+struct usb_device_scan {
+   struct usb_device *dev; /* USB hub device to scan */
+   struct usb_hub_device *hub; /* USB hub struct */
+   int port;   /* USB port to scan */
+   struct list_head list;
+};
+
 /* TODO(s...@chromium.org): Remove this when CONFIG_DM_USB is defined */
 static struct usb_hub_device hub_dev[USB_MAX_HUB];
 static int usb_hub_index;
+static LIST_HEAD(usb_scan_list);
 
 __weak void usb_hub_reset_devices(int port)
 {
@@ -120,7 +129,22 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
pgood_delay = max(pgood_delay,
  (unsigned)simple_strtol(env, NULL, 0));
debug("pgood_delay=%dms\n", pgood_delay);
-   mdelay(pgood_delay + 1000);
+
+   /*
+* Do a minimum delay of the larger value of 100ms or pgood_delay
+* so that the power can stablize before the devices are queried
+*/
+   dev->query_delay = get_timer(0) + max(100, (int)pgood_delay);
+
+   /*
+* Record the power-on timeout here. The max. delay (timeout)
+* will be done based on this value in the USB port loop in
+* usb_hub_configure() later.
+*/
+   dev->connect_timeout = dev->query_delay + 1000;
+   debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
+ dev->devnum, max(100, (int)pgood_delay),
+ max(100, (int)pgood_delay) + 1000);
 }
 
 void usb_hub_reset(void)
@@ -332,6 +356,157 @@ int usb_hub_port_connect_change(struct usb_device *dev, 
int port)
return ret;
 }
 
+static int usb_scan_port(struct usb_device_scan *usb_scan)
+{
+   ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
+   unsigned short portstatus;
+   unsigned short portchange;
+   struct usb_device *dev;
+   struct usb

[U-Boot] [PATCH v4 2/4] usb: Remove 200 ms delay in usb_hub_port_connect_change()

2016-03-15 Thread Stefan Roese
This patch removes 2 mdelay(200) calls from usb_hub_port_connect_change().
These delays don't seem to be necessary. At least not in my tests. Here
the number for a custom x86 Bay Trail board (not in mainline yet) with
a quite large and complex USB hub infrastructure.

Without this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 28.415 seconds

With this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 24.003 seconds

So ~4.5 seconds of USB scanning time reduction.

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 
Cc: Marek Vasut 

---

Changes in v4:
- Add Acked-by / Tested-by from Hans and Stephen

Changes in v3: None
Changes in v2:
- Make this change unconditional
- Add Acked-by / Tested-by from Hans and Stephen

 common/usb_hub.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index 2089e20..d621f50 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -275,7 +275,6 @@ int usb_hub_port_connect_change(struct usb_device *dev, int 
port)
if (!(portstatus & USB_PORT_STAT_CONNECTION))
return -ENOTCONN;
}
-   mdelay(200);
 
/* Reset the port */
ret = legacy_hub_port_reset(dev, port, &portstatus);
@@ -285,8 +284,6 @@ int usb_hub_port_connect_change(struct usb_device *dev, int 
port)
return ret;
}
 
-   mdelay(200);
-
switch (portstatus & USB_PORT_STAT_SPEED_MASK) {
case USB_PORT_STAT_SUPER_SPEED:
speed = USB_SPEED_SUPER;
-- 
2.7.3

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


Re: [U-Boot] [PATCH v3 4/4] usb: Change power-on / scanning timeout handling

2016-03-15 Thread Stefan Roese
Hi Stephan,

On 14.03.2016 18:31, Stephen Warren wrote:
> On 03/14/2016 04:18 AM, Stefan Roese wrote:
>> This patch changes the USB port scanning procedure and timeout
>> handling in the following ways:
> 
> A few nits/typos in the description, and some review comments below.

Thanks, will update the commit text in v4.


 
>> diff --git a/common/usb_hub.c b/common/usb_hub.c
> 
>> @@ -120,7 +121,21 @@ static void usb_hub_power_on(struct 
>> usb_hub_device *hub)
>>   pgood_delay = max(pgood_delay,
>> (unsigned)simple_strtol(env, NULL, 0));
>>   debug("pgood_delay=%dms\n", pgood_delay);
>> -mdelay(pgood_delay + 1000);
>> +
>> +/*
>> + * Do a minimum delay of the larger value of 100ms or pgood_delay
>> + * so that the power can stablize before the devices are queried
>> + */
>> +dev->query_delay = get_timer(0) + max(100, (int)pgood_delay);
>> +
>> +/*
>> + * Record the power-on timeout here. The max. delay (timeout)
>> + * will be done based on this value in the USB port loop in
>> + * usb_hub_configure() later.
>> + */
>> +dev->connect_timeout = get_timer(0) + pgood_delay + 1000;
> 
> I'd be tempted to make that:
> 
> dev->connect_timeout = dev->query_delay + 1000;
> 
> That way, if the max() used in the calculation of dev->query_delay was 
> dominated by the 100 not the pgood_delay, then we still get a 1000ms 
> time for the device to connect after the power is stable. Currently, if 
> pgood_delay<=100 (is that legal?) then the delta might be as little as 
> 900ms (for pgood_delay==0).

Fixed.
 
>> static LIST_HEAD(usb_scan_list);
> 
> You could put that onto the stack in usb_hub_configure() and pass it as 
> a parameter to usb_device_list_scan(). That would avoid some globals, 
> which might make it easier to apply this technique across multiple 
> controllers/hubs/... in the future?

Multiple controllers/hubs should be supported currently (at least
in my tests). Its the parallel scanning of those controllers which
might be problematic. usb_hub.c needs some general rework, as it
has some more globals:

/* TODO(s...@chromium.org): Remove this when CONFIG_DM_USB is defined */
static struct usb_hub_device hub_dev[USB_MAX_HUB];
static int usb_hub_index;

I've moved "usb_scan_list" to these declarations for now, so that
all of them can be cleaned up once somebody works on task.
 
>> +static int usb_scan_port(struct usb_device_scan *usb_scan)
> 
>> +ret = usb_get_port_status(dev, i + 1, portsts);
>> +if (ret < 0) {
>> +debug("get_port_status failed\n");
>> +return 0;
> 
> Shouldn't this cause a timeout eventually if it repeats forever?

Okay. I've added a timeout check here to remove such a non-functional
device.
 
>> +/* Test if the connection came up, and if so, exit. */
>> +if (portstatus & USB_PORT_STAT_CONNECTION) {
> 
> If you invert that test, you can return early and remove and indentation 
> level from the rest of the function.

Good catch. Changed in v4.
 
>> +debug("devnum=%d port=%d: USB dev found\n", dev->devnum, i + 1);
>> +/* Remove this device from scanning list */
>> +list_del(&usb_scan->list);
>> +
>> +/* A new USB device is ready at this point */
>> +
>> +debug("Port %d Status %X Change %X\n",
>> +  i + 1, portstatus, portchange);
> 
> It might be nice to print this a little earlier (outside the 
> USB_PORT_STAT_CONNECTION if block) so that any 
> USB_PORT_STAT_C_CONNECTION triggers the print, not just if C_CONNECTION 
> && CONNECTION. That might help debug, and match the existing code.

Changed in v4.
 
>> +if (portchange & USB_PORT_STAT_C_CONNECTION) {
>  > +debug("port %d connection change\n", i + 1);
>  > +usb_hub_port_connect_change(dev, i);
>  > +}
> 
> That test is always true, or the function would have returned earlier.

Changed in v4.
 
>> +static int usb_device_list_scan(void)
> ...
>> +static int running;
>> +int ret = 0;
>> +
>> +/* Only run this loop once for each controller */
>> +if (running)
>> +return 0;
>> +
>> +running = 1;
> ...
>> +out:
>> +/*
>> + * This USB controller has has finished scanning all its connected
>> + * USB devices. Set "running" back to 0, so that other USB 
>> controllers
>> + * will scan their devices too.
>> + */
>> +running = 0;
> 
> Doesn't this function only get called a single time from 
> usb_hub_configure()? If so, I don't think the "running" variable is 
> required.

Its called recursively, if hubs are stacked. So its called e.g.
5 times in this setup:

=> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller 
  |
  +-2  Hub (480 Mb/s, 0mA)
|
+-3  Hub (480 Mb/s, 100mA)
| |
| +-7  Hub (12 Mb/s, 100mA)
|
+-4  Hub (480 Mb/s, 0mA)
| |
| +-8  Mass Storage (480 Mb/s, 200mA)
| |Kingston DataTraveler 2.0 50E549C688C4BE7189942

[U-Boot] [PATCH v4 1/4] usb: legacy_hub_port_reset(): Speedup hub reset handling

2016-03-15 Thread Stefan Roese
Start with a short USB hub reset delay of 20ms. This can be enough for
some configurations.

The 2nd delay at the end of the loop is completely removed. Since the
delay hasn't been long enough, a longer delay time of 200ms is assigned
and will be used in the next loop round.

This hub reset handling is also used in the v4.4 Linux USB driver,
hub_port_reset().

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 
Cc: Marek Vasut 

---

Changes in v4:
- Minor rewording / fixes of the commit text

Changes in v3:
- Changed small timeout from 10ms to 20ms as this results in a
  much faster USB scanning time (10ms too small and 20ms enough
  in many cases)

Changes in v2:
- Add Acked-by / Tested-by from Hans and Stephen

 common/usb_hub.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index e1de813..2089e20 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -46,6 +46,9 @@ DECLARE_GLOBAL_DATA_PTR;
 
 #define USB_BUFSIZ 512
 
+#define HUB_SHORT_RESET_TIME   20
+#define HUB_LONG_RESET_TIME200
+
 /* TODO(s...@chromium.org): Remove this when CONFIG_DM_USB is defined */
 static struct usb_hub_device hub_dev[USB_MAX_HUB];
 static int usb_hub_index;
@@ -164,6 +167,7 @@ int legacy_hub_port_reset(struct usb_device *dev, int port,
int err, tries;
ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
unsigned short portstatus, portchange;
+   int delay = HUB_SHORT_RESET_TIME; /* start with short reset delay */
 
 #ifdef CONFIG_DM_USB
debug("%s: resetting '%s' port %d...\n", __func__, dev->dev->name,
@@ -176,7 +180,7 @@ int legacy_hub_port_reset(struct usb_device *dev, int port,
if (err < 0)
return err;
 
-   mdelay(200);
+   mdelay(delay);
 
if (usb_get_port_status(dev, port + 1, portsts) < 0) {
debug("get_port_status failed status %lX\n",
@@ -215,7 +219,8 @@ int legacy_hub_port_reset(struct usb_device *dev, int port,
if (portstatus & USB_PORT_STAT_ENABLE)
break;
 
-   mdelay(200);
+   /* Switch to long reset delay for the next round */
+   delay = HUB_LONG_RESET_TIME;
}
 
if (tries == MAX_TRIES) {
-- 
2.7.3

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


Re: [U-Boot] [PATCH 1/2] sunxi: Sync dts files with the upstream kernel

2016-03-15 Thread Hans de Goede

Hi,

On 15-03-16 10:29, Ian Campbell wrote:

On Mon, 2016-03-14 at 21:49 +0100, Hans de Goede wrote:

Sync dts files with the upstream kernel including
changes queued for 4.6:

https://git.kernel.org/cgit/linux/kernel/git/mripard/linux.git/commit/?h=sunxi/dt-for-4.6

Note this adds a number of new unused board dts files. I've asked the
authors of the kernel commits adding these to submit a matching defconfig
to u-boot.

Signed-off-by: Hans de Goede 


Both patches here: Acked-by: Ian Campbell 


Thanks.


Do you have a script or something which (semi-)automates these imports,
or is it manual faff each time?


Manual, it is not that much work, just cp the files over since we are
using pristine kernel files with no u-boot specific mods.

Then git add all of them, and do a commit, in the commit msg editor
look at the list of "new file"'s, add those to the Makefile and then
commit the Makefile as a fixup.

Starting with this sync I also lookup the first kernel commit of any
new dts files (not dtsi files only dts files) and then send a mail
to the committer asking them to submit a matching u-boot defconfig.

Regards,

Hans

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


[U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure

2016-03-15 Thread Peng Fan
We can use phys_addr_to for esdhc_base to discard
the #ifdef.

Signed-off-by: Peng Fan 
Cc: York Sun 
Cc: Yangbo Lu 
Cc: Eric Nelson 
Cc: Fabio Estevam 
Cc: Pantelis Antoniou 
Cc: Tom Rini 
---

V2:
 Split this patch from the V1 patch set.

 include/fsl_esdhc.h | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index 073048f..fa760a5 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -168,11 +168,7 @@
 #define ESDHC_VENDORSPEC_VSELECT 0x0002 /* Use 1.8V */
 
 struct fsl_esdhc_cfg {
-#ifdef CONFIG_FSL_LAYERSCAPE
-   u64 esdhc_base;
-#else
-   u32 esdhc_base;
-#endif
+   phys_addr_t esdhc_base;
u32 sdhc_clk;
u8  max_bus_width;
struct mmc_config cfg;
-- 
2.6.2

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


[U-Boot] [PATCH v2 1/2] flash: add device ID for Microchip PIC32 internal flash.

2016-03-15 Thread Purna Chandra Mandal
Microchip PIC32 has internal parallel flash (non-CFI compliant).
These flash devices do not support any identifier command so no
standard IDs. Added unique IDs to seperate these flash devices
from others supported by U-Boot.

Signed-off-by: Purna Chandra Mandal 
---

Changes in v2: None

 include/flash.h | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/flash.h b/include/flash.h
index f53ace7..c9aacd5 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -400,6 +400,9 @@ extern flash_info_t *flash_get_info(ulong base);
 #define FLASH_STM800DT 0x00D7  /* STM M29W800DT (1M = 64K x 16, top)   
*/
 #define FLASH_STM800DB 0x005B  /* STM M29W800DB (1M = 64K x 16, 
bottom)*/
 
+#define FLASH_MCHP100T 0x0060  /* MCHP internal (1M = 64K x 16) */
+#define FLASH_MCHP100B 0x0061  /* MCHP internal (1M = 64K x 16) */
+
 #define FLASH_28F400_T 0x0062  /* MT  28F400B3 ID (  4M = 256K x 16 )  
*/
 #define FLASH_28F400_B 0x0063  /* MT  28F400B3 ID (  4M = 256K x 16 )  
*/
 
@@ -486,7 +489,7 @@ extern flash_info_t *flash_get_info(ulong base);
 #define FLASH_MAN_SHARP 0x0050
 #define FLASH_MAN_ATM  0x0060
 #define FLASH_MAN_CFI  0x0100
-
+#define FLASH_MAN_MCHP 0x0200  /* Microchip Technology */
 
 #define FLASH_TYPEMASK 0x  /* extract FLASH type   information 
*/
 #define FLASH_VENDMASK 0x  /* extract FLASH vendor information 
*/
-- 
1.8.3.1

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


[U-Boot] [PATCH v2 2/2] drivers: mtd: add Microchip PIC32 internal non-CFI flash driver.

2016-03-15 Thread Purna Chandra Mandal
PIC32 internal flash devices are parallel NOR flash divided into
number of banks to allow erase-programming in one while fetch and
execution continues on other. As the flash banks are memory mapped
stored code can be executed directly from flash (XIP), also there
is additional hardware logic to prefetch and cache contents to
improve execution performance. These flash can also be used to
store user data (like environment).
Flash erase and programming are handled by on-chip NVM controller.

Signed-off-by: Purna Chandra Mandal 

---

Changes in v2:
- kconfig: add CONFIG_FLASH_PIC32 dependent on MACH_PIC32
- fix single/multi-line comment style
- simplify byte-stream-to-word in little-endian format
- replace virt_to_phys() with CPHYSADDR()
- separate flash ID definition in different patch

 drivers/mtd/Kconfig   |   7 +
 drivers/mtd/Makefile  |   1 +
 drivers/mtd/pic32_flash.c | 380 ++
 3 files changed, 388 insertions(+)
 create mode 100644 drivers/mtd/pic32_flash.c

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index c58841e..5ed860d 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -30,6 +30,13 @@ config ALTERA_QSPI
 
 endmenu
 
+config FLASH_PIC32
+   bool "Microchip PIC32 Flash driver"
+   depends on MACH_PIC32
+   help
+ This enables access to Microchip PIC32 internal non-CFI flash
+ chips through PIC32 Non-Volatile-Memory Controller.
+
 source "drivers/mtd/nand/Kconfig"
 
 source "drivers/mtd/spi/Kconfig"
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 7f018a4..9380085 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -19,4 +19,5 @@ obj-$(CONFIG_HAS_DATAFLASH) += dataflash.o
 obj-$(CONFIG_FTSMC020) += ftsmc020.o
 obj-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
 obj-$(CONFIG_MW_EEPROM) += mw_eeprom.o
+obj-$(CONFIG_FLASH_PIC32) += pic32_flash.o
 obj-$(CONFIG_ST_SMI) += st_smi.o
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
new file mode 100644
index 000..59555ca
--- /dev/null
+++ b/drivers/mtd/pic32_flash.c
@@ -0,0 +1,380 @@
+/*
+ * Copyright (C) 2015
+ * Cristian Birsan 
+ * Purna Chandra Mandal 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+/* NVM Controller registers */
+struct pic32_reg_nvm {
+   struct pic32_reg_atomic ctrl;
+   struct pic32_reg_atomic key;
+   struct pic32_reg_atomic addr;
+   struct pic32_reg_atomic data;
+};
+
+/* NVM operations */
+#define NVMOP_NOP  0
+#define NVMOP_WORD_WRITE   1
+#define NVMOP_PAGE_ERASE   4
+
+/* NVM control bits */
+#define NVM_WR BIT(15)
+#define NVM_WREN   BIT(14)
+#define NVM_WRERR  BIT(13)
+#define NVM_LVDERR BIT(12)
+
+/* NVM programming unlock register */
+#define LOCK_KEY   0x0
+#define UNLOCK_KEY10xaa996655
+#define UNLOCK_KEY20x556699aa
+
+/*
+ * PIC32 flash banks consist of number of pages, each page
+ * into number of rows and rows into number of words.
+ * Here we will maintain page information instead of sector.
+ */
+flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
+static struct pic32_reg_nvm *nvm_regs_p;
+
+static inline void flash_initiate_operation(u32 nvmop)
+{
+   /* set operation */
+   writel(nvmop, &nvm_regs_p->ctrl.raw);
+
+   /* enable flash write */
+   writel(NVM_WREN, &nvm_regs_p->ctrl.set);
+
+   /* unlock sequence */
+   writel(LOCK_KEY, &nvm_regs_p->key.raw);
+   writel(UNLOCK_KEY1, &nvm_regs_p->key.raw);
+   writel(UNLOCK_KEY2, &nvm_regs_p->key.raw);
+
+   /* initiate operation */
+   writel(NVM_WR, &nvm_regs_p->ctrl.set);
+}
+
+static int flash_wait_till_busy(const char *func, ulong timeout)
+{
+   int ret = wait_for_bit(__func__, &nvm_regs_p->ctrl.raw,
+  NVM_WR, false, timeout, false);
+
+   return ret ? ERR_TIMOUT : ERR_OK;
+}
+
+static inline int flash_complete_operation(void)
+{
+   u32 tmp;
+
+   tmp = readl(&nvm_regs_p->ctrl.raw);
+   if (tmp & NVM_WRERR) {
+   printf("Error in Block Erase - Lock Bit may be set!\n");
+   flash_initiate_operation(NVMOP_NOP);
+   return ERR_PROTECTED;
+   }
+
+   if (tmp & NVM_LVDERR) {
+   printf("Error in Block Erase - low-vol detected!\n");
+   flash_initiate_operation(NVMOP_NOP);
+   return ERR_NOT_ERASED;
+   }
+
+   /* disable flash write or erase operation */
+   writel(NVM_WREN, &nvm_regs_p->ctrl.clr);
+
+   return ERR_OK;
+}
+
+/*
+ * Erase flash sectors, returns:
+ * ERR_OK - OK
+ * ERR_INVAL - invalid sector arguments
+ * ERR_TIMOUT - write timeout
+ * ERR_NOT_ERASED - Flash not erased
+ * ERR_UNKNOWN_FLASH_VENDOR - incorrect flash
+ */
+int flash_erase(flash_info_t *info, int s_first, int s_last)
+{
+   ulong sect_start, sect_end, flags;
+   int prot, sect;
+ 

[U-Boot] [PATCH V2] fsl: esdhc: support driver model

2016-03-15 Thread Peng Fan
Support Driver Model for fsl esdhc driver.

1. Introduce a new structure struct fsl_esdhc_priv
2. Refactor fsl_esdhc_initialize which is originally used by board code.
   - Introduce fsl_esdhc_init to be common usage for DM and non-DM
   - Introduce fsl_esdhc_cfg_to_priv to build the bridge for non-DM part.
   - The original API for board code is still there, but we use
 'fsl_esdhc_cfg_to_priv' and 'fsl_esdhc_init' to serve it.
3. All the functions are changed to use 'struct fsl_esdhc_priv', except
   fsl_esdhc_initialize.
4. Since clk driver is not implemented, use mxc_get_clock to geth
   the clk and fill 'priv->sdhc_clk'.

Has been tested on i.MX6UL 14X14 EVK board:
"
=>dm tree

 simple_bus  [ + ]|   `-- aips-bus@0210
  mmc[ + ]|   |-- usdhc@0219
  mmc[ + ]|   |-- usdhc@02194000

=> mmc list
FSL_SDHC: 0 (SD)
FSL_SDHC: 1 (SD)
"

Signed-off-by: Peng Fan 
Cc: York Sun 
Cc: Yangbo Lu 
Cc: Hector Palacios 
Cc: Eric Nelson 
Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Pantelis Antoniou 
Cc: Simon Glass 
---

V2:
 restructure the V1 patch.
 Introduce fsl_esdhc_priv structure.
 Introduce code to handle cd-gpios and non-removable.

 drivers/mmc/fsl_esdhc.c | 253 
 1 file changed, 213 insertions(+), 40 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index ea5f4bf..6fadde1 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -20,6 +20,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -72,6 +75,30 @@ struct fsl_esdhc {
uintscr;/* eSDHC control register */
 };
 
+/**
+ * struct fsl_esdhc_priv
+ *
+ * @esdhc_base: base address of the sdhc controller
+ * @sdhc_clk: Current clk of the sdhc controller
+ * @bus_width: bus width, 1bit, 4bit or 8bit
+ * @cfg: mmc config
+ * @mmc: mmc
+ * Following is used when Driver Model is enabled for MMC
+ * @dev: pointer for the device
+ * @non_removable: 0: removable; 1: non-removable
+ * @cd_gpio: gpio for card detection
+ */
+struct fsl_esdhc_priv {
+   phys_addr_t esdhc_base;
+   unsigned int sdhc_clk;
+   unsigned int bus_width;
+   struct mmc_config cfg;
+   struct mmc *mmc;
+   struct udevice *dev;
+   int non_removable;
+   struct gpio_desc cd_gpio;
+};
+
 /* Return the XFERTYP flags for a given command and data packet */
 static uint esdhc_xfertyp(struct mmc_cmd *cmd, struct mmc_data *data)
 {
@@ -118,8 +145,8 @@ static uint esdhc_xfertyp(struct mmc_cmd *cmd, struct 
mmc_data *data)
 static void
 esdhc_pio_read_write(struct mmc *mmc, struct mmc_data *data)
 {
-   struct fsl_esdhc_cfg *cfg = mmc->priv;
-   struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
+   struct fsl_esdhc_priv *priv = mmc->priv;
+   struct fsl_esdhc *regs = (struct fsl_esdhc *)priv->esdhc_base;
uint blocks;
char *buffer;
uint databuf;
@@ -180,8 +207,8 @@ esdhc_pio_read_write(struct mmc *mmc, struct mmc_data *data)
 static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
 {
int timeout;
-   struct fsl_esdhc_cfg *cfg = mmc->priv;
-   struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
+   struct fsl_esdhc_priv *priv = mmc->priv;
+   struct fsl_esdhc *regs = (struct fsl_esdhc *)priv->esdhc_base;
 #ifdef CONFIG_FSL_LAYERSCAPE
dma_addr_t addr;
 #endif
@@ -312,8 +339,8 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct 
mmc_data *data)
int err = 0;
uintxfertyp;
uintirqstat;
-   struct fsl_esdhc_cfg *cfg = mmc->priv;
-   volatile struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
+   struct fsl_esdhc_priv *priv = mmc->priv;
+   struct fsl_esdhc *regs = (struct fsl_esdhc *)priv->esdhc_base;
 
 #ifdef CONFIG_SYS_FSL_ERRATUM_ESDHC111
if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
@@ -482,9 +509,9 @@ out:
 static void set_sysctl(struct mmc *mmc, uint clock)
 {
int div, pre_div;
-   struct fsl_esdhc_cfg *cfg = mmc->priv;
-   volatile struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
-   int sdhc_clk = cfg->sdhc_clk;
+   struct fsl_esdhc_priv *priv = mmc->priv;
+   struct fsl_esdhc *regs = (struct fsl_esdhc *)priv->esdhc_base;
+   int sdhc_clk = priv->sdhc_clk;
uint clk;
 
if (clock < mmc->cfg->f_min)
@@ -527,8 +554,8 @@ static void set_sysctl(struct mmc *mmc, uint clock)
 #ifdef CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK
 static void esdhc_clock_control(struct mmc *mmc, bool enable)
 {
-   struct fsl_esdhc_cfg *cfg = mmc->priv;
-   struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
+   struct fsl_esdhc_priv *priv = mmc->priv;
+   struct fsl_esdhc *regs = (struct fsl_esdhc *)priv->esdhc_base;
u32 value;
u32 time_out;
 
@@ -556,8 +583,8 @@ static void esdhc_clock_control(struct mmc *mmc, b

Re: [U-Boot] [PATCH v4 4/4] usb: Change power-on / scanning timeout handling

2016-03-15 Thread Hans de Goede

Hi,

Just noticed a few more things which need a minor
tweak, so looks like we're going to need a v5, sorry.

On 15-03-16 10:46, Stefan Roese wrote:

This patch changes the USB port scanning procedure and timeout
handling in the following ways:

a)
The power-on delay in usb_hub_power_on() is now reduced to a value of
max(100ms, "hub->desc.bPwrOn2PwrGood * 2"). The code does not wait
using mdelay, instead usb_hub_power_on() will wait before querying
the device in the scanning loop later. The total timeout for this
hub, which is 1 second + "hub->desc.bPwrOn2PwrGood * 2" is calculated
and will be used in the following per-port scanning loop as the timeout
to detect active USB devices on this hub.

b)
Don't delay the minimum delay (for power to stabilize) in
usb_hub_power_on(). Instead skip querying these devices in the scannig
loop until the delay time is reached.

c)
The ports are now scanned in a quasi parallel way. The current code did
wait for each (unconnected) port to reach its timeout and only then
continue with the next port. This patch now changes this to scan all
ports of all USB hubs quasi simultaneously. For this, all ports are added
to a scanning list. This list is scanned until all ports are ready
by either a) reaching the connection timeout (calculated earlier), or
by b) detecting a USB device. This results in a faster USB scan time as
the recursive scanning of USB hubs connected to the hub that's currently
being scanned will start earlier.

Without this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 20.163 seconds

With this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 1.822 seconds

So ~18.3 seconds of USB scanning time reduction.

Signed-off-by: Stefan Roese 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 

---

Changes in v4:
- Moved check for query_delay into usb_scan_port() as suggested by Hans
- Correct list handling (drop INIT_LIST_HEAD)
- Added some missing free() calls
- Changed connect_timeout calculation as suggested by Stephen
- Moved usb_scan_list to other globals to be cleaned up in a later patch
- Added timeout check for non-functional ports (usb_get_port_status
   return error
- Reverted if logic in loop to remove an indentation level
- Moved debug() output
- Removed unnecessary if when already connected
- Added Hans's Acked-by
- Added Stephen's Tested-by
- Minor rewording / fixes of the commit text

Changes in v3:
- Introduced scanning list containing all USB devices of one USB
   controller that need to get scanned
- Don't delay in usb_hub_power_on(). Instead skip querying these devices
   until the delay time is reached.

Changes in v2:
- Remove static USB port configuration patch (for now)

  common/usb_hub.c | 293 ++-
  include/usb.h|   3 +
  2 files changed, 204 insertions(+), 92 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index d621f50..e8cfc7e 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -30,6 +30,7 @@
  #include 
  #include 
  #include 
+#include 
  #include 
  #ifdef CONFIG_SANDBOX
  #include 
@@ -49,9 +50,17 @@ DECLARE_GLOBAL_DATA_PTR;
  #define HUB_SHORT_RESET_TIME  20
  #define HUB_LONG_RESET_TIME   200

+struct usb_device_scan {
+   struct usb_device *dev; /* USB hub device to scan */
+   struct usb_hub_device *hub; /* USB hub struct */
+   int port;   /* USB port to scan */
+   struct list_head list;
+};
+
  /* TODO(s...@chromium.org): Remove this when CONFIG_DM_USB is defined */
  static struct usb_hub_device hub_dev[USB_MAX_HUB];
  static int usb_hub_index;
+static LIST_HEAD(usb_scan_list);

  __weak void usb_hub_reset_devices(int port)
  {
@@ -120,7 +129,22 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
pgood_delay = max(pgood_delay,
  (unsigned)simple_strtol(env, NULL, 0));
debug("pgood_delay=%dms\n", pgood_delay);
-   mdelay(pgood_delay + 1000);
+
+   /*
+* Do a minimum delay of the larger value of 100ms or pgood_delay
+* so that the power can stablize before the devices are queried
+*/
+   dev->query_delay = get_timer(0) + max(100, (int)pgood_delay);
+
+   /*
+* Record the power-on timeout here. The max. delay (timeout)
+* will be done based on this value in the USB port loop in
+* usb_hub_configure() later.
+*/
+   dev->connect_timeout = dev->query_delay + 1000;
+   debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
+ dev->devnum, max(100, (int)pgood_delay),
+ max(100, (int)pgood_delay) + 1000);
  }

  void usb_hub_reset(void)
@@ -332,6 +356,157 @@ int usb_hub_port_connect_change(struct usb_device *dev, 
int port)
return ret;
  }

+static int usb_scan_port(struct usb_device_scan *usb_scan)
+{
+   ALLOC_CACHE_ALI

Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support

2016-03-15 Thread Jagan Teki
On 9 March 2016 at 13:37, Qianyu Gong  wrote:
> Hi Jagan,
>
>> -Original Message-
>> From: york sun
>> Sent: Tuesday, March 08, 2016 12:46 AM
>> To: Jagan Teki ; Huan Wang ;
>> Qianyu Gong 
>> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu ;
>> Stefan Roese ; Michal Simek ; Tom Rini
>> 
>> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
>>
>> On 03/03/2016 01:06 PM, york sun wrote:
>> > On 02/29/2016 04:26 AM, Jagan Teki wrote:
>> >> Hi York,
>> >>
>> >> On 27 February 2016 at 02:14, york sun  wrote:
>> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote:
>>
>> 
>>
>> 
>>  Can you pls- test the dataflash changes? use u-boot-spi/spi-nor
>> 
>> >>> Jagan,
>> >>>
>> >>> I am getting there. Will test sf probe/read/write and probably boot
>> >>> on selected platforms. Is there any specific platform/test in your mind?
>> >>
>> >> Yes, these tests OK. and if possible please verify 'sf protect' as well.
>> >>
>> >
>> > Jagan,
>> >
>> > Sorry for the delay. I am having issue with both ls1021aqds and
>> > ls1043aqds. Need to work with internal team to sort it out.
>> >
>> > My understanding the tests you need are for spi-nor, in my case,
>> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only
>> > have ls1021aqds and ls1043aqds with such support.
>> >
>>
>> Jagan,
>>
>> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some
>> issues. They will post their findings (and possible fix) to this thread.
>>
>> York
>
> I tested on LS1043AQDS board based on your spi-nor branch. The 
> 'spi_flash_probe'
> failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is not 
> defined
> for the board but it could be selected if CONFIG_MTD && CONFIG_DM_SPI, 
> correct?
>
> So after I moved CONFIG_MTD to the defconfig file, the probing could work now.
>
> And there is another small effect on our Fman driver. It would like to read 
> ucode blob
> from the QSPI flash. As the 'spi_flash_read' interface is changed, I've 
> modified the address
> value to an offset value in flash.

Qianyu,

> Here are my patches:
> http://patchwork.ozlabs.org/patch/594872/
> http://patchwork.ozlabs.org/patch/594873/
> http://patchwork.ozlabs.org/patch/594874/

I have applied 3rd patch on my test branch, and remaining two will go
in another time like once spi-nor got merged.

Qianyu/Alison Wang,

Please test this[1] branch for your new changes and let me know for any issues.

[1] 
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor-next

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


Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support

2016-03-15 Thread Jagan Teki
Hi Mugunthan,

On 15 March 2016 at 16:48, Jagan Teki  wrote:
> On 9 March 2016 at 13:37, Qianyu Gong  wrote:
>> Hi Jagan,
>>
>>> -Original Message-
>>> From: york sun
>>> Sent: Tuesday, March 08, 2016 12:46 AM
>>> To: Jagan Teki ; Huan Wang ;
>>> Qianyu Gong 
>>> Cc: u-boot@lists.denx.de; Siva Durga Prasad Paladugu ;
>>> Stefan Roese ; Michal Simek ; Tom 
>>> Rini
>>> 
>>> Subject: Re: [U-Boot] [PATCH v6 00/76] mtd: Add SPI-NOR core support
>>>
>>> On 03/03/2016 01:06 PM, york sun wrote:
>>> > On 02/29/2016 04:26 AM, Jagan Teki wrote:
>>> >> Hi York,
>>> >>
>>> >> On 27 February 2016 at 02:14, york sun  wrote:
>>> >>> On 02/22/2016 10:18 AM, Jagan Teki wrote:
>>>
>>> 
>>>
>>> 
>>>  Can you pls- test the dataflash changes? use u-boot-spi/spi-nor
>>> 
>>> >>> Jagan,
>>> >>>
>>> >>> I am getting there. Will test sf probe/read/write and probably boot
>>> >>> on selected platforms. Is there any specific platform/test in your mind?
>>> >>
>>> >> Yes, these tests OK. and if possible please verify 'sf protect' as well.
>>> >>
>>> >
>>> > Jagan,
>>> >
>>> > Sorry for the delay. I am having issue with both ls1021aqds and
>>> > ls1043aqds. Need to work with internal team to sort it out.
>>> >
>>> > My understanding the tests you need are for spi-nor, in my case,
>>> > fsl-qspi, right? This is not for fsl-dspi or fsl-espi driver. I only
>>> > have ls1021aqds and ls1043aqds with such support.
>>> >
>>>
>>> Jagan,
>>>
>>> Alison and Qianyu have tested on LS1021AQDS and LS1043AQDS. There were some
>>> issues. They will post their findings (and possible fix) to this thread.
>>>
>>> York
>>
>> I tested on LS1043AQDS board based on your spi-nor branch. The 
>> 'spi_flash_probe'
>> failed during QSPI boot. Then I found that CONFIG_DM_MTD_SPI_NOR is not 
>> defined
>> for the board but it could be selected if CONFIG_MTD && CONFIG_DM_SPI, 
>> correct?
>>
>> So after I moved CONFIG_MTD to the defconfig file, the probing could work 
>> now.
>>
>> And there is another small effect on our Fman driver. It would like to read 
>> ucode blob
>> from the QSPI flash. As the 'spi_flash_read' interface is changed, I've 
>> modified the address
>> value to an offset value in flash.
>
> Qianyu,
>
>> Here are my patches:
>> http://patchwork.ozlabs.org/patch/594872/
>> http://patchwork.ozlabs.org/patch/594873/
>> http://patchwork.ozlabs.org/patch/594874/
>
> I have applied 3rd patch on my test branch, and remaining two will go
> in another time like once spi-nor got merged.
>
> Qianyu/Alison Wang,
>
> Please test this[1] branch for your new changes and let me know for any 
> issues.
>

Please test this [1] branch on your hardware, dra72/74 look some build
issues, please fix accordingly.

[1] 
http://git.denx.de/?p=u-boot/u-boot-spi.git;a=shortlog;h=refs/heads/spi-nor-next


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


Re: [U-Boot] [PATCH v4 4/4] usb: Change power-on / scanning timeout handling

2016-03-15 Thread Stefan Roese

Hi Hans,

On 15.03.2016 11:44, Hans de Goede wrote:

Just noticed a few more things which need a minor
tweak, so looks like we're going to need a v5, sorry.

On 15-03-16 10:46, Stefan Roese wrote:

This patch changes the USB port scanning procedure and timeout
handling in the following ways:

a)
The power-on delay in usb_hub_power_on() is now reduced to a value of
max(100ms, "hub->desc.bPwrOn2PwrGood * 2"). The code does not wait
using mdelay, instead usb_hub_power_on() will wait before querying
the device in the scanning loop later. The total timeout for this
hub, which is 1 second + "hub->desc.bPwrOn2PwrGood * 2" is calculated
and will be used in the following per-port scanning loop as the timeout
to detect active USB devices on this hub.

b)
Don't delay the minimum delay (for power to stabilize) in
usb_hub_power_on(). Instead skip querying these devices in the scannig
loop until the delay time is reached.

c)
The ports are now scanned in a quasi parallel way. The current code did
wait for each (unconnected) port to reach its timeout and only then
continue with the next port. This patch now changes this to scan all
ports of all USB hubs quasi simultaneously. For this, all ports are added
to a scanning list. This list is scanned until all ports are ready
by either a) reaching the connection timeout (calculated earlier), or
by b) detecting a USB device. This results in a faster USB scan time as
the recursive scanning of USB hubs connected to the hub that's currently
being scanned will start earlier.

Without this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 20.163 seconds

With this patch:
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 9 USB Device(s) found

time: 1.822 seconds

So ~18.3 seconds of USB scanning time reduction.

Signed-off-by: Stefan Roese 
Acked-by: Hans de Goede 
Tested-by: Stephen Warren 

---

Changes in v4:
- Moved check for query_delay into usb_scan_port() as suggested by Hans
- Correct list handling (drop INIT_LIST_HEAD)
- Added some missing free() calls
- Changed connect_timeout calculation as suggested by Stephen
- Moved usb_scan_list to other globals to be cleaned up in a later patch
- Added timeout check for non-functional ports (usb_get_port_status
   return error
- Reverted if logic in loop to remove an indentation level
- Moved debug() output
- Removed unnecessary if when already connected
- Added Hans's Acked-by
- Added Stephen's Tested-by
- Minor rewording / fixes of the commit text

Changes in v3:
- Introduced scanning list containing all USB devices of one USB
   controller that need to get scanned
- Don't delay in usb_hub_power_on(). Instead skip querying these devices
   until the delay time is reached.

Changes in v2:
- Remove static USB port configuration patch (for now)

  common/usb_hub.c | 293
++-
  include/usb.h|   3 +
  2 files changed, 204 insertions(+), 92 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index d621f50..e8cfc7e 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -30,6 +30,7 @@
  #include 
  #include 
  #include 
+#include 
  #include 
  #ifdef CONFIG_SANDBOX
  #include 
@@ -49,9 +50,17 @@ DECLARE_GLOBAL_DATA_PTR;
  #define HUB_SHORT_RESET_TIME20
  #define HUB_LONG_RESET_TIME200

+struct usb_device_scan {
+struct usb_device *dev;/* USB hub device to scan */
+struct usb_hub_device *hub;/* USB hub struct */
+int port;/* USB port to scan */
+struct list_head list;
+};
+
  /* TODO(s...@chromium.org): Remove this when CONFIG_DM_USB is defined */
  static struct usb_hub_device hub_dev[USB_MAX_HUB];
  static int usb_hub_index;
+static LIST_HEAD(usb_scan_list);

  __weak void usb_hub_reset_devices(int port)
  {
@@ -120,7 +129,22 @@ static void usb_hub_power_on(struct
usb_hub_device *hub)
  pgood_delay = max(pgood_delay,
(unsigned)simple_strtol(env, NULL, 0));
  debug("pgood_delay=%dms\n", pgood_delay);
-mdelay(pgood_delay + 1000);
+
+/*
+ * Do a minimum delay of the larger value of 100ms or pgood_delay
+ * so that the power can stablize before the devices are queried
+ */
+dev->query_delay = get_timer(0) + max(100, (int)pgood_delay);
+
+/*
+ * Record the power-on timeout here. The max. delay (timeout)
+ * will be done based on this value in the USB port loop in
+ * usb_hub_configure() later.
+ */
+dev->connect_timeout = dev->query_delay + 1000;
+debug("devnum=%d poweron: query_delay=%d connect_timeout=%d\n",
+  dev->devnum, max(100, (int)pgood_delay),
+  max(100, (int)pgood_delay) + 1000);
  }

  void usb_hub_reset(void)
@@ -332,6 +356,157 @@ int usb_hub_port_connect_change(struct
usb_device *dev, int port)
  return ret;
  }

+static int usb_scan_port(struct usb_device_scan *usb_scan)
+{
+ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 

Re: [U-Boot] [PATCH v6 2/3] spi: omap3: Make local functions as static

2016-03-15 Thread Tom Rini
On Mon, Mar 14, 2016 at 10:58:00PM +0530, Jagan Teki wrote:

> Attach static on local defined functions.
> 
> Cc: Tom Rini 
> Cc: Simon Glass 
> Signed-off-by: Jagan Teki 
> Signed-off-by: Christophe Ricard 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH 1/4] omap3: String-based reboot mode handling

2016-03-15 Thread Tom Rini
On Sat, Feb 27, 2016 at 07:26:41PM +0100, Paul Kocialkowski wrote:

> This switches reboot mode handling to a string-based interface, that allows 
> more
> flexibility to set a common interface with the next generations of OMAP 
> devices.
> 
> Signed-off-by: Paul Kocialkowski 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH 3/4] sniper: Get rid of reset_misc

2016-03-15 Thread Tom Rini
On Sat, Feb 27, 2016 at 07:26:43PM +0100, Paul Kocialkowski wrote:

> There is no need to set the reboot mode to a particular value prior to reboot,
> since valid values will have been caught and cleared earlier.
> 
> In addition, this breaks the reboot-bootloader fastboot call, by overriding 
> the
> required value for fastboot.
> 
> Signed-off-by: Paul Kocialkowski 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH 2/4] omap3: Use a define for reboot reason offset

2016-03-15 Thread Tom Rini
On Sat, Feb 27, 2016 at 07:26:42PM +0100, Paul Kocialkowski wrote:

> This introduces a define for the offset to the reboot reason, rather than
> hardcoding it.
> 
> Signed-off-by: Paul Kocialkowski 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH v6 3/3] spi: omap3: Convert to driver model

2016-03-15 Thread Tom Rini
On Mon, Mar 14, 2016 at 10:58:01PM +0530, Jagan Teki wrote:

> After this conversion the driver will able to support both dm and non-dm
> and code is more extensible like we can remove the non-dm part simply
> without touching anycode if all the boards which are using this driver
> become dm driven.
> 
> Cc: Tom Rini 
> Reviewed-by: Simon Glass 
> Acked-by: Christophe Ricard 
> Tested-by: Christophe Ricard 
> Signed-off-by: Jagan Teki 
> [Set priv->wordlen, Add Kconfig entry and file credit for dm conversion]
> Signed-off-by: Christophe Ricard 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH v6 1/3] spi: omap3: Move headers code inside the driver

2016-03-15 Thread Tom Rini
On Mon, Mar 14, 2016 at 10:57:59PM +0530, Jagan Teki wrote:

> Header file have macro's and register definition and some unneeded
> function proto types which becomes tunned further in future patches
> and entire driver code resides in one file for more readability.
> 
> Cc: Tom Rini 
> Cc: Simon Glass 
> Signed-off-by: Jagan Teki 
> [Fixes on code styles, Remove omap3_spi_txrx|write|read in header]
> Signed-off-by: Christophe Ricard 

Reviewed-by: Tom Rini 

-- 
Tom


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


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

2016-03-15 Thread Tom Rini
On Mon, Mar 14, 2016 at 10:37:11PM +, Luka Perkov wrote:

> Hi Tom,
> 
> please pull these missed patches from Peter for which I should have sent
> pull request a while back.
> 
> The following changes since commit df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa:
> 
>   Prepare v2016.03 (2016-03-14 10:20:21 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-marvell.git 
> 
> for you to fetch changes up to a807369eded75b34f5184552dab00ff73e7ca3bc:
> 
>   ARM: sheevaplug: drop unneded 'usb start' from boot command (2016-03-14 
> 23:29:36 +0100)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 01/27] mkimage: Move argument processing into its own function

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:33PM -0700, Simon Glass wrote:

> At present main() is very long. Split out the argument processing to make
> it easier to follow.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] common: Add support for environment file in EXT4.

2016-03-15 Thread Tom Rini
On Tue, Feb 23, 2016 at 03:51:26PM +1000, Stuart Longland wrote:

> From: Stuart Longland 
> 
> This is an enhancement that permits storing the environment file on an
> EXT4 partition such as the root filesystem.  It is based on the existing
> FAT environment file code.

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-03-15 Thread Tom Rini
On Mon, Mar 14, 2016 at 05:04:34PM -0600, Simon Glass wrote:

> Hi Tom,
> 
> This includes driver-model support for block devices, refactoring of the
> partition code as well as some some fixes for serial, the debug UART,
> buildman and fdtgrep.
> 
> The following changes since commit df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa:
> 
>   Prepare v2016.03 (2016-03-14 10:20:21 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-dm.git
> 
> for you to fetch changes up to 608e399fdef82e983db44c5cb8f5e772bba870e2:
> 
>   buildman: Allow the toolchain architecture to be specified (2016-03-14
> 15:34:50 -0600)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 4/4] sniper: Clear reboot mode garbage on cold reset

2016-03-15 Thread Tom Rini
On Sat, Feb 27, 2016 at 07:26:44PM +0100, Paul Kocialkowski wrote:

> Reboot mode garbage is found on cold reset and might be seen as valid on the
> next warm reset, thus it has to be cleared on cold reset.
> 
> Signed-off-by: Paul Kocialkowski 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,02/27] mkimage: Convert to use getopt()

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:34PM -0700, Simon Glass wrote:

> The current way of parsing arguments is a bit clumsy. It seems better to
> use getopt() which is commonly used for this purpose.
> 
> Convert the code to use getopt() and make a few minor adjustments as needed.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 03/27] mkimage: Sort the option processing code by option

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:35PM -0700, Simon Glass wrote:

> Adjust the code so that option alphabetical order matches the order in the
> switch() statement. This makes it easier to find options.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,04/27] mkimage: Move usage() up to the top

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:36PM -0700, Simon Glass wrote:

> To avoid a forward declaration, move the usage() function higher in the
> file.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,06/27] mkimage: Make 'params' static

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:38PM -0700, Simon Glass wrote:

> This is not used outside mkimage.c, so make this variable static.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 05/27] mkimage: Show an error message when usage() is called

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:37PM -0700, Simon Glass wrote:

> Sometimes incorrect arguments are supplied but the reason is not obvious to
> the user. Add some helpful messages.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,10/27] Move CONFIG_OF_LIBFDT to Kconfig

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:42PM -0700, Simon Glass wrote:

> Move this option to Kconfig and tidy up existing boards.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 07/27] libfdt: Add a function to write a property placeholder

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:39PM -0700, Simon Glass wrote:

> The existing function to add a new property to a tree being built requires
> that the entire contents of the new property be passed in. For some
> applications it is more convenient to be able to add the property contents
> later, perhaps by reading from a file. This avoids double-buffering of the
> contents.
> 
> Add a new function to support this and adust the existing fdt_property() to
> use it.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,08/27] Correct defconfig ordering

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:40PM -0700, Simon Glass wrote:

> Various boards have the wrong Kconfig ordering now. To avoid a misleading
> 
> diff in the next patch, reorder the configuration correctly.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 09/27] freescale: Remove CONFIG_DM from header files

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:41PM -0700, Simon Glass wrote:

> Kconfig options must defined in the defconfig files. Since RSA_SOFTWARE_EXP
> relies on CONFIG_DM, unless it is set in kconfig we cannot enable RSA.
> Remove the hacks which enable CONFIG_DM in header files and update the
> defconfig.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,13/27] fdt: Allow libfdt to be used in SPL

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:45PM -0700, Simon Glass wrote:

> Add an option to enable libfdt in SPL. This can be useful when decoding
> FIT files in SPL.
> 
> We need to make sure this option is not enabled in SPL by this change.
> Also this option needs to be enabled in host builds. Si add a new
> IMAGE_USE_LIBFDT #define which can be used in files that are built on the
> host but must also build for U-Boot and SPL.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 12/27] fdt: Adjust DEFAULT_DEVICE_TREE to device on OF_CONTROL

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:44PM -0700, Simon Glass wrote:

> This option has no meaning without OF_CONTROL, so add a dependency.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 11/27] Kconfig: Move CONFIG_FIT and related options to Kconfig

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:43PM -0700, Simon Glass wrote:

> There are already two FIT options in Kconfig but the CONFIG options are
> still in the header files. We need to do a proper move to fix this.
> 
> Move these options to Kconfig and tidy up board configuration:
> 
>CONFIG_FIT
>CONFIG_OF_BOARD_SETUP
>CONFIG_OF_SYSTEM_SETUP
>CONFIG_FIT_SIGNATURE
>CONFIG_FIT_BEST_MATCH
>CONFIG_FIT_VERBOSE
>CONFIG_OF_STDOUT_VIA_ALIAS
>CONFIG_RSA
> 
> Unfortunately the first one is a little complicated. We need to make sure
> this option is not enabled in SPL by this change. Also this option is
> enabled automatically in the host builds by defining CONFIG_FIT in the
> image.h file. To solve this, add a new IMAGE_USE_FIT #define which can
> be used in files that are built on the host but must also build for U-Boot
> and SPL.
> 
> Note: Masahiro's moveconfig.py script is amazing.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 14/27] sunxi: Display the board model on start-up

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:46PM -0700, Simon Glass wrote:

> It is useful to know which sunxi board you are booting. Display this on
> start-up to avoid confusion.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 16/27] mkimage: Allow a FIT to include an image of any type

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:48PM -0700, Simon Glass wrote:

> At present FIT images are set up by providing a device tree source file
> which is a file with a .its extension. We want to support automatically
> creating this file based on the image supplied to mkimage. This means that
> even though the final file type is always IH_TYPE_FLATDT, the image inside
> may be something else.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 15/27] tools: Include fdt_sw.o in libfdt for mkimage

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:47PM -0700, Simon Glass wrote:

> At present this file is omitted. It is used to build up a binary device
> tree. We plan to do this in mkimage, so include this file in the build.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 17/27] tools: Add a function to obtain the size of a file

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:49PM -0700, Simon Glass wrote:

> This will be used in mkimage when working out the required size of the FIT
> based on the files to be placed into it.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 18/27] image: Add functions to obtain short names

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:50PM -0700, Simon Glass wrote:

> Sometimes it is useful to obtain the short name for an Operating System,
> architecture or compression mechanism. Provide functions for this.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 20/27] mkimage: Support adding device tree files to a FIT

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:52PM -0700, Simon Glass wrote:

> To make the auto-FIT feature useful we need to be able to provide a list of
> device tree files on the command line for mkimage to add into the FIT. Add
> support for this feature.
> 
> So far there is no support for hashing or verified boot using this method.
> For those cases, a .its file must still be provided.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 19/27] mkimage: Support automatic creating of a FIT without a .its

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:51PM -0700, Simon Glass wrote:

> At present, when generating a FIT, mkimage requires a .its file containing
> the structure of the FIT and referring to the images to be included.
> 
> Creating the .its file is a separate step that makes it harder to use FIT.
> This is not required for creating legacy images.
> 
> Often the FIT is pretty standard, consisting of an OS image, some device
> tree files and a single configuration. We can handle this case automatically
> and avoid needing a .its file at all.
> 
> To start with, support automatically generate the FIT using a new '-f auto'
> option. Initially this only supports adding a single image (e.g. a linux
> kernel) and a single configuration.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 21/27] mkimage: Support placing data outside the FIT

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:53PM -0700, Simon Glass wrote:

> One limitation of FIT is that all the data is 'inline' within it, using a
> 'data' property in each image node. This means that to find out what is in
> the FIT it is necessary to scan the entire file. Once loaded it can be
> scanned and then the images can be copied to the correct place in memory.
> 
> In SPL it can take a significant amount of time to copy images around in
> memory. Also loading data that does not end up being used is wasteful. It
> would be useful if the FIT were small, acting as a directory, with the
> actual data stored elsewhere.
> 
> This allows SPL to load the entire FIT, without the images, then load the
> images it wants later.
> 
> Add a -E option to mkimage to request that it output an 'external' FIT.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 22/27] mkimage: Bring data into the FIT before processing

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:54PM -0700, Simon Glass wrote:

> Since we now support data outside the FIT image, bring it into the FIT image
> first before we do any processing. This avoids adding new functionality to
> the core FIT code for now.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,26/27] spl: Support loading a FIT from MMC

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:58PM -0700, Simon Glass wrote:

> Detect a FIT when loading from MMC and handle it using the new FIT SPL
> support.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 24/27] spl: Add an option to load a FIT containing U-Boot

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:56PM -0700, Simon Glass wrote:

> This provides a way to load a FIT containing U-Boot and a selection of device
> tree files. The board can select the correct device tree by probing the
> hardware. Then U-Boot is started with the selected device tree.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 25/27] spl: Add a way to specify a list of device trees to include

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:57PM -0700, Simon Glass wrote:

> When building a FIT, more than one device tree can be included. The board
> can select (at run-time) the one that it wants.
> 
> Add a Kconfig option to allow the list of devices trees (supported by the
> board) to be specified.
> 
> When using SPL_LOAD_FIT, build u-boot.img in FIT format instead of the
> legacy image format. Include all the listed device tree files in this FIT.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 23/27] spl: Add a way for boards to select which device tree to load

2016-03-15 Thread Tom Rini
On Mon, Feb 22, 2016 at 10:55:55PM -0700, Simon Glass wrote:

> SPL calls this function with each device tree it can find in the FIT. The
> board should implement this function, using whatever hardware detection it
> can muster to determine the correct device tree.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 1/7] ARM: OMAP4/5: Centralize early clock initialization

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:52PM -0600, Kipisz, Steven wrote:

> Early clock initialization is currently done in two stages for OMAP4/5
> SoCs. The first stage is the initialization of console clocks and
> then we initialize basic clocks for functionality necessary for SoC
> initialization and basic board functionality.
> 
> By splitting up prcm_init and centralizing this clock initialization,
> we setup the code for follow on patches that can do board specific
> initialization such as board detection which will depend on these
> basic clocks.
> 
> As part of this change, since the early clock initialization
> is centralized, we no longer need to expose the console clock
> initialization.
> 
> NOTE: we change the sequence slightly by initializing console clocks
> timer after the io settings are complete, but this is not expected
> to have any functioanlity impact since we setup the basic IO drive
> strength initialization as part of do_io_settings.
> 
> Signed-off-by: Steve Kipisz 
> Reviewed-by: Tom Rini 
> Reviewed-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 3/7] ARM: omap-common: Add standard access for board description EEPROM

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:54PM -0600, Kipisz, Steven wrote:

> From: Lokesh Vutla 
> 
> Several TI EVMs have EEPROM that can contain board description information
> such as revision, DDR definition, serial number, etc. In just about all
> cases, these EEPROM are on the I2C bus and provides us the opportunity
> to centralize the generic operations involved.
> 
> The on-board EEPROM on the BeagleBone Black, BeagleBone, AM335x EVM,
> AM43x GP EVM, AM57xx-evm, BeagleBoard-X15 share the same format.
> However, DRA-7* EVMs, OMAP4SDP use a modified format.
> 
> We hence introduce logic which is generic between these platforms
> without enforcing any specific format. This allows the boards to use the
> relevant format for operations that they might choose.
> 
> This module will compile for all TI SoC based boards when
> CONFIG_TI_I2C_BOARD_DETECT is enabled to have optimal build times for
> platforms that require this support.
> 
> It is important to note that this logic is fundamental to the board
> configuration process such as DDR configuration which is needed in
> SPL, hence cannot be part of the standard u-boot driver model (which
> is available later in the process). Hence, to aid efficiency, the
> eeprom contents are copied over to SRAM scratchpad memory area at the
> first invocation to retrieve data.
> 
> To prevent churn with cases such as DRA7, where eeprom format maybe
> incompatible, we introduce a generic common format in eeprom which
> is made available over accessor functions for usage.
> 
> Special handling for BBG1 EEPROM had to be introduced thanks to the
> weird eeprom rev contents used.
> 
> The follow on patches introduce the use of this library for AM335x,
> AM437x, and AM57xx.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Steve Kipisz 
> Signed-off-by: Roger Quadros 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,V5,2/7] ARM: OMAP4/5: Centralize gpi2c_init

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:53PM -0600, Kipisz, Steven wrote:

> Centralize gpi2c_init into omap_common from the sys_proto header so
> that the information can be reused across SoCs.
> 
> Signed-off-by: Steve Kipisz 
> Reviewed-by: Tom Rini 
> Reviewed-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 4/7] ti: AM335x: Use generic EEPROM detection logic

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:55PM -0600, Kipisz, Steven wrote:

> From: Nishanth Menon 
> 
> Use the generic EEPROM detection logic instead of duplicating the AM
> eeprom logic.
> 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Steven Kipisz 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 5/7] ti: AM437x: Use generic EEPROM detection logic

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:56PM -0600, Kipisz, Steven wrote:

> From: Nishanth Menon 
> 
> Now that we have a generic TI eeprom logic which can be reused across
> platforms, reuse the same.
> 
> This revision also includes fixes identified by Dave Gerlach
> 
> 
> Cc: Dave Gerlach 
> Signed-off-by: Nishanth Menon 
> Signed-off-by: Steven Kipisz 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 6/7] ARM: OMAP4/5: Add generic board detection hook

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:57PM -0600, Kipisz, Steven wrote:

> Many TI EVMs have capability to store relevant board information
> such as DDR description in EEPROM. Further many pad configuration
> variations can occur as part of revision changes in the platform.
> In-order to support these at runtime, we for a board detection hook
> which is available for override from board files that may desire to do
> so.
> 
> NOTE: All TI EVMs are capable of detecting board information based on
> early clocks that are configured. However, in case of additional needs
> this can be achieved within the override logic from within the board
> file.
> 
> Signed-off-by: Steve Kipisz 
> Reviewed-by: Tom Rini 
> Reviewed-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V5, 7/7] board: ti: AM57xx: Add detection logic for AM57xx-evm

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 12:30:58PM -0600, Kipisz, Steven wrote:

> Current AM57xx evm supports both BeagleBoard-X15
> (http://beagleboard.org/x15) and AM57xx EVM
> (http://www.ti.com/tool/tmdxevm5728).
> 
> The AM572x EValuation Module(EVM) provides an affordable platform to
> quickly start evaluation of Sitara. ARM Cortex-A15 AM57x Processors
> (AM5728, AM5726, AM5718, AM5716) and accelerate development for HMI,
> machine vision, networking, medical imaging and many other industrial
> applications. This EVM is based on the same BeagleBoard-X15 Chassis
> and adds mPCIe, mSATA, LCD, touchscreen, Camera, push button and TI's
> wlink8 offering.
> 
> Since the EEPROM contents are compatible between the BeagleBoard-X15 and
> the AM57xx-evm, we add support for the detection logic to enable
> support for various user programmable scripting capability.
> 
> NOTE: U-boot configuration is currently a superset of AM57xx evm and
> BeagleBoard-X15 and no additional configuration tweaking is needed.
> 
> This change also sets up the stage for future support of TI AM57xx EVMs
> to the same base bootloader build.
> 
> Signed-off-by: Steve Kipisz 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 1/6] ARM: keystone2: psc: redo doc in kernel-doc format

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:42PM -0600, Nishanth Menon wrote:

> u-boot coding style guidance in
> http://www.denx.de/wiki/U-Boot/CodingStyle clearly mentions that the
> kernel doc style shall be followed for documentation in u-boot.
> 
> Current PSC documentation standard does not, so fix that.
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ARM: keystone2: Get rid of unused clock files

2016-03-15 Thread Tom Rini
On Wed, Feb 24, 2016 at 05:48:43PM -0600, Nishanth Menon wrote:

> With commit fe772ebd285b ("ARM: keystone2: Use common definition for
> clk_get_rate"), we have centralized the clock code into a common clock
> logic and the redundant files, unfortunately remained... Clean that
> up.
> 
> Signed-off-by: Nishanth Menon 
> Acked-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 2/6] ARM: keystone2: psc-defs: use adequate () for macros

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:43PM -0600, Nishanth Menon wrote:

> '#define X a | b' is better defined as '#define X (a | b)' for obvious
> reasons.
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 3/6] ARM: keystone2: psc: introduce function to hold and release module in reset.

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:44PM -0600, Nishanth Menon wrote:

> These are useful for modules that need to be held in reset and are
> enabled for data to be loaded on to them. Typically these are
> microcontrollers or other processing entities in the system.
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,V2,5/6] ARM: dts: k2g: Add support for PMMC

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:46PM -0600, Nishanth Menon wrote:

> Enable support for PMMC the TI power processor on K2G. This processor
> manages all power management related activities on the SoC and and
> allows the Operating Systems on compute processors such as ARM, DSP to
> offload the power logic away into the power processor. U-boot just has a
> load responsibility, hence the view of the hardware from a bootloader
> perspective is different from the view of hardware from a Operating
> System perspective. While bootloader just loads up the firmware,
> Operating Systems look at the resultant system as "hardware".
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 4/6] remoteproc: Add support for TI power processor

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:45PM -0600, Nishanth Menon wrote:

> Many TI System on Chip (SoC) solutions do have a dedicated
> microcontroller for doing power management functionality. These include
> the AM335x, AM437x, Keystone K2G SoCs. The functionality provided by
> these microcontrollers and the communication mechanisms vary very
> widely. However, we are able to consolidate some basic functionality to
> be generic enough starting with K2G SoC family. Introduce a basic remote
> proc driver to support these microcontrollers. In fact, on SoCs starting
> with K2G, basic power management functions are primarily accessible for
> the High Level Operating Systems(HLOS) via these microcontroller solutions.
> 
> Hence, having these started at a bootloader level is pretty much
> mandatory.
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 6/6] configs: k2g_evm: Add TI power processor support

2016-03-15 Thread Tom Rini
On Thu, Feb 25, 2016 at 12:53:47PM -0600, Nishanth Menon wrote:

> Enable support for PMMC the TI power processor on K2G. This processor
> manages all power management related activities on the SoC and and
> allows the Operating Systems on compute processors such as ARM, DSP to
> offload the power logic away into the power processor.
> 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm: Add support for LEGO MINDSTORMS EV3

2016-03-15 Thread Tom Rini
On Fri, Feb 26, 2016 at 12:46:07AM -0600, David Lechner wrote:

> This is based on the davinci da850evm. It can boot from either the
> on-board 16MB flash or from a microSD card. It also reads board
> information from an I2C EEPROM.
> 
> The EV3 itself initally boots from write-protected EEPROM, so no
> u-boot SPL is needed.
> 
> Signed-off-by: David Lechner 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 1/2] common: image-fit: Use a common function to get address

2016-03-15 Thread Tom Rini
On Mon, Feb 29, 2016 at 03:48:40PM -0800, York Sun wrote:

> FIT image supports load address and entry address. Getting these
> addresses can use a common function.
> 
> Signed-off-by: York Sun 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 2/2] common: image-fit: Fix load and entry addresses in FIT image

2016-03-15 Thread Tom Rini
On Mon, Feb 29, 2016 at 03:48:41PM -0800, York Sun wrote:

> FIT image supports more than 32 bits in addresses by using #address-cell
> field. Fixing 64-bit support by using this field.
> 
> Signed-off-by: York Sun 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,1/3] lib/crc16.c: Coding-style cleanup

2016-03-15 Thread Tom Rini
On Thu, Mar 03, 2016 at 09:34:11AM +0100, Stefan Roese wrote:

> lib/crc16.c is changed to match the common U-Boot coding-style.
> 
> Signed-off-by: Stefan Roese 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 2/3] lib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start value

2016-03-15 Thread Tom Rini
On Thu, Mar 03, 2016 at 09:34:12AM +0100, Stefan Roese wrote:

> The original name of this function is unclear. This patch renames this
> CRC16 function to crc16_ccitt() matching its name with its
> implementation.
> 
> To make the usage of this function more flexible, lets add the CRC start
> value as parameter to this function. This way it can be used by other
> functions requiring different start values than 0 as well.
> 
> Signed-off-by: Stefan Roese 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 3/3] include/crc.h: Remove unreferenced cyg_xxx() prototypes

2016-03-15 Thread Tom Rini
On Thu, Mar 03, 2016 at 09:34:13AM +0100, Stefan Roese wrote:

> These cyg_ prototypes are not referenced anywhere in current mainline
> U-Boot. So lets remove them.
> 
> Signed-off-by: Stefan Roese 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 2/6] ARM: keystone2: K2G: power-off DSP during boot

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:39AM -0600, Nishanth Menon wrote:

> From: Suman Anna 
> 
> The DSPs are powered on by default upon a Power ON reset, and
> they are powered off on current Keystone 2 SoCs - K2HK, K2L, K2E
> during the boot in u-boot. This is not functional on K2G though.
> Extend the existing DSP power-off support to the only DSP present
> on K2G. Do note that the PSC clock domain module id for DSP on K2G
> differs from that of previous Keystone2 SoCs.
> 
> Signed-off-by: Suman Anna 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 3/6] ARM: keystone2: Allow for board specific speed definitions

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:40AM -0600, Nishanth Menon wrote:

> From: Lokesh Vutla 
> 
> Its not compulsory that speed definition should be same on EFUSE_BOOTROM
> register for all keystone 2 devices. So, allow for board specific
> speed definitions.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 4/6] ARM: keystone2: K2G: Add support for different arm/device speeds

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:41AM -0600, Nishanth Menon wrote:

> From: Lokesh Vutla 
> 
> The maximum device and arm speeds can be determined by reading
> EFUSE_BOOTROM register. As there is already a framework for reading this
> register, adding support for all possible speeds on k2g devices.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 1/6] ARM: keystone2: Use macro for DSP GEM power domain

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:38AM -0600, Nishanth Menon wrote:

> From: Suman Anna 
> 
> Define a macro for the DSP GEM power domain id number and
> use it instead of a hard-coded number in the code that
> disables all the DSPs on various Keystone2 SoCs.
> 
> Signed-off-by: Suman Anna 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 5/6] ARM: keystone2: use SPD info to configure K2HK and K2E DDR3

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:42AM -0600, Nishanth Menon wrote:

> From: Vitaly Andrianov 
> 
> This commit replaces hard-coded EMIF and PHY DDR3 configurations for
> predefined SODIMMs to a calculated configuration. The SODIMM parameters
> are read from SODIMM's SPD and used to calculated the configuration.
> 
> The current commit supports calculation for DDR3 with 1600MHz and 1333MHz
> only.
> 
> Signed-off-by: Vitaly Andrianov 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, V2, 6/6] ARM: keystone2: use detected ddr3a size

2016-03-15 Thread Tom Rini
On Fri, Mar 04, 2016 at 10:36:43AM -0600, Nishanth Menon wrote:

> From: Vitaly Andrianov 
> 
> Because KS2 u-boot works in 32 bit address space the existing ram_size
> global data field cannot be used. The maximum, which the get_ram_size()
> can detect is 2GB only. The ft_board_setup() needs the actual ddr3 size
> to fix up dtb.
> 
> This commit introduces the ddr3_get_size() which uses SPD data to
> calculate the ddr3 size. This function replaces the "ddr3_size"
> environment variable, which was used to get the SODIMM size.
> 
> For platforms, which don't have SODIMM with SPD and ddr3 is populated to
> a board a simple ddr3_get_size function that returns ddr3 size has to be
> implemented. See hardware-k2l.h
> 
> Signed-off-by: Vitaly Andrianov 
> Signed-off-by: Nishanth Menon 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] dm: omap_timer: Fix conversion of address to a pointer

2016-03-15 Thread Tom Rini
On Sat, Mar 05, 2016 at 04:40:32PM +0530, Lokesh Vutla wrote:

> OMAP timer driver directly typecasts fdt_addr_t to a pointer. This is
> not strictly correct, as it gives a build warning when fdt_addr_t is u64.
> So, use map_physmem for a proper typecasts.
> 
> This is inspired by commit 167efe01bc5a9 ("dm: ns16550: Use an address
> instead of a pointer for the uart base")
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/4] ARM: DRA7: emif: Fix updating of refresh ctrl shadow

2016-03-15 Thread Tom Rini
On Sat, Mar 05, 2016 at 05:32:28PM +0530, Lokesh Vutla wrote:

> On DRA7, refresh ctrl shadow should be updated with
> the final value.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 2/4] ARM: DRA7: emif: Fix DDR init sequence during warm reset

2016-03-15 Thread Tom Rini
On Sat, Mar 05, 2016 at 05:32:29PM +0530, Lokesh Vutla wrote:

> Commit (20fae0a - ARM: DRA7: DDR: Enable SR in Power Management Control)
> enables Self refresh mode by default and during warm reset the EMIF
> contents are preserved. After warm reset EMIF sees that it is idle and
> puts DDR in self-refresh. When in SR, leveling operations cannot be done
> as DDR can only accept SR exit command, so its hanging during warm reset.
> In order to fix this reset the power management control register before
> EMIF initialization if it is a warm reset.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 4/4] ARM: DRA7: emif: Enable interleaving for higher address space

2016-03-15 Thread Tom Rini
On Sat, Mar 05, 2016 at 05:32:31PM +0530, Lokesh Vutla wrote:

> Given that DRA7/OMAP5 SoCs can support more than 2GB of memory,
> enable interleaving for this higher memory to increase performance.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 3/4] ARM: DRA7: emif: Check for enable bits before updating leveling output

2016-03-15 Thread Tom Rini
On Sat, Mar 05, 2016 at 05:32:30PM +0530, Lokesh Vutla wrote:

> Read and write leveling can be enabled independently. Check for these
> enable bits before updating the read and write leveling output values.
> This will allow to use the combination of software and hardware leveling.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 2/2] drivers: mtd: add Microchip PIC32 internal non-CFI flash driver.

2016-03-15 Thread Daniel Schwierzeck
2016-03-15 11:16 GMT+01:00 Purna Chandra Mandal :
> PIC32 internal flash devices are parallel NOR flash divided into
> number of banks to allow erase-programming in one while fetch and
> execution continues on other. As the flash banks are memory mapped
> stored code can be executed directly from flash (XIP), also there
> is additional hardware logic to prefetch and cache contents to
> improve execution performance. These flash can also be used to
> store user data (like environment).
> Flash erase and programming are handled by on-chip NVM controller.
>
> Signed-off-by: Purna Chandra Mandal 
>

Reviewed-by: Daniel Schwierzeck 

> ---
>
> Changes in v2:
> - kconfig: add CONFIG_FLASH_PIC32 dependent on MACH_PIC32
> - fix single/multi-line comment style
> - simplify byte-stream-to-word in little-endian format
> - replace virt_to_phys() with CPHYSADDR()
> - separate flash ID definition in different patch
>
>  drivers/mtd/Kconfig   |   7 +
>  drivers/mtd/Makefile  |   1 +
>  drivers/mtd/pic32_flash.c | 380 
> ++
>  3 files changed, 388 insertions(+)
>  create mode 100644 drivers/mtd/pic32_flash.c
>
> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
> index c58841e..5ed860d 100644
> --- a/drivers/mtd/Kconfig
> +++ b/drivers/mtd/Kconfig
> @@ -30,6 +30,13 @@ config ALTERA_QSPI
>
>  endmenu
>
> +config FLASH_PIC32
> +   bool "Microchip PIC32 Flash driver"
> +   depends on MACH_PIC32
> +   help
> + This enables access to Microchip PIC32 internal non-CFI flash
> + chips through PIC32 Non-Volatile-Memory Controller.
> +
>  source "drivers/mtd/nand/Kconfig"
>
>  source "drivers/mtd/spi/Kconfig"
> diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
> index 7f018a4..9380085 100644
> --- a/drivers/mtd/Makefile
> +++ b/drivers/mtd/Makefile
> @@ -19,4 +19,5 @@ obj-$(CONFIG_HAS_DATAFLASH) += dataflash.o
>  obj-$(CONFIG_FTSMC020) += ftsmc020.o
>  obj-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
>  obj-$(CONFIG_MW_EEPROM) += mw_eeprom.o
> +obj-$(CONFIG_FLASH_PIC32) += pic32_flash.o
>  obj-$(CONFIG_ST_SMI) += st_smi.o
> diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
> new file mode 100644
> index 000..59555ca
> --- /dev/null
> +++ b/drivers/mtd/pic32_flash.c
> @@ -0,0 +1,380 @@
> +/*
> + * Copyright (C) 2015
> + * Cristian Birsan 
> + * Purna Chandra Mandal 
> + *
> + * SPDX-License-Identifier:GPL-2.0+
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +/* NVM Controller registers */
> +struct pic32_reg_nvm {
> +   struct pic32_reg_atomic ctrl;
> +   struct pic32_reg_atomic key;
> +   struct pic32_reg_atomic addr;
> +   struct pic32_reg_atomic data;
> +};
> +
> +/* NVM operations */
> +#define NVMOP_NOP  0
> +#define NVMOP_WORD_WRITE   1
> +#define NVMOP_PAGE_ERASE   4
> +
> +/* NVM control bits */
> +#define NVM_WR BIT(15)
> +#define NVM_WREN   BIT(14)
> +#define NVM_WRERR  BIT(13)
> +#define NVM_LVDERR BIT(12)
> +
> +/* NVM programming unlock register */
> +#define LOCK_KEY   0x0
> +#define UNLOCK_KEY10xaa996655
> +#define UNLOCK_KEY20x556699aa
> +
> +/*
> + * PIC32 flash banks consist of number of pages, each page
> + * into number of rows and rows into number of words.
> + * Here we will maintain page information instead of sector.
> + */
> +flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
> +static struct pic32_reg_nvm *nvm_regs_p;
> +
> +static inline void flash_initiate_operation(u32 nvmop)
> +{
> +   /* set operation */
> +   writel(nvmop, &nvm_regs_p->ctrl.raw);
> +
> +   /* enable flash write */
> +   writel(NVM_WREN, &nvm_regs_p->ctrl.set);
> +
> +   /* unlock sequence */
> +   writel(LOCK_KEY, &nvm_regs_p->key.raw);
> +   writel(UNLOCK_KEY1, &nvm_regs_p->key.raw);
> +   writel(UNLOCK_KEY2, &nvm_regs_p->key.raw);
> +
> +   /* initiate operation */
> +   writel(NVM_WR, &nvm_regs_p->ctrl.set);
> +}
> +
> +static int flash_wait_till_busy(const char *func, ulong timeout)
> +{
> +   int ret = wait_for_bit(__func__, &nvm_regs_p->ctrl.raw,
> +  NVM_WR, false, timeout, false);
> +
> +   return ret ? ERR_TIMOUT : ERR_OK;
> +}
> +
> +static inline int flash_complete_operation(void)
> +{
> +   u32 tmp;
> +
> +   tmp = readl(&nvm_regs_p->ctrl.raw);
> +   if (tmp & NVM_WRERR) {
> +   printf("Error in Block Erase - Lock Bit may be set!\n");
> +   flash_initiate_operation(NVMOP_NOP);
> +   return ERR_PROTECTED;
> +   }
> +
> +   if (tmp & NVM_LVDERR) {
> +   printf("Error in Block Erase - low-vol detected!\n");
> +   flash_initiate_operation(NVMOP_NOP);
> +   return ERR_NOT_ERASED;
> +   }
> +
> +   /* disable flash write or erase operation */
> +   writel(NVM_WREN, &nvm_regs_p->ctrl.clr);
> +
>

Re: [U-Boot] [PATCH v2 1/2] flash: add device ID for Microchip PIC32 internal flash.

2016-03-15 Thread Daniel Schwierzeck
2016-03-15 11:16 GMT+01:00 Purna Chandra Mandal :
> Microchip PIC32 has internal parallel flash (non-CFI compliant).
> These flash devices do not support any identifier command so no
> standard IDs. Added unique IDs to seperate these flash devices
> from others supported by U-Boot.
>
> Signed-off-by: Purna Chandra Mandal 

Reviewed-by: Daniel Schwierzeck 

> ---
>
> Changes in v2: None
>
>  include/flash.h | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/flash.h b/include/flash.h
> index f53ace7..c9aacd5 100644
> --- a/include/flash.h
> +++ b/include/flash.h
> @@ -400,6 +400,9 @@ extern flash_info_t *flash_get_info(ulong base);
>  #define FLASH_STM800DT 0x00D7  /* STM M29W800DT (1M = 64K x 16, top) 
>   */
>  #define FLASH_STM800DB 0x005B  /* STM M29W800DB (1M = 64K x 16, 
> bottom)*/
>
> +#define FLASH_MCHP100T 0x0060  /* MCHP internal (1M = 64K x 16) */
> +#define FLASH_MCHP100B 0x0061  /* MCHP internal (1M = 64K x 16) */
> +
>  #define FLASH_28F400_T 0x0062  /* MT  28F400B3 ID (  4M = 256K x 16 
> )  */
>  #define FLASH_28F400_B 0x0063  /* MT  28F400B3 ID (  4M = 256K x 16 
> )  */
>
> @@ -486,7 +489,7 @@ extern flash_info_t *flash_get_info(ulong base);
>  #define FLASH_MAN_SHARP 0x0050
>  #define FLASH_MAN_ATM  0x0060
>  #define FLASH_MAN_CFI  0x0100
> -
> +#define FLASH_MAN_MCHP 0x0200  /* Microchip Technology */
>
>  #define FLASH_TYPEMASK 0x  /* extract FLASH type   information   
>   */
>  #define FLASH_VENDMASK 0x  /* extract FLASH vendor information   
>   */
> --
> 1.8.3.1
>



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


Re: [U-Boot] [U-Boot, V6] ARM: Various: Future-proof serial platdata

2016-03-15 Thread Tom Rini
On Mon, Mar 07, 2016 at 09:08:49PM -0600, Adam Ford wrote:

> A few boards still use ns16550_platdata structures, but assume the structure
> is going to be in a specific order. By explicitly naming each entry,
> this should also help 'future-proof' in the event the structure changes.
> 
> Tested on the Logic PD Torpedo + Wireless.
> 
> I only changed a handful of devices that used the same syntax as the Logic
> board.  Appologies if I missed one or stepped on toes.  Thanks to Derald Woods
> and Alexander Graf.
> 
> Signed-off-by: Adam Ford 
> 
> V6: Add fix to arch/arm/cpu/armv7/am33xx/board.c
> 
> V5: Add fix to arch/arm/cpu/arm926ejs/lpc32xx/devices.c
> 
> V4: Fix subject heading
> 
> V3: Remove  reg_offset out in all the structs. It was reverted out, and and if
> it did exist, it would get initialized to 0 by default.
> 
> V2: I hastily copy-pasted the boards without looking at the UART number.
> This addresses 3 boards that use UART3 and not UART1.
> Reviewed-by: Mugunthan V N 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ARM: OMAP4+: Allow arch specfic code to use early DM

2016-03-15 Thread Tom Rini
On Mon, Mar 07, 2016 at 02:49:54PM +0530, Lokesh Vutla wrote:

> Early system initialization is being done before initf_dm is being called
> in U-Boot. Then system will fail to boot if any of the DM enabled driver
> is being called in this system initialization code. So, rearrange the
> code a bit so that DM enabled drivers can be called during early system
> initialization.
> 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2] ARM: AM57xx: Update EMIF registers

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:11:35AM +0530, Lokesh Vutla wrote:

> There are certain EMIF timing failures seen on the some x15 boards. Updating
> the EMIF settings to get rid of these timing failures.
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 3/6] ARM: DRA7: Move emif settings to board specific files

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:06AM +0530, Lokesh Vutla wrote:

> The newer versions of DRA7 boards has EEPROM populated with DDR
> size specified in it. Moving DRA7 specific emif related settings
> to board files so that emif settings can be identified based on EEPROM.
> 
> Acked-by: Nishanth Menon 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 1/6] ti: common: dra7: Add standard access for board description EEPROM

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:04AM +0530, Lokesh Vutla wrote:

> DRA7 EVM revH and later EVMs have EEPROM populated that can contain board
> description information such as name, revision, DDR definition, etc. Adding
> support for this EEPROM format.
> 
> Acked-by: Nishanth Menon 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,2/6] ARM: DRA7: Enable EEPROM support

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:05AM +0530, Lokesh Vutla wrote:

> Enable EEPROM support for DRA74-evm.
> 
> Acked-by: Nishanth Menon 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 6/6] ARM: DRA7-evm: Update memory info in banks

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:09AM +0530, Lokesh Vutla wrote:

> Updating the memory banks properly so that DT is populated accordingly.
> And updating this only after DDR is properly detected by eeprom, so that
> git bisect is still maintained.
> 
> Acked-by: Nishanth Menon 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,5/6] ARM: DRA7: EMIF: Add 4GB DDR settings

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:08AM +0530, Lokesh Vutla wrote:

> The REVH and later versions of DRA7-evm uses MICRON MT41K512M16HA-125 memory
> chips which is of size 4GB(2GB on EMIF1 and 2GB on EMIF2). Add support for the
> same.
> 
> Acked-by: Nishanth Menon 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ARM: DRA72-evm: Update mux and VIRTUAL/MANUAL mode timings

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 10:10:20AM +0530, Lokesh Vutla wrote:

> All the mux configurations needs to be done as part of the IODelay
> sequence to avoid glitch. Adding all the mux configuration, MANUAL/VIRTUAL
> mode configuration as needed for DRA72-evm.
> 
> Also update the mux for SD card detect on DRA74-evm.
> 
> Signed-off-by: Kishon Vijay Abraham I 
> Signed-off-by: Vignesh R 
> Signed-off-by: Lokesh Vutla 
> Reviewed-by: Tom Rini 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 4/6] ARM: DRA7: configs: Prepare for detecting memory > 2GB

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 09:18:07AM +0530, Lokesh Vutla wrote:

> Enable configs that are required for detecting memory > 2GB.
> 
> Reviewed-by: Tom Rini 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot/master, thanks!

-- 
Tom


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


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

2016-03-15 Thread Tom Rini
On Tue, Mar 15, 2016 at 12:41:20PM +0530, Jagan Teki wrote:

> Hi Tom,
> 
> Please pull this PR.
> 
> thanks!
> Jagan.
> 
> The following changes since commit df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa:
> 
>   Prepare v2016.03 (2016-03-14 10:20:21 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-spi.git master
> 
> for you to fetch changes up to 77b8d04854f486741471ad02b93b473b5b3d72f8:
> 
>   spi: omap3: Convert to driver model (2016-03-14 22:46:28 +0530)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] arm64: define _image_binary_end to fix SPL_OF_CONTROL

2016-03-15 Thread Tom Rini
On Tue, Mar 08, 2016 at 08:34:44PM +0900, Masahiro Yamada wrote:

> To make SPL_OF_CONTROL work on ARM64 SoCs, _image_binary_end must be
> defined in the linker script.
> 
>  LD  spl/u-boot-spl
> lib/built-in.o: In function `fdtdec_setup':
> lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
> lib/fdtdec.c:1186: undefined reference to `_image_binary_end'
> make[1]: *** [spl/u-boot-spl] Error 1
> make: *** [spl/u-boot-spl] Error 2
> 
> Note:
> CONFIG_SPL_SEPARATE_BSS must be defined as well on ARM64 SoCs.
> 
> Signed-off-by: Masahiro Yamada 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


  1   2   3   >