tegra: remove CONFIG_USB_ETHER_SMSC95XX from boards without it

The SMSC95xx series may exist either directly on a main board, or as a USB
to Ethernet dongle. However, dongles containing these chips are very rare.
Hence, remove this config option, except on Harmony where such a chip is
actually present on the board.

The asix option remains, since it's a popular chip, and I actively use a
dongle containing this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
tegra: ventana: add own device tree, enable USB

Add a device tree for Ventana; the Seaboard file no longer represents
the HW present on Ventana.

Enable USB on Ventana.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
env_mmc: align buffers using ALLOC_CACHE_ALIGN_BUFFER

This allows MMC drivers to perform cache flusing on the bufffers
without issue.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
sf: winbond: Add support for the Winbond W25Q80BL

This chip is present on the Compulab TrimSlice.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
tegra: ventana: store environment in eMMC

Store the environment in eMMC, at the end of the second boot sector.
This should not conflict with any other eMMC usage: U-Boot is stored
well below this location, and the kernel only uses the general area
of the eMMC once booted, not the boot sectors.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
tegra: whistler: store environment in eMMC

Store the environment in eMMC, at the end of the second boot sector.
This should not conflict with any other eMMC usage: U-Boot is stored
well below this location, and the kernel only uses the general area
of the eMMC once booted, not the boot sectors.

Note: This assumes the user plugged the standard 8MB MoviNAND card into
J29/HSMMC/POP. If they didn't, the boot sector layout may be different.
However, use of that particular card is standard practice as far as I
know.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
spi: tegra2: rename tegra2_spi.* to tegra_spi.*

In anticipation of Tegra3 support, start removing/renaming
Tegra2-specific files. No functional changes (yet).
Also updated copyright to 2012.

Signed-off-by: Tom Warren <twarren@nvidia.com>
mmc: tegra2: rename tegra2_mmc.* to tegra_mmc.*

In anticipation of Tegra3 support, continue removing/renaming
Tegra2-specific files. No functional changes (yet).
Updated copyrights to 2012.

Signed-off-by: Tom Warren <twarren@nvidia.com>
gpio: tegra2: rename tegra2_gpio.* to tegra_gpio.*

In anticipation of Tegra3 support, continue removing/renaming
Tegra2-specific files. No functional changes (yet).
Updated copyrights to 2012.

Signed-off-by: Tom Warren <twarren@nvidia.com>
tegra: trimslice: store environment in SPI flash

The chosen flash offset matches Compulab's downstream U-Boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
tegra: paz00: store environment in eMMC

Store the environment in eMMC, at the end of the second boot sector.
This should not conflict with any other eMMC usage: U-Boot is stored
well below this location, and the kernel only uses the general area
of the eMMC once booted, not the boot sectors.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
tegra: seaboard: disable SPI, move environment to eMMC

The SPI hardware on Seaboard is too broken to use; it is muxed with the
console UART and requires evil interactions between the SPI and UART
drivers to work even partially. The current code in U-Boot is not
sufficient to make this work correctly; auto boot is aborted due to
corruption in the UART RX channel interrupting it.

Instead, move the environment to eMMC, at the end of the second boot
sector. This should not conflict with any other eMMC usage, irrespective
of whether the board boots from SPI, NAND, or eMMC: if U-Boot is stored
in eMMC, it will be stored well below this location. The kernel only
uses the general area of the eMMC once booted, not the boot sectors.

Boards that are derivatives of Seaboard don't have the muxing issue,
and should/could have a separate U-Boot configuration file that does
enable SPI if desired.

Alternatively, the environment could be stored in NAND flash, but we
currently have no driver for that controller.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arm: Tegra: Use ODMDATA from BCT in IRAM

Walk the BIT and BCT to find the ODMDATA word in the
CustomerData field and put it into Scratch20 reg for
use by kernel, etc.

Built all Tegra builds OK; Booted on Seaboard and saw
ODMDATA in PMC scratch20 was the same as the value in my
burn-u-boot.sh file (0x300D8011). NOTE: All flash utilities
will have to specify the odmdata (nvflash --odmdata n) on
the command line or via a cfg file, or built in to their
BCT.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
tegra: trimslice: fix a couple typos

Fix the .dts file USB unit addresses not to duplicate each-other.

Fix the board name string to indicate the vendor is Compulab not NVIDIA.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
USB: Align buffers at cacheline

This avoids cache-alignment warnings shown in console
when a usb command is entered.

Whenever X bytes of unaligned buffer is invalidated, arm core
invalidates X + Y bytes as per the cache line size and throws
these warnings.

Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Signed-off-by: Marek Vasut <marex@denx.de>
HACK: Disable cache alignment warnings

They are very annoying and noisy
tegra: usb: fix wrong error check

loop_count runs down from 10000, so the correct condition to error out
is ==0.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Tom Warren <twarren.nvidia@gmail.com>
Add env vars describing U-Boot target board

This can be useful for generic scripts. For example, rather than hard-
coding a script to ext2load tegra-harmony.dtb, it could load
${soc}-${board}.dtb and hence not need adjustments to run on multiple
boards.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v3:
* Prefix config.h #defines with CONFIG_SYS_. The environment variable
  names remain unchanged.
v2:
* Pass values via config.h instead of command-line
* Use a single CONFIG option to enable this feature
* Simplify names of the environment variables
* add README entry describing CONFIG_ENV_VARS_UBOOT_CONFIG
tegra: enable CONFIG_ENV_VARS_UBOOT_CONFIG

So that all Tegra boards define environment variables that describe
themselves.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: Adjust to new CONFIG variable name