platform/kernel/u-boot.git
10 years agoEXT4: Fix number base handling of "ext4write" command
Wolfgang Denk [Fri, 31 Jan 2014 08:28:25 +0000 (09:28 +0100)]
EXT4: Fix number base handling of "ext4write" command

Unlike other commands (for example, "fatwrite"), ext4write would
interpret the "sizebytes" as decimal number.  This is not only
inconsistend and unexpected to most users, it also breaks usage
like this:

tftp ${addr} ${name}
ext4write mmc 0:2 ${addr} ${filename} ${filesize}

Change this to use the standard notation of base 16 input format.
See also commit b770e88

WARNING: this is a change to the user interface!!

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Uma Shankar <uma.shankar@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
10 years agonet, phy: atheros ar803x bug
Heiko Schocher [Thu, 30 Jan 2014 10:02:13 +0000 (11:02 +0100)]
net, phy: atheros ar803x bug

commit 626ee1e3 "phylib: update atheros ar803x phy"

leads in failing ethernet on the pxm2 board.

Calling genphy_config() instead of ar8021_config(),
which seems for ar8021 phys not ar803x phys, make
it working again.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
10 years agofdt: rename IMAAGE_OF_BOARD_SETUP to IMAGE_OF_BOARD_SETUP
Masahiro Yamada [Wed, 29 Jan 2014 07:29:16 +0000 (16:29 +0900)]
fdt: rename IMAAGE_OF_BOARD_SETUP to IMAGE_OF_BOARD_SETUP

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoconfig: remove platform CONFIG_SYS_HZ definition part 3
Masahiro Yamada [Tue, 28 Jan 2014 09:08:13 +0000 (18:08 +0900)]
config: remove platform CONFIG_SYS_HZ definition part 3

This commit removes platform CONFIG_SYS_HZ definition for the
remainders of part1 (commit cdb23792) and part2 (commit f232950f).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Rob Herring <rob.herring@calxeda.com>
10 years agomini2440.h: Delete remainder of dead board
Masahiro Yamada [Tue, 28 Jan 2014 09:06:12 +0000 (18:06 +0900)]
mini2440.h: Delete remainder of dead board

Commit af5b9b1f removed mini2440 board support,
but missed to delete include/configs/mini2440.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agodoc: README: Correct file name of signature verification documentation
Detlev Zundel [Mon, 20 Jan 2014 15:21:46 +0000 (16:21 +0100)]
doc: README: Correct file name of signature verification documentation

Signed-off-by: Detlev Zundel <dzu@denx.de>
10 years agounit-test: add lots of tests for the Hush 'test' command
Stephen Warren [Mon, 3 Feb 2014 20:24:24 +0000 (13:24 -0700)]
unit-test: add lots of tests for the Hush 'test' command

I recently re-wrote cmd_test() to add new features. Add a bunch of unit-
tests to make sure I didn't break anything.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agounit-test: fix 'env default' invocation
Stephen Warren [Mon, 3 Feb 2014 20:24:23 +0000 (13:24 -0700)]
unit-test: fix 'env default' invocation

"env default -f" doesn't work any more; replace it with
"env default -f -a". This avoids the following when running the ut
command:

do_ut_cmd: Testing commands
env - environment handling commands

Usage:
env default [-f] -a - [forcibly] reset default environment
...

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agofat: implement exists() for FAT fs
Stephen Warren [Mon, 3 Feb 2014 20:21:10 +0000 (13:21 -0700)]
fat: implement exists() for FAT fs

This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the FAT filesystem.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoext4: implement exists() for ext4fs
Stephen Warren [Mon, 3 Feb 2014 20:21:09 +0000 (13:21 -0700)]
ext4: implement exists() for ext4fs

This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the ext4 filesystem.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: enable CONFIG_CMD_FS_GENERIC
Stephen Warren [Mon, 3 Feb 2014 20:21:08 +0000 (13:21 -0700)]
sandbox: enable CONFIG_CMD_FS_GENERIC

Since the generic ls command no longer segfaults sandbox, enable it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: implement exists() function
Stephen Warren [Mon, 3 Feb 2014 20:21:07 +0000 (13:21 -0700)]
sandbox: implement exists() function

This hooks into the generic "file exists" support added in an earlier
patch, and provides an implementation for the sandbox test environment.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agocmd_test: implement -e test for file existence
Stephen Warren [Mon, 3 Feb 2014 20:21:06 +0000 (13:21 -0700)]
cmd_test: implement -e test for file existence

This is much like a regular shell's -e operator, except that it takes
multiple arguments to specify the device type and  device/partition ID
in addition to the usual filename:

if test -e mmc 0:1 /boot/boot.scr; then echo yes; else echo no; fi

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agocmd_test: evaluate to false without any arguments
Stephen Warren [Mon, 3 Feb 2014 20:21:05 +0000 (13:21 -0700)]
cmd_test: evaluate to false without any arguments

This emulates bash:
$ if test; then echo yes; else echo no; fi
no

Currently, the code sets expr = -1 in this case, which gets mapped to
0 (true) at the end of do_test() by the logical -> shell exit code
conversion.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agocmd_test: implement ! on sub-expressions
Stephen Warren [Mon, 3 Feb 2014 20:21:04 +0000 (13:21 -0700)]
cmd_test: implement ! on sub-expressions

Currently, ! can only be parsed as the first operator in an expression.
This prevents the following from working:

$ if test ! ! 1 -eq 1; then echo yes; else echo no; fi
yes
$ if test ! 1 -eq 2 -a ! 3 -eq 4; then echo yes; else echo no; fi
yes

Fix this by parsing ! like any other operator, and and handling it
similarly to -a and -o.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agocmd_test: check for binary operators before unary
Stephen Warren [Mon, 3 Feb 2014 20:21:03 +0000 (13:21 -0700)]
cmd_test: check for binary operators before unary

This better mirrors the behaviour of bash, for example:

$ if test -z = -z; then echo yes; else echo no; fi
yes

This is parsed as a string comparison of "-z" and "-z", since the check
for the binary "=" operator occurs first. Without this change, the
command would be parsed as a -z test of "-", followed by a syntax error;
a trailing -z without and operand.

This is a behavioural change, but I believe any commands affected were
previously invalid or bizarely formed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agocmd_test: use table lookup for parsing
Stephen Warren [Mon, 3 Feb 2014 20:21:02 +0000 (13:21 -0700)]
cmd_test: use table lookup for parsing

do_test() currently uses strcmp() twice to determine which operator is
present; once to determine how many arguments the operator needs, then
a second time to actually decode the operator and implement it.

Rewrite the code so that a table lookup is used to translate the operator
string to an integer, and use a more efficient switch statement to decode
and execute the operator.

This approach also acts as enablement for the following patches.

This patch should introduce no behavioural change.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agofs: don't pass NULL dev_desc to most filesystems
Stephen Warren [Mon, 3 Feb 2014 20:21:01 +0000 (13:21 -0700)]
fs: don't pass NULL dev_desc to most filesystems

FAT and ext4 expect that the passed in block device descriptor not be
NULL. This causes problems on sandbox, where get_device_and_partition()
succeeds for the "host" device, yet passes back a NULL device descriptor.
Add special handling for this situation, so that the generic filesystem
commands operate as expected on sandbox.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agofs: implement infrastructure for an 'exists' function
Stephen Warren [Mon, 3 Feb 2014 20:21:00 +0000 (13:21 -0700)]
fs: implement infrastructure for an 'exists' function

This could be used in scripts such as:

if test -e mmc 0:1 /boot/boot.scr; then
    load mmc 0:1 ${scriptaddr} /boot/boot.scr
    source ${scriptaddr}
fi

rather than:

if load mmc 0:1 ${scriptaddr} /boot/boot.scr; then
    source ${scriptaddr}
fi

This prevents errors being printed by attempts to load non-existent
files, which can be important when checking for a large set of files,
such as /boot/boot.scr.uimg, /boot/boot.scr, /boot/extlinux.conf,
/boot.scr.uimg, /boot.scr, /extlinux.conf.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agofs: fix generic save command implementation
Stephen Warren [Mon, 3 Feb 2014 20:20:59 +0000 (13:20 -0700)]
fs: fix generic save command implementation

Fix a few issues with the generic "save" shell command, and fs_write()
function.

1) fstypes[].write wasn't filled in for some file-systems, and isn't
   checked when used, which could cause crashes/... if executing save
   on e.g. fat/ext filesystems.

2) fs_write() requires the length argument to be non-zero, since it needs
   to know exactly how many bytes to write. Adjust the comments and code
   according to this.

3) fs_write() wasn't prototyped in <fs.h> like other generic functions;
   other code should be able to call this directly rather than invoking
   the "save" shell command.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoREADME: document CONFIG_CMD_FS_GENERIC
Stephen Warren [Sat, 25 Jan 2014 03:46:37 +0000 (20:46 -0700)]
README: document CONFIG_CMD_FS_GENERIC

This enables generic filesystem commands such as load and ls, which
automatically work with multiple filesystem types, without having to
be told which is present, unlike e.g. ext2load, fatls.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 17 Feb 2014 19:22:02 +0000 (14:22 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-nios
Tom Rini [Mon, 17 Feb 2014 19:21:03 +0000 (14:21 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-nios

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Mon, 17 Feb 2014 19:16:08 +0000 (14:16 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

10 years agoARM: bcm2835: fix mbox POWER_STATE_RESP_ON value
Stephen Warren [Thu, 6 Feb 2014 03:42:25 +0000 (20:42 -0700)]
ARM: bcm2835: fix mbox POWER_STATE_RESP_ON value

Typo: The correct value is 1 not 2.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agoarm/km: introduce kmsugp1 target
Gerlando Falauto [Thu, 13 Feb 2014 15:43:00 +0000 (16:43 +0100)]
arm/km: introduce kmsugp1 target

KMSUGP1 is from a u-boot perspective (almost) identical to KMNUSA.
The only difference is that the PCIe reset is connected to Kirkwood pin
MPP7_PEX_RST_OUTn, we use a dedicated config flag KM_PCIE_RESET_MPP7.
Such pin should theoretically be handled by the PCIe subsystem
automatically, but this turned out not to be the case.
So simply configure this PIN as a GPIO and issue a pulse manually.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Cc: Valentin Longchamp <valenting.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: define fdt_high env variable and allow backwards compatibility
Gerlando Falauto [Mon, 27 Jan 2014 15:58:28 +0000 (16:58 +0100)]
arm/km: define fdt_high env variable and allow backwards compatibility

Add set_fdthigh subcommand to "subbootcmds" (release) so to set "fdt_high"
This is necessary on Kirkwood so that the FDT does not get relocated
above the memory limit that the kernel cannot access
(that is the memory part reserved for the switch).
This was tested on NUSA1, where it is necessary, and on ETER1, where it
doesn't seem to hurt.

We want the scripts to also work with older versions of u-boot, where:
a) set_fdthigh is not defined (will be default env for newer u-boots)
b) the fdt will not be available

For this reason, we use "set_fdthigh" to tell whether we are running
a newer (FDT-aware) u-boot or not.
So if "set_fdthigh" runs successfully or arch != arm we try loading
the fdt; otherwise we proceed normally.

Notice how, contrary to release mode, set_fdthigh will _not_ be part of
subbootcmds for develop and ramfs, but will be executed as part of
"tftpfdt".

Since this is only needed for kirkwood cards, and it prevents the kernel
from booting on QorIQ (though it seemed to work on ETER1), we change
its definition in the default env for powerpc so that the value is only
set on ARM.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: enable FDT for km_kirwkood
Gerlando Falauto [Mon, 27 Jan 2014 15:58:27 +0000 (16:58 +0100)]
arm/km: enable FDT for km_kirwkood

This consists of:
a) Defining the addresses, enabling fdtsupport [arm]
b) Defining "cramfsloadfdt"  [arm,powerpc => common]
c) Adding the FDT address to bootm [arm,powerpc => common]
d) Defining "tftpfdt" in ramfs-,develop- [arm,powerpc >= common]

This should work with 3.10 kernels, whether loaded through TFTP
(with rootfs either through NFS or TFTP-ramfs) or from the NAND.

The machid was left unchanged, this should keep compatibility with both
older and newer kernels.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: fix wrong error handling
Holger Brunck [Mon, 27 Jan 2014 15:58:26 +0000 (16:58 +0100)]
arm/km: fix wrong error handling

miiphy_read and miiphy_write are returning 0 on success.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: add CONFIG_KM_BOARD_EXTRA_ENV to default environment
Holger Brunck [Mon, 27 Jan 2014 15:58:25 +0000 (16:58 +0100)]
arm/km: add CONFIG_KM_BOARD_EXTRA_ENV to default environment

This is needed for board specific additional environment variables.
E.g. the mgcoge3un has this additional "waitforne" variable.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km/suv31: switch to 256MB RAM
Holger Brunck [Mon, 27 Jan 2014 15:58:24 +0000 (16:58 +0100)]
arm/km/suv31: switch to 256MB RAM

We now use 256MB RAM instead of 128MB. We can use the same config file
as kmnusa.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: make local function startup_allowed static
Holger Brunck [Mon, 27 Jan 2014 15:58:23 +0000 (16:58 +0100)]
arm/km: make local function startup_allowed static

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agoarm/km: drop unneeded define
Holger Brunck [Mon, 27 Jan 2014 15:58:22 +0000 (16:58 +0100)]
arm/km: drop unneeded define

CONFIG_BOOTCOUNT_LIMIT is used on all boards from this board series. So
remove this unneeded define.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
10 years agozynq: Fix elf header generation
Michal Simek [Wed, 5 Feb 2014 07:06:29 +0000 (08:06 +0100)]
zynq: Fix elf header generation

This patch is here because of:
"arm: keep all sections in ELF file"
(sha1: 47ed5dd031d7d2c587e6afd386e79ccec1a1b7f7)

Our tools expect to have elf with only LOAD header.
Without this fix also PHDR, INTERP and DYNAMIC headers
are available in ELF.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agozynq: Use full tftpboot command instead of shortcut tftp
Michal Simek [Wed, 5 Feb 2014 06:56:07 +0000 (07:56 +0100)]
zynq: Use full tftpboot command instead of shortcut tftp

The reason is enabling tftpput command where
tftp shorcut stops to work for tftpboot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agorelocate-rela: replace a magic number with sizeof(Elf64_Rela)
Masahiro Yamada [Tue, 4 Feb 2014 01:58:31 +0000 (10:58 +0900)]
relocate-rela: replace a magic number with sizeof(Elf64_Rela)

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: David Feng <fenghua@phytium.com.cn>
Acked-by: Scott Wood <scottwood@freescale.com>
10 years agoARM: bcm2835: config.mk isn't needed
Stephen Warren [Wed, 29 Jan 2014 05:42:06 +0000 (22:42 -0700)]
ARM: bcm2835: config.mk isn't needed

The entries in config.mk were needed so that U-Boot could be built
with an old version of the Raspberry Pi Foundation's toolchain. Without
them, the build would error out with:

...-ld: error: .../libgcc.a(_bswapsi2.o) uses VFP register arguments,
u-boot does not

However, none of the 3 toolchains in the latest version of their
tools.git, nor the Ubuntu/Linaro ARM compilers in at least Ubuntu Quantal
or Saucy, need these options set in order to compile a working U-Boot.
Hence, remove the options for simplicity.

Reported-by: Tom Rini <trini@ti.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
10 years agoARM: rpi_b: set $fdtfile in default environment
Stephen Warren [Wed, 29 Jan 2014 05:41:50 +0000 (22:41 -0700)]
ARM: rpi_b: set $fdtfile in default environment

U-Boot names the Raspberry Pi board rpi_b. This means that the common
expression for DTB filename ${soc}-${board}.dtb expands to
bcm2835-rpi_b.dtb. However, the DTB generated by the Linux kernel is
bcm2835-rpi-b.dtb. Set $fdtfile in U-Boot's environment so that scripts
look for the correct DTB filename.

An alternative would be to rename the U-Boot board to rpi-b. However,
that change would be far more invasive, and end up affecting users (i.e
they'd have to change their U-Boot build commands).

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agoMerge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Albert ARIBAUD [Thu, 13 Feb 2014 12:30:54 +0000 (13:30 +0100)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'

10 years agoserial: opencores_yanu: Avoid duplicate oc_serial_setbrg() implementation
Axel Lin [Thu, 16 Jan 2014 07:03:52 +0000 (15:03 +0800)]
serial: opencores_yanu: Avoid duplicate oc_serial_setbrg() implementation

The implementation of oc_serial_setbrg() for CONFIG_SYS_NIOS_FIXEDBAUD and
!CONFIG_SYS_NIOS_FIXEDBAUD are very similar.
Add a baudrate variable and set it to either CONFIG_BAUDRATE or gd->baudrate.
Then we can unify the code for both cases.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
10 years agoserial: opencores_yanu: Fix build error
Axel Lin [Thu, 16 Jan 2014 07:01:49 +0000 (15:01 +0800)]
serial: opencores_yanu: Fix build error

Fix build error due to missing include of serial.h and a trivial typo.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
10 years agoexynos: clock: use the clear and set bits macros.
Inha Song [Thu, 6 Feb 2014 05:20:12 +0000 (14:20 +0900)]
exynos: clock: use the clear and set bits macros.

Use setbits/clrbits macro instead of readl/writel function.
(Suggested by Wolfgang)

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos: clock: fixed that cfg is set to wrong value.
Inha Song [Thu, 6 Feb 2014 05:20:10 +0000 (14:20 +0900)]
exynos: clock: fixed that cfg is set to wrong value.

This patch fixed that cfg value is set to wrong value.
Because it didn't read the related register.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoserial/serial_arc - add driver for ARC UART
Alexey Brodkin [Fri, 13 Dec 2013 06:35:11 +0000 (10:35 +0400)]
serial/serial_arc - add driver for ARC UART

Driver for non-standard on-chip UART, instantiated in the ARC (Synopsys)
FPGA Boards such as ARCAngel4/ML50x

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Mischa Jonker <mjonker@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
10 years agodra7xx_evm: Add CONFIG_SUPPORT_EMMC_BOOT, document usage
Tom Rini [Wed, 5 Feb 2014 15:24:25 +0000 (10:24 -0500)]
dra7xx_evm: Add CONFIG_SUPPORT_EMMC_BOOT, document usage

Add a README to the board which lists the commands required to enable
booting from the eMMC boot partitions found on the board.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoomap5_uevm: Add CONFIG_SUPPORT_EMMC_BOOT, document usage
Tom Rini [Wed, 5 Feb 2014 15:24:24 +0000 (10:24 -0500)]
omap5_uevm: Add CONFIG_SUPPORT_EMMC_BOOT, document usage

Add a README to the board which lists the commands required to enable
booting from the eMMC boot partitions found on the board.

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agocmd_mmc.c: Drop open/close mmc sub-commands
Tom Rini [Wed, 5 Feb 2014 15:24:23 +0000 (10:24 -0500)]
cmd_mmc.c: Drop open/close mmc sub-commands

The open and close mmc sub-commands implement a hard-coded set of values
specific to the SMDK5250 platform.  Remove these commands as what they
did can be done instead with a series of mmc dev / bootpart / bootbus
commands instead now.

Cc: Amar <amarendra.xt@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agocmd_mmc.c: Add bootbus mmc sub-command
Tom Rini [Wed, 5 Feb 2014 15:24:22 +0000 (10:24 -0500)]
cmd_mmc.c: Add bootbus mmc sub-command

Add a bootbus sub-command to the mmc command to allow for setting
the boot_bus_width, reset_boot_bus_width and boot_mode fields of
BOOT_BUS_WIDTH (EXT_CSD[177]).

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agocmd_mmc.c: Add 'partconf' command to mmc
Tom Rini [Wed, 5 Feb 2014 15:24:21 +0000 (10:24 -0500)]
cmd_mmc.c: Add 'partconf' command to mmc

Add a partconf sub-command to the mmc command to allow for setting
the boot_ack, boot_partition and partition_access fields of
PARTITION_CONFIG (formerly BOOT_CONFIG, EXT_CSD[179]).  Part of this
requires changing the check for 'part' from an strncmp to a strcmp, like
the rest of the sub-commands.

Cc: Andy Fleming <afleming@gmail.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agocmd_mmc.c: Rename 'bootpart' to 'bootpart-resize'
Tom Rini [Wed, 5 Feb 2014 15:24:20 +0000 (10:24 -0500)]
cmd_mmc.c: Rename 'bootpart' to 'bootpart-resize'

Rename 'bootpart' to 'bootpart-resize' to better reflect what this
command is for.

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agocmd_mmc.c: Change 'bootpart' code to match normal coding style
Tom Rini [Wed, 5 Feb 2014 15:24:19 +0000 (10:24 -0500)]
cmd_mmc.c: Change 'bootpart' code to match normal coding style

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoSPL: Add CONFIG_SUPPORT_EMMC_BOOT support to CONFIG_SPL_FRAMEWORK
Tom Rini [Wed, 5 Feb 2014 15:24:18 +0000 (10:24 -0500)]
SPL: Add CONFIG_SUPPORT_EMMC_BOOT support to CONFIG_SPL_FRAMEWORK

We use the switch CONFIG_SUPPORT_EMMC_BOOT today to enable some
additional features of the eMMC boot partitions.  Add support for being
told that we have booted from one of these partitions to the spl
framework and implement this on TI OMAP/related.

Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: Enabled quirk SDHCI_QUIRK_BROKEN_R1B
Siva Durga Prasad Paladugu [Wed, 22 Jan 2014 08:17:09 +0000 (09:17 +0100)]
mmc: Enabled quirk SDHCI_QUIRK_BROKEN_R1B

As per the below commit
"mmc: sdhci: add the quirk for broken r1b response"
(sha1: 3a6383207be3f71b39004e64464a6e99290b16fa)
need to add quirk SDHCI_QUIRK_BROKEN_R1B, when the
response type is R1b.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agoMMC: DWMMC: Correct the CLKDIV register value
Rajeshwari S Shinde [Wed, 5 Feb 2014 05:18:15 +0000 (10:48 +0530)]
MMC: DWMMC: Correct the CLKDIV register value

This patch corrects the divider value written to CLKDIV register.
Since SDCLKIN is divided inside controller by the DIVRATIO value set
in the CLKSEL register, we need to use the same output clock value to
calculate the CLKDIV value.
as per user manual: cclk_in = SDCLKIN / (DIVRATIO + 1)

Input parameter to mmc_clk is changed to dwmci_host, since
we need the same to read DWMCI_CLKSEL register.

This improves the read timing values for channel 0 on SMDK5250
from 0.288sec to 0.144sec

Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agommc: set rca to 1 for MMC cards
Stephen Warren [Thu, 30 Jan 2014 23:11:12 +0000 (16:11 -0700)]
mmc: set rca to 1 for MMC cards

U-Boot currently sets MMC cards' RCA register to 0. This value is
reserved according to the specification. Use a value of 1 instead, just
like the Linux kernel.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
10 years agox600: Switch to CONFIG_PHYLIB
Tom Rini [Fri, 7 Feb 2014 13:52:06 +0000 (08:52 -0500)]
x600: Switch to CONFIG_PHYLIB

Now that the designware ethernet driver uses phylib we need to turn it
on here.

Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agonet/designware: make driver compatible with data cache
Alexey Brodkin [Wed, 22 Jan 2014 16:49:09 +0000 (20:49 +0400)]
net/designware: make driver compatible with data cache

Up until now this driver only worked with data cache disabled.
To make it work with enabled data cache following changes were required:

 * Flush Tx/Rx buffer descriptors their modification
 * Invalidate Tx/Rx buffer descriptors before reading its values
 * Flush cache for data passed from CPU to GMAC
 * Invalidate cache for data passed from GMAC to CPU

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Mischa Jonker <mjonker@synopsys.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agonet/designware - switch driver to phylib usage
Alexey Brodkin [Wed, 22 Jan 2014 16:54:06 +0000 (20:54 +0400)]
net/designware - switch driver to phylib usage

With this change driver will benefit from existing phylib and thus
custom phy functionality implemented in the driver will go away:
 * Instantiation of the driver is now much shorter - 2 parameters
instead of 4.
 * Simplified phy management/functoinality in driver is replaced with
rich functionality of phylib.
 * Support of custom phy initialization is now done with existing
"board_phy_config".

Note that after this change some previously used config options
(driver-specific PHY configuration) will be obsolete and they are simply
substituted with similar options of phylib.

For example:
 * CONFIG_DW_AUTONEG - no need in this one. Autonegotiation is enabled
by default.
 * CONFIG_DW_SEARCH_PHY - if one wants to specify attached phy
explicitly CONFIG_PHY_ADDR board config option has to be used, otherwise
automatically the first discovered on MDIO bus phy will be used

I believe there's no need now in "doc/README.designware_eth" because
user only needs to instantiate the driver with "designware_initialize"
whose prototype exists in "include/netdev.h".

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Mischa Jonker <mjonker@synopsys.com>
Cc: Shiraz Hashim <shiraz.hashim@st.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Amit Virdi <amit.virdi@st.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agonet: execute "miiphy_init" if CONFIG_PHYLIB defined
Alexey Brodkin [Fri, 10 Jan 2014 15:58:11 +0000 (19:58 +0400)]
net: execute "miiphy_init" if CONFIG_PHYLIB defined

In "common/Makefile" "miiphyutil.o" gets built if any of the following
items enabled:
 * CONFIG_PHYLIB
 * CONFIG_MII
 * CONFIG_CMD_MII

So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still
use functions like "miiphy_get_dev_by_name".

In its turn "miiphy_get_dev_by_name" traverses "mii_devs" list which is
not initialized because "miiphy_init" never got called.

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agonet/designware: add explicit reset of {tx|rx}_currdescnum
Alexey Brodkin [Mon, 13 Jan 2014 09:28:38 +0000 (13:28 +0400)]
net/designware: add explicit reset of {tx|rx}_currdescnum

Driver "init" function might be called multiple times.
On every "init" Tx/Rx buffer descriptors are initialized: "descs_init"
-> "{tx|rx}_descs_init".

In its turn those init functions set MAC's "{tx|rx}desclistaddr" to
point on the first buffer descriptor in the list.

So CPU to start operation from the first buffer descriptor as well after
every "init" we have to reset "{tx|rx}_currdescnum".

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
10 years agoarc: add README for architecture
Alexey Brodkin [Tue, 4 Feb 2014 08:56:21 +0000 (12:56 +0400)]
arc: add README for architecture

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add architecture to MAKEALL
Alexey Brodkin [Tue, 4 Feb 2014 08:56:20 +0000 (12:56 +0400)]
arc: add architecture to MAKEALL

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add AXS101 board support
Alexey Brodkin [Tue, 4 Feb 2014 08:56:19 +0000 (12:56 +0400)]
arc: add AXS101 board support

AXS101 is a new generation of devlopment boards from Synopsys that houses
ASIC with ARC700 and lots of DesignWare peripherals:

 * DW APB UART
 * DW Mobile Storage (MMC/SD)
 * DW I2C
 * DW GMAC

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add Arcangel4 board support
Alexey Brodkin [Tue, 4 Feb 2014 08:56:18 +0000 (12:56 +0400)]
arc: add Arcangel4 board support

Arcangel4 is a FPGA-based development board that is used for prototyping and
verificationof of both ARC hardware (CPUs) and software running upon CPU.

This board avaialble in 2 flavours:
 * Little-endian (arcangel4)
 * Big-endian (arcangel4-be)

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add support for standalone programs
Alexey Brodkin [Tue, 4 Feb 2014 08:56:17 +0000 (12:56 +0400)]
arc: add support for standalone programs

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: bdinfo, image and arc-specific init functions declarations support
Alexey Brodkin [Tue, 4 Feb 2014 08:56:16 +0000 (12:56 +0400)]
arc: bdinfo, image and arc-specific init functions declarations support

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add library functions
Alexey Brodkin [Tue, 4 Feb 2014 08:56:15 +0000 (12:56 +0400)]
arc: add library functions

These are library functions used by ARC700 architecture.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add cpu files
Alexey Brodkin [Tue, 4 Feb 2014 08:56:14 +0000 (12:56 +0400)]
arc: add cpu files

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoarc: add architecture header files
Alexey Brodkin [Tue, 4 Feb 2014 08:56:13 +0000 (12:56 +0400)]
arc: add architecture header files

These are header files used by ARC700 architecture.

Also note that "arch-arc700/hardware.h" is only required for compilation of
"designware_i2c" driver which refers to "asm/arch/hardware.h".
It would be good to fix mentioned driver sometime soon but it will cause
changes in ARM board configs that use "designware_i2c".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Francois Bedard <fbedard@synopsys.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Heiko Schocher <hs@denx.de>
10 years agoblackfin: Initialize the EMAC VLAN with proper default value
Aaron Wu [Wed, 23 Nov 2011 03:23:56 +0000 (11:23 +0800)]
blackfin: Initialize the EMAC VLAN with proper default value

EMAC_VLANx regs is not properly initiallized in u-boot, once it's overwrite in the
kernel when DSA enabled, hot reset will lead to bringing up EMAC fail in u-boot.

Signed-off-by: Aaron Wu <Aaron.Wu@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: Change SMC dcplb entry flag to cover 16M address region
Sonic Zhang [Wed, 22 Jan 2014 08:04:19 +0000 (16:04 +0800)]
blackfin: Change SMC dcplb entry flag to cover 16M address region

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: init bss early
Bob Liu [Tue, 27 Sep 2011 03:00:27 +0000 (11:00 +0800)]
blackfin: init bss early

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoblackfin: The logic of the BF609 macro is opposite.
Sonic Zhang [Wed, 22 Jan 2014 07:43:25 +0000 (15:43 +0800)]
blackfin: The logic of the BF609 macro is opposite.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
10 years agoboard:samsung:trats/trats2: enable boot with appended and separated DTB
Piotr Wilczek [Wed, 22 Jan 2014 14:54:37 +0000 (15:54 +0100)]
board:samsung:trats/trats2: enable boot with appended and separated DTB

This patch modifies envs to enable dual kernel boot
 - with separated DTB if the DTB file is loaded successfully;
 - with DTB apppended to uImage if DTB file is not found;
This is neccesssary for backward compatibilty.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung:trats2: add env variables describing platform
Piotr Wilczek [Wed, 22 Jan 2014 14:54:36 +0000 (15:54 +0100)]
board:samsung:trats2: add env variables describing platform

This patch adds variables describing platform (soc, board, vendor)
to default environment.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung:trats: add env variables describing platform
Piotr Wilczek [Wed, 22 Jan 2014 14:54:35 +0000 (15:54 +0100)]
board:samsung:trats: add env variables describing platform

This patch adds variables describing platform (soc, board, vendor)
to default environment.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung:universal: add env variables describing platform
Piotr Wilczek [Wed, 22 Jan 2014 14:54:34 +0000 (15:54 +0100)]
board:samsung:universal: add env variables describing platform

This patch adds variables describing platform (soc, board, vendor)
to default environment.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung:goni: add env variables describing platform
Piotr Wilczek [Wed, 22 Jan 2014 14:54:33 +0000 (15:54 +0100)]
board:samsung:goni: add env variables describing platform

This patch adds variables describing platform (soc, board, vendor)
to default environment.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Mateusz Zalega <m.zalega@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoboard:samsung:common: set envs with board unified information
Piotr Wilczek [Wed, 22 Jan 2014 14:54:32 +0000 (15:54 +0100)]
board:samsung:common: set envs with board unified information

This patch sets envs that describe board information.
The following envs are set: soc_id, soc_rev, board_rev.
Based on this information, if CONFIG_OF_LIBFDT is enabled,
the 'fdtfile' env is set as:
fdtfile=${soc_family}${soc_id}-${board}.dtb

The generated envs are intenionally not saved to persistent storage.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm:s5pc110: add cpu revision
Piotr Wilczek [Wed, 22 Jan 2014 14:54:31 +0000 (15:54 +0100)]
arm:s5pc110: add cpu revision

This patch adds s5p_cpu_rev.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoarm:exynos: add cpu revision
Piotr Wilczek [Wed, 22 Jan 2014 14:54:30 +0000 (15:54 +0100)]
arm:exynos: add cpu revision

This patch enables to read cpu revision on Exynos CPU.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoinclude/usb/s3c_udc.h: Add <asm/sizes.h>
Tom Rini [Thu, 6 Feb 2014 19:26:05 +0000 (14:26 -0500)]
include/usb/s3c_udc.h: Add <asm/sizes.h>

With e0059ea switching to using SZ_1K, we need to #include <asm/sizes.h>
here for everyone to build still.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 6 Feb 2014 16:20:23 +0000 (11:20 -0500)]
Merge branch 'fpga' of git://denx.de/git/u-boot-microblaze

10 years agofpga: zynqpl: Add support for zc7015 device
Michal Simek [Thu, 26 Sep 2013 14:39:03 +0000 (16:39 +0200)]
fpga: zynqpl: Add support for zc7015 device

Just extend tables with this new device.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agofpga: zynq: Correct fpga load when buf is not aligned
Novasys Ingenierie [Wed, 27 Nov 2013 08:03:01 +0000 (09:03 +0100)]
fpga: zynq: Correct fpga load when buf is not aligned

When ARCH_DMA_MINALIGN is greater than header size of the bit file, and buf is
not aligned, new_buf address became greater then buf_start address and the
load_word loop corrupts bit file data.

A work around is to decrease new_buf of ARCH_DMA_MINALIGN, it might corrupt data
before buf but permits to load correctly.

Signed-off-by: Stany MARCEL <smarcel@novasys-ingenierie.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agousb: mv_udc: Rename to ci_udc
Marek Vasut [Thu, 6 Feb 2014 01:43:45 +0000 (02:43 +0100)]
usb: mv_udc: Rename to ci_udc

The mv_udc is not marvell-specific anymore. The mv_udc is used to drive
generic ChipIdea CI13xxx series OTG cores, so rename the driver to ci_udc
instead.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric.nelson@boundarydevices.com>
Cc: Stefano Babic <sbabic@denx.de>
10 years agousb:gadget:f_thor: cosmetic: Remove debug memset
Lukasz Majewski [Wed, 5 Feb 2014 09:10:46 +0000 (10:10 +0100)]
usb:gadget:f_thor: cosmetic: Remove debug memset

Apparently debug memset (with a 0x55 value) has been overlooked in the
f_thor code.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agousb:gadget:f_thor: Allocate request up to THOR_PACKET_SIZE not ep->maxpacket
Lukasz Majewski [Wed, 5 Feb 2014 09:10:45 +0000 (10:10 +0100)]
usb:gadget:f_thor: Allocate request up to THOR_PACKET_SIZE not ep->maxpacket

Now it is possible to allocate static request - which receives data from
the host (OUT transaction) to the size of THOR packet.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agousb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver
Lukasz Majewski [Wed, 5 Feb 2014 09:10:44 +0000 (10:10 +0100)]
usb:udc:samsung: Zero copy approach for data passed to Samsung's UDC driver

The Samsung's UDC driver is not anymore copying data from USB requests to
aligned internal buffers. Now it works directly in data allocated in the
upper layers like UMS, DFU, THOR.

This change is possible since those gadgets now must take care to allocate
buffers aligned to cache line (CONFIG_SYS_CACHELINE_SIZE).

This can be achieved by using DEFINE_CACHE_ALIGN_BUFFER() or
ALLOC_CACHE_ALIGN_BUFFER() macros. Those take care to allocate buffer
aligned to cache line in both starting address and its size.
Sometimes it is enough to just use memalign() with size being a
multiplication of cache line size.

Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`

Measurement:
Transmission speed: 27.04 MiB/s

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agousb:udc:samsung: Allow burst transfers for non EP0 endpints
Lukasz Majewski [Wed, 5 Feb 2014 09:10:43 +0000 (10:10 +0100)]
usb:udc:samsung: Allow burst transfers for non EP0 endpints

This patch removed obscure restriction on the HW setting of DMA transfers.
Before this change each transaction sent up to 512 bytes (with packet count
equal to 1) for non EP0 transfer.

Now it is possible to setup DMA transaction up to DMA_BUFFER_SIZE.

Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`

Measurement:
Transmission speed: 20.74 MiB/s

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agousb:udc:samsung: Remove redundant cache operation from Samsung UDC driver
Lukasz Majewski [Wed, 5 Feb 2014 09:10:42 +0000 (10:10 +0100)]
usb:udc:samsung: Remove redundant cache operation from Samsung UDC driver

A set of cache operations (both invalidation and flush) were redundant
in the S3C HS OTG Samsung driver:

1. s3c_udc_ep0_zlp - to transmit EP0's ZLP packets one don't need to flush
the cache (since it is the zero length transmission)

2. s3c_udc_pre_setup and s3c_ep0_complete_out - cache invalidation is not
needed when the buffer for OUT EP0 transmission is setup, since no data
has yet arrived.

Cache cleanups presented above don't contribute much to transmission speed
up, hence shall be regarded as cosmetic changes.

3. setdma_rx - here the s3c UDC driver's internal buffers were invalidated.
This call is not needed anymore since we reuse the buffers passed from
gadgets. This is a key contribution to transmission speed improvement.

Test condition
- test HW + measurement: Trats - Exynos4210 rev.1
- test HW Trats2 - Exynos4412 rev.1
400 MiB compressed rootfs image download with `thor 0 mmc 0`

Measurements:

Base values (without improvement):
Transmission speed: 9.51 MiB/s

After the change:
Transmission speed: 10.15 MiB/s

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agousb:gadget:ums: Replace malloc calls with memalign to fix cache buffer alignment
Lukasz Majewski [Wed, 5 Feb 2014 09:10:41 +0000 (10:10 +0100)]
usb:gadget:ums: Replace malloc calls with memalign to fix cache buffer alignment

Calls to malloc() have been replaced by memalign. It now provides proper
buffer alignment.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
10 years agoconfig: Fix line lengths in include/config_distro_defaults.h
Tom Rini [Wed, 5 Feb 2014 13:04:38 +0000 (08:04 -0500)]
config: Fix line lengths in include/config_distro_defaults.h

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoserial: s5p: set automatically clears after resetting Rx FIFO
Inha Song [Tue, 4 Feb 2014 05:57:25 +0000 (14:57 +0900)]
serial: s5p: set automatically clears after resetting Rx FIFO

This patch fix the u-boot shell problem on TRATS2 board.
 - If hold the key while booting is in progress,
   white spaces are written in u-boot shell.

Set Automatically clears after resetting Rx FIFO.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos: pinmux: remove unnecessary routine
Minkyu Kang [Wed, 29 Jan 2014 08:04:17 +0000 (17:04 +0900)]
exynos: pinmux: remove unnecessary routine

Because of the list of peripherals is not sequential,
such a routine does not check for valid correctly.
Error check will be done when call the exynos_pinmux_config function.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
10 years agoexynos: pinmux: remove unnecessary define
Minkyu Kang [Wed, 29 Jan 2014 08:03:58 +0000 (17:03 +0900)]
exynos: pinmux: remove unnecessary define

The value of PERIPH_ID_COUNT was wrong, and unnecessary.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
10 years agoexynos: pinmux: sort the list of peripherals
Minkyu Kang [Wed, 29 Jan 2014 08:03:55 +0000 (17:03 +0900)]
exynos: pinmux: sort the list of peripherals

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Rajehswari Shinde <rajeshwari.s@samsung.com>
10 years agoconfig: add config_distro_defaults.h
Dennis Gilmore [Tue, 4 Feb 2014 11:25:47 +0000 (05:25 -0600)]
config: add config_distro_defaults.h

describe a set of default features that distros can rely on being available.
having this common definition means that distros can easily support systems
implementing them.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
10 years agocmd_pxe.c add any option for filesystem with sysboot uses generic load
Dennis Gilmore [Tue, 4 Feb 2014 11:25:46 +0000 (05:25 -0600)]
cmd_pxe.c add any option for filesystem with sysboot uses generic load

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
10 years agoMerge branch 'serial' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Tue, 4 Feb 2014 16:48:48 +0000 (11:48 -0500)]
Merge branch 'serial' of git://denx.de/git/u-boot-microblaze