Commit Graph

22091 Commits

Author SHA1 Message Date
Paul Burton 62715a2c57 pcnet: enable the NOUFLO feature
On relatively slow boards (such as the MIPS Malta with an FPGA core
card) it can be extremely common for transmits to underflow - to the
point where it appears they simply do not work at all. Setting the
NOUFLO bit causes the ethernet controller to not begin transmission on
the wire until a transmit start point is reached. Setting that transmit
start point to the full packet will cause the controller to only
transmit the packet once it has buffered it entirely thus preventing any
transmit underflows from occuring and allowing the controller to
function on slower boards.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-09 17:21:01 +01:00
Paul Burton f3ac866c78 pcnet: add cache flushing & invalidation
Ensure that the view of memory from the CPU & the ethernet controller is
coherent at the various points where they exchange data. This prevents
stale data from being transmitted or received, and prevents the driver
from getting stuck waiting for the ethernet controller to update
descriptors when in reality it has but the old values are being read
from cache.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-09 17:21:01 +01:00
Paul Burton a95400411b pcnet: s/le16_to_cpu/cpu_to_le16/ in pcnet_send
This should cause no change to the generated code, but is semantically
correct.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-09 17:21:01 +01:00
Paul Burton 6011dabd0a pcnet: code style cleanup
Fix up the code to match Documentation/CodingStyle. This is mostly
removing extraneous spaces.

No functional change is intended.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-09 17:21:01 +01:00
Paul Burton fa476f75bf mips32: detect L1 cache sizes if they're not defined
For boards such as the MIPS Malta with an FPGA core card it is desirable
to be able to detect the L1 cache sizes at runtime, since they are not
dependant upon the board but on the FPGA bitstream in use. This patch
performs that detection when the CONFIG_SYS_[DI]CACHE_SIZE macros are
not defined by the board configuration. In cases where the sizes are
detected this patch also removes the restriction that the I-cache &
D-cache line sizes must be the same, as this is not necessarily true.

If the cache sizes are defined by a configuration then they will be
hardcoded as before, so this patch will not add overhead to such
boards.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-09 17:21:01 +01:00
Tom Rini 15c5cdf5aa Merge branch 'master' of git://www.denx.de/git/u-boot-usb 2013-11-08 15:25:29 -05:00
Rob Herring 28c860b23f sandbox: convert to common time functions
Convert sandbox to use common time functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-11-08 15:25:14 -05:00
Rob Herring 65ba7add0d time: add weak annotation to timer_read_counter declaration
A weak annotation is needed in order to prevent link errors when
get_ticks is overridden. This fixes sandbox build.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-11-08 15:25:14 -05:00
Suriyan Ramasami efd9bb9c02 netconsole loses 2nd character of input
Netconsole loses the second character when used as input by
either setenv stdin nc or setenv stdin serial,nc if using CONSOLE_CONSOLE_MUX

Before a nc_send_packet() to echo the input, a check is done to see if
nc_ether is valid. If its not, it waits for an arp request and then sends
the packet (which contains the first character of line to be displayed as
output). As part of reaping the arp request, the second character is consumed.
We protect this by making the call to NetLoop(NETCONS) between
input_recursion.

Signed-off-by: Suriyan Ramasami <suriyan.r@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2013-11-08 15:25:14 -05:00
Axel Lin a81630e0bf serial: s5p: Staticize local functions
Staticize local functions in s5p serial driver.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
2013-11-08 15:25:14 -05:00
Pierre Aubert 9a8323311c env: fix the env export varname
The env export command doesn't export the first variable of the list
since commit 5a31ea04c9
"env grep" - reimplement command using hexport_r()

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
2013-11-08 15:25:14 -05:00
Mark Langsdorf 2a19de42ec highbank: set AUTOBOOT_KEYED_CTRLC config option
Let highbank users break into the autoboot script with ctrl-c.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
2013-11-08 15:25:14 -05:00
Mark Langsdorf 00ddacc1a1 autoboot: add an option to override keyed autoboot
As originally implemented, setting the AUTOBOOT_KEYED config option will
prevent users from breaking into the autoboot script with ctrl-c. Restore
that option with a new config symbol.

Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
2013-11-08 15:25:14 -05:00
Axel Lin 212d7dadcd serial: xuartlite: Staticize local functions
Staticize local functions in xuartlite driver.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Stefan Roese <sr@denx.de>
Tested-by: Michal Simek <monstr@monstr.eu>
2013-11-08 15:25:13 -05:00
Axel Lin f601624ecd serial: mxs_auart: Staticize local functions
Staticize local functions in mxs_auart driver.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
2013-11-08 15:25:13 -05:00
Piotr Wilczek 73dc8328c3 fs:fat: fix set file name function
Curently memcpy copies string without null terminating char because
function strlen returns only number of characters excluding
null terminating character. Replace memcpy with strcpy.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Tom Rini <trini@ti.com>
2013-11-08 15:25:13 -05:00
Luka Perkov 01adbce2aa cmd_zfs: normalize 'file not found' errors
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-11-08 15:25:13 -05:00
Luka Perkov 2e18cb267a cmd_reiser: normalize 'file not found' errors
Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-11-08 15:25:13 -05:00
Tim Harvey 7cdebc3289 cmd_ubifs: normalize 'file not found' errors
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2013-11-08 15:25:13 -05:00
Masahiro Yamada 643aae1406 include: delete include/linux/config.h
Linux Kernel abolished include/linux/config.h long time ago.
(around version v2.6.18..v2.6.19)

We don't need to provide Linux copatibility any more.

This commit deletes include/linux/config.h
and fixes source files not to include this.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 15:25:13 -05:00
Egbert Eich 5d62314c1d config/sandbox: Add EFI and GPT support
Signed-off-by: Egbert Eich <eich@suse.com>
2013-11-08 15:25:13 -05:00
Egbert Eich f9cd3d3a2b config: Define HAVE_BLOCK_DEVICE when CONFIG_CMD_GPT is set
Signed-off-by: Egbert Eich <eich@suse.com>
2013-11-08 15:25:12 -05:00
Egbert Eich 619f0fdf37 cmd/gpt: Support gpt command for all devices
The gpt command was only implemented for mmc devices. There is no reason
why this command should not be generalized and be applied all other
storage device classes.
This change both simplifies the implementation and eliminates a
build failure for systems that don't support mmcs.

Signed-off-by: Egbert Eich <eich@suse.com>
Tested-by: Piotr Wilczek <p.wilczek@samsung.com>
[trini: Change coding style slightly]
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-08 15:25:12 -05:00
Masahiro Yamada 9e22408053 cosmetic: UDM-net: clean up the remainders of dead driver
This commit omits non-existing drivers/net/netarm_eth.c from the list.
This driver is deleted by commit b411eb30f.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 15:25:12 -05:00
Masahiro Yamada d7dd4fffde cosmetic: UDM-serial: clean up the remainders of dead driver
The following serial drivers do not exist any more.

 - ns9750_serial.c: deleted by commit 4cfc611b4
 - s3c4510b_uart.c: deleted by commit afad40299
 - serial_clps7111.c: deleted by commit f2e080156
 - serial_netarm.c: deleted by commit b411eb30f

This commit cleans up UDM-serial.txt.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 15:25:12 -05:00
Masahiro Yamada 566c6e4370 cosmetic: doc: driver-model: Do not number driver lists
Everytime a dead driver is removed from the list,
we must re-number. This is a painful task.

Try
  git show e53232250 -- doc/driver-model/UDM-serial.txt
  git show 6f62f4207 -- doc/driver-model/UDM-serial.txt
  git show b9f4bc34a -- doc/driver-model/UDM-serial.txt
to see what I mean.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 15:25:12 -05:00
Bo Shen 47d79deb99 usb: dfu: make nand upload working
Nowhere pass a value to len, which always 0, make no transfer which
cause uploading failed.

This patch make nand upload working. However it needs enough malloc
buffer to store read data, that means the buffer at least equal to
the upload partition size, or else it doesn't work.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
2013-11-08 20:46:20 +01:00
Heiko Schocher ec9002e4fa usb, g_dnl: make iSerialNumber board configurable
add the possibility to set the iSerialNumber board specific.
Default value for iSerialNumber is 0x0. This value can
changed board specific through the new function
g_dnl_set_serialnumber() which must be called from the
board specific function g_dnl_bind_fixup().

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
2013-11-08 20:46:20 +01:00
Bo Shen 31bae4c5d9 usb: dfu: correct dfu buffer inited value
After dfu buffer is initialized, the buffer should be all available,
while not 0. Initialize its value to min(dfu_buf_size, dfu->r_left).

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
2013-11-08 20:46:20 +01:00
Bo Shen c2617bc773 usb: dfu: decrease dfu->r_left along with the transfer
The value of dfu->r_left need decrease along with the transfer

Signed-off-by: Bo Shen <voice.shen@atmel.com>
2013-11-08 20:46:20 +01:00
Mateusz Kulikowski 522c95647d usb: ohci-hcd: submit_common_msg: report actual_length properly
submit_common_msg should report amount of data passed from/to device.
Instead, it always returned size requested by Host.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
2013-11-08 20:46:19 +01:00
Przemyslaw Marczak 351e9b2069 usb: ums: add ums exit feature by ctrl+c or by detach usb cable
This patch allows exiting from UMS mode to u-boot prompt
by detaching usb cable or by pressing ctrl+c.

Add new config: CONFIG_USB_CABLE_CHECK. If defined then board
file should provide function: usb_cable_connected() (include/usb.h)
that return 1 if cable is connected and 0 otherwise.

Changes v2:
- add a note to the README

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2013-11-08 20:46:19 +01:00
Przemyslaw Marczak 4b19ed6c76 usb: ums: move ums code from trats to Samsung common directory
UMS init was implemented in trats board file but mostly it comprises
common code. Due to that it has been moved to common/ums.c to avoid
code duplication in the future.

Changes:
- move ums initialization code from trats to common/ums.c
- remove unused CONFIG_USB_GADGET_MASS_STORAGE from trats.h

Changes v2:
- move this patch at the top of code cleanups patches

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Minkyu Kang <mk7.kang@samsung.com>
2013-11-08 20:46:19 +01:00
Przemyslaw Marczak 0697f206df usb: ums: fix disk capacity miscalculation and code cleanup
This patch prevents:
- ums disk capacity miscalculation because of integer overflow

Changes v2:
- Prevents passing zero size disk capacity to ums gadget driver
- Change function ums_get_capacity() to ums_disk_init() and do ums disk
  initialization before gadget init
- Remove unnecessary code from mass storage driver

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2013-11-08 20:46:19 +01:00
Przemyslaw Marczak f4dacf7b95 usb: ums: allows using every mmc device with ums.
Before this change ums command only allowed use of mmc 0.
Now this argument can be set.

Changes:
- remove mmc device number checking because it is always positive number
- remove printing "no such device" - it is done by find_mmc_device()

Change-Id: I767e45151ad515c7bef19e6c13087374f5e23c11
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marex@denx.de>
2013-11-08 20:46:19 +01:00
Przemyslaw Marczak 93c813b3ac usb: ums: code refactoring to improve reusability on other boards.
This patch introduces some cleanups to ums code. Changes:

ums common:
- introduce UMS_START_SECTOR and UMS_NUM_SECTORS as defined in
  usb_mass_storage.h both default values as 0 if board config
  doesn't define them

common cleanup changes:
- change name of struct "ums_board_info" to "ums"
- "ums_device" fields are moved to struct ums and "dev_num" is removed
- change function name: board_ums_init to ums_init
- remove "extern" prefixes from usb_mass_storage.h

cmd_usb_mass_storage:
- change error() to printf() if need to print info message
- change return values to command_ret_t type at ums command code
- add command usage string

Changes v2:
ums common:
- always returns number of read/write sectors
- coding style clean-up
ums gadget:
- calculate amount of read/write from device returned value.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
2013-11-08 20:46:19 +01:00
Igor Grinberg 39d9abfa23 README: remove wrong config name
There is no CONFIG_PCA953X_INFO symbol.
U-Boot uses CONFIG_CMD_PCA953X_INFO instead, which is described in
"Monitor Functions" section and thus no need to be repeated in the
"GPIO Support" section.
Remove the whole line.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2013-11-08 09:41:37 -05:00
Masahiro Yamada 0f0f75774e cosmetic: remove empty lines at the top of file
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 09:41:37 -05:00
Miao Yan 5b629319cf common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions
In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
and "3d187b3: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
breaks other OSes (vxworks, netbsd, plan9,...) that don't support
subcommand processing, e.g. they all contain the following code in their
do_bootm_xxx():

    if (flag & BOOTM_STATE_OS_PREP)
            return 0;
    if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
            return 1;

which will result a "subcommand not supported" error.
This patch changes the above logic to:

    /* if not go command, pretend everything to be OK */
    if (flag != BOOTM_STATE_OS_GO)
         return 0;

Signed-off-by: Miao Yan <miao.yan@windriver.com>
2013-11-08 09:41:37 -05:00
Masahiro Yamada bb02c53660 Makefile: do not create a symbolic link to arch/${ARCH}/include/asm
In-tree build:
  - Do not create a symbolic link
      from include/asm to arch/${ARCH}/include/asm
  - Add ${SRCTREE}/arch/arm/include into the header search path

Out-of-tree build:
  - Do not create a directory ${OBJTREE}/include2
  - Do not create a symbolic link
      from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm
  - Add ${SRCTREE}/arch/arm/include into the header search path

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08 09:39:14 -05:00
Viktar Palstsiuk 7d9ec6a0af Add support for SX151x SPI GPIO Expanders
Signed-off-by: Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
2013-11-08 09:39:13 -05:00
Luka Perkov 3314204b66 boards.cfg: remove git leftovers
Remove 'HEAD' line which is most likely left there while rebasing. It was
introduced in commit 877bfe37dc.

Signed-off-by: Luka Perkov <luka@openwrt.org>
2013-11-08 09:38:24 -05:00
Paul Burton 7ec0cde292 boards.cfg: remove trailing whitespace
Commit 93e14596 "Coding Style cleanup: replace leading SPACEs by TABs"
added trailing whitespace to a single line of boards.cfg. I presume this
was unintentional, and it causes the file to change after running it
through the reformat.py script. Remove the offending character.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
2013-11-08 09:38:24 -05:00
Andrew Ruder 88733e2c65 cmd_nvedit.c: Add env exists command
env exists is a way to test (in hush) if an environment variable
exists.  A workaround existed using printenv but this new command
doesn't require all the stdout/stderr redirection to prevent
printing information to the screen.

Example:
$ set testexists 1
$ env exists testexists && echo "yes"
yes
$ env exists testexists || echo "no"
$ set testexists
$ env exists testexists && echo "yes"
$ env exists testexists || echo "no"
no
$

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 8948794a27 MAKEALL: rename boards_by_* functions to targets_by_*
We expect boards_by_* function to return the 7th filed, 'Target',
not the 6th field, 'Board name'.

So the function names, boards_by_* are a little misleading,
and should be renamed to targets_by_*.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 8e5a2d4257 MAKEALL: fix boards_by_field function
Commit 27af930e changed the boards.cfg format
and it changed boards_by_field() function incorrectly.
For tegra cpus it returned Board Name field,
not Target field.

This commit restores the behavior prior to 27af930e in the right way.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 54d1f5048a MAKEALL: fix a bug to use CROSS_COMPILE_<ARCH>
Commit 27af930e changed the boards.cfg format but
missed to change get_target_arch() fuction.
This commit adjusts it for CROSS_COMPILE_<ARCH>
to work correctly.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 23d6410c2d MAKEALL: fix awk warning message
If you do `./MAKEALL -M ` or `./MAKEALL -m`
GNU awk would display warnings like follows:

    awk: warning: escape sequence `\ ' treated as plain ` '

In the first place, we do not explicitly set the field separator.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 76512e0d84 sparc: include config.h to start.S
arch/sparc/cpu/leon3/start.S requires CONFIG_SYS_SPARC_NWINDOES
to be defined:

  #ifndef CONFIG_SYS_SPARC_NWINDOWS
  #error Must define number of SPARC register windows, default is 8
  #endif

But it missed to include <config.h>, which always ended up in compile error.

This commit fixes this problem.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
2013-11-08 09:38:24 -05:00
Masahiro Yamada 6dca9450a2 EP88x: remove remainders of dead board
Commit 1b0757e deleted the EP88x entry from boards.cfg file.
But it missed to remove include/configs/EP88x.h and board/ep88x/.

This commit removes them and adds EP88x to README.scrapyard.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
2013-11-08 09:38:24 -05:00