env_nand: fix incorrect size parameter to ALLOC_CACHE_ALIGN_BUFFER

The third parameter to ALLOC_CACHE_ALIGN_BUFFER is not size (as named),
but rather count (number of elements of the type to allocate). The
current code ends up allocating one copy of env_t for each byte in its
size, which quite possibly ends up overflowing RAM.

This fixes a bug in commit 3801a15 "env_nand: align NAND buffers".

Reported-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
HACK: Disable cache alignment warnings

They are very annoying and noisy
USB: EHCI: Initialize multiple USB controllers at once

Add support for command line "usb reset" or "usb start" to initialize
, "usb stop" to stop multiple USB controllers at once.
Other command like "usb tree" also supports multiple controllers.

New added definitions in header file are:
CONFIG_USB_MULTI
CONFIG_USB_MAX_CONTROLLER_COUNT

Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
tegra20: Initialize multiple USB controllers at once

Add support for command line "usb reset" or "usb start" to initialize
, "usb stop" to stop multiple USB controllers at once.
Other commands like "usb tree" also support multiple controllers.

Example to add definitions in header file like include/configs/seaboard.h are:
define CONFIG_USB_MULTI
define CONFIG_USB_MAX_CONTROLLER_COUNT 3

Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
ARM: tegra: enable all USB ports on Seaboard, enable USB keyboard

Signed-off-by: Stephen Warren <swarren@nvidia.com>
tegra: Harmony: enable ULPI USB port

Signed-off-by: Stephen Warren <swarren@nvidia.com>
disk: part_efi: range-check partition number

Enhance get_partition_info_efi() to range-check the partition number.
This prevents invalid partitions being accessed, and prevents access
beyond the end of the gpt_pte[] array.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: New patch
disk: part_efi: parse and store partition UUID

Each EFI partition table entry contains a UUID. Extend U-Boot's struct
disk_partition to be able to store this information, and modify
get_partition_info_efi() to fill it in.

The implementation of uuid_string() was stolen from the Linux kernel.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: Add #ifdef CONFIG_PARTITION_UUIDS around all new code and struct fields.
disk: part_msdos: parse and store partition UUID

The MSDOS/MBR partition table includes a 32-bit unique ID, often referred
to as the NT disk signature. When combined with a partition number within
the table, this can form a unique ID similar in concept to EFI/GPT's
partition UUID.

This patch generates UUIDs in the format 0002dd75-01, which matches the
format expected by the Linux kernel.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: New patch.
cmd_part: add partition-related command

This implements the following:

part uuid mmc 0:1
  -> print partition UUID
part uuid mmc 0:1 uuid
  -> set environment variable to partition UUID

This can be useful when writing a bootcmd which searches all known
devices for something bootable, and then wants the kernel to use the
same partition as the root device, e.g.:

part uuid ${devtype} ${devnum}:${rootpart} uuid
setenv bootargs root=PARTUUID=${uuid} ...

It is expected that further part sub-commands will be added later, e.g.
to find which partition on a disk is marked bootable, to write new
partition tables to disk, etc.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: validate that CONFIG_PARTITION_UUID is defined when CONFIG_CMD_PART is

Note: If Rob Herring's proposed patch "disk/part: introduce
get_device_and_partition" is applied, the body of do_partuuid() should
be reworked to use Rob's new function get_device_and_partition().
tegra: enable CONFIG_CMD_PART

This is extremely likely to be used from the boot.scr that Tegra's default
bootcmd locates and executes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>