project/bcm63xx/u-boot.git
9 years agoarm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:40 +0000 (18:06 +0200)]
arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD

When building a Thumb-1-only target with CONFIG_SYS_THUMB_BUILD,
some files fail to build, most of the time because they include
mcr instructions, which only exist for Thumb-2.

This patch introduces a Kconfig option CONFIG_THUMB2 and uses
it to select between Thumb-2 and ARM mode for the aforementioned
files.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agostm32f429-discovery: add CONFIG_SYS_THUMB_BUILD
Albert ARIBAUD [Fri, 23 Oct 2015 16:06:39 +0000 (18:06 +0200)]
stm32f429-discovery: add CONFIG_SYS_THUMB_BUILD

This target is ARMv7-M therefore can only build for Thumb,
but it did not #define CONFIG_SYS_THUMB_BUILD, so the U-Boot
code did not know it had to build for Thumb(2), not ARM.

This patch is binary-invariant: builds of stm32f429-discovery
with and without this patch were compared and found to differ
only by their U-Boot version strings.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
9 years agoarm: fix compile warnings when semihosting is enabled on ARMv7M target.
Vadzim Dambrouski [Mon, 19 Oct 2015 16:40:15 +0000 (19:40 +0300)]
arm: fix compile warnings when semihosting is enabled on ARMv7M target.

This patch fixes compile warnings like this:

warning: format '%lu' expects argument of type 'long unsigned int',
         but argument 5 has type 'size_t'

In C99 standard you can use %zu modifier to print size_t values.

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
9 years agoarm: add support for semihosting for ARMv7M targets
Vadzim Dambrouski [Mon, 19 Oct 2015 16:40:14 +0000 (19:40 +0300)]
arm: add support for semihosting for ARMv7M targets

If you enable CONFIG_SEMIHOSTING for STM32F429 target, you will get compile
error looking like this:

arch/arm/lib/semihosting.c: In function 'smh_read':
{standard input}: Assembler messages:
{standard input}:34: Error: invalid swi expression
{standard input}:34: Error: value of 1193046 too large for field of 2 bytes at 0
scripts/Makefile.build:277: recipe for target 'arch/arm/lib/semihosting.o' failed

The source of the problem is "svc #0x123456" instruction. This instruction
can not be encoded using Thumb2 instruction set used by ARMv7M CPUs.
ARM documentation suggests using "bkpt #0xAB" instruction instead [1].
This patch fixes compile errors and adds support for semihosting for
STM32F429 or any other ARMv7M target.
This change was sested on STM32F429-DISCOVERY board using OpenOCD and
"smhload" u-boot command.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html

Signed-off-by: Vadzim Dambrouski <pftbest@gmail.com>
9 years agoARM64: zynqmp: Sync zynq_sdhci_init() declaration
Michal Simek [Thu, 5 Nov 2015 16:06:29 +0000 (17:06 +0100)]
ARM64: zynqmp: Sync zynq_sdhci_init() declaration

This patch fix compilation error:
drivers/mmc/zynq_sdhci.c:16:5: error: conflicting types for
‘zynq_sdhci_init’
 int zynq_sdhci_init(phys_addr_t regbase)
     ^
In file included from drivers/mmc/zynq_sdhci.c:14:0:
./arch/arm/include/asm/arch/sys_proto.h:16:5: note: previous declaration
of ‘zynq_sdhci_init’ was here
 int zynq_sdhci_init(unsigned long regbase);
     ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-nios
Tom Rini [Fri, 6 Nov 2015 14:21:33 +0000 (09:21 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-nios

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Fri, 6 Nov 2015 14:17:17 +0000 (09:17 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

9 years agoMIPS: bootm: use CONFIG_IS_ENABLED() everywhere
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:15 +0000 (17:36 +0100)]
MIPS: bootm: use CONFIG_IS_ENABLED() everywhere

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoMIPS: bootm: rework and fix broken bootm code
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:14 +0000 (17:36 +0100)]
MIPS: bootm: rework and fix broken bootm code

The move to 'generic board' as well as changes in the generic
bootm code broke the boot of FIT uImage's. Especially uImage's
with additional initramfs images or FDT's do not work anymore.

Refactor the bootm code to work again with the generic bootm code.

Always relocate ramdisk and FDT in step 'bootm prep' because the
generic bootm code does this only for legacy uImage's.

Move the step 'bootm cmdline' to 'bootm prep' because the Linux
kernel parameters rd_start and rd_size have to be initialized after
the relocation of the ramdisk.

Furthermore support the step 'bootm fake'.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agocommon/board_f: enable setup_board_part1() for MIPS
Daniel Schwierzeck [Sun, 1 Nov 2015 16:36:13 +0000 (17:36 +0100)]
common/board_f: enable setup_board_part1() for MIPS

The variables bd_t:bi_memstart and bd_t:bi_memsize have to be
initialized also on MIPS. Otherwise LMB and cmd_bdinfo do not
correctly work. This currently breaks the booting of FIT images
on MIPS. Enable the board_init_f hook setup_board_part1()
for MIPS to fix this.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonet: altera_tse: get numbers of fdt address and size cells
Thomas Chou [Fri, 6 Nov 2015 01:37:17 +0000 (09:37 +0800)]
net: altera_tse: get numbers of fdt address and size cells

Get numbers of fdt address and size cells in altera_tse_probe(),
thereby remove the assumption of one address cell and one size
cell.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: altera_tse: use BIT macro
Thomas Chou [Fri, 6 Nov 2015 01:37:08 +0000 (09:37 +0800)]
net: altera_tse: use BIT macro

Replace numerical bit shift with BIT macro
in altera_tse

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: altera_tse: remove the useless parenthesis
Thomas Chou [Fri, 6 Nov 2015 01:36:52 +0000 (09:36 +0800)]
net: altera_tse: remove the useless parenthesis

Remove the useless parenthesis.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: altera_tse: fix packed and aligned attribute
Thomas Chou [Fri, 6 Nov 2015 01:36:41 +0000 (09:36 +0800)]
net: altera_tse: fix packed and aligned attribute

Fix packed and aligned attribute warnings.

WARNING: __packed is preferred over __attribute__((packed))
#14: FILE: drivers/net/altera_tse.h:14:
+#define __packed_1_    __attribute__ ((packed, aligned(1)))

WARNING: __aligned(size) is preferred over
__attribute__((aligned(size)))
#14: FILE: drivers/net/altera_tse.h:14:
+#define __packed_1_    __attribute__ ((packed, aligned(1)))

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: altera_tse: use data type u32 for regs and desc
Thomas Chou [Fri, 6 Nov 2015 01:36:26 +0000 (09:36 +0800)]
net: altera_tse: use data type u32 for regs and desc

Use data type u32/u16/u8 for regs and desc, as it is more
portable.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonet: altera_tse: remove unused macro and regs def
Thomas Chou [Fri, 6 Nov 2015 01:36:06 +0000 (09:36 +0800)]
net: altera_tse: remove unused macro and regs def

Remove unused macro and regs def.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agonios2: trim CONFIG_SYS_MEMTEST_END
Thomas Chou [Wed, 4 Nov 2015 05:25:20 +0000 (13:25 +0800)]
nios2: trim CONFIG_SYS_MEMTEST_END

Trim CONFIG_SYS_MEMTEST_END location.

CONFIG_SYS_MONITOR_LEN
  Reserving 256k for U-Boot at: d7fc0000
CONFIG_ENV_SIZE
CONFIG_SYS_MALLOC_LEN
  Reserving 256k for malloc() at: d7f80000
0x10000 for the rest
  Reserving 68 Bytes for Board Info at: d7f7ffbc
  Reserving 208 Bytes for Global Data at: d7f7feec
  Reserving 12000 Bytes for FDT at: d7f7d00c
  Stack

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: trim CONFIG_SYS_MALLOC_LEN
Thomas Chou [Wed, 4 Nov 2015 05:28:29 +0000 (13:28 +0800)]
nios2: trim CONFIG_SYS_MALLOC_LEN

Trim CONFIG_SYS_MALLOC_LEN size, because CONFIG_ENV_SIZE
is included to total memory allocation in common.h,

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agoaltera_uart: Adjust the declaration of debug_uart_init()
Thomas Chou [Tue, 3 Nov 2015 06:19:02 +0000 (14:19 +0800)]
altera_uart: Adjust the declaration of debug_uart_init()

Follow commit 97b059730218 ("debug_uart: Adjust the declaration of
debug_uart_init()")

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agoaltera_jtag_uart: Adjust the declaration of debug_uart_init()
Thomas Chou [Tue, 3 Nov 2015 06:18:27 +0000 (14:18 +0800)]
altera_jtag_uart: Adjust the declaration of debug_uart_init()

Follow commit 97b059730218 ("debug_uart: Adjust the declaration of
debug_uart_init()")

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agonios2: fix cached mode in clearing the BSS
Thomas Chou [Tue, 3 Nov 2015 05:52:15 +0000 (13:52 +0800)]
nios2: fix cached mode in clearing the BSS

As the generic board runs in cached mode, it should not use
"stwio" which bypass the cache.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agonios2: remove CONFIG_SYS_INIT_SP macro
Thomas Chou [Tue, 3 Nov 2015 05:47:02 +0000 (13:47 +0800)]
nios2: remove CONFIG_SYS_INIT_SP macro

Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to
below the u-boot code.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agonios2: remove CONFIG_SYS_MALLOC_BASE macro
Thomas Chou [Tue, 3 Nov 2015 05:31:09 +0000 (13:31 +0800)]
nios2: remove CONFIG_SYS_MALLOC_BASE macro

Remove CONFIG_SYS_MALLOC_BASE macro, as it is not used by
the generic board.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Chin Liang See <clsee@altera.com>
9 years agospi: altera_spi: minor clean up
Thomas Chou [Sat, 31 Oct 2015 12:55:48 +0000 (20:55 +0800)]
spi: altera_spi: minor clean up

- Remove the penultimate comma in of_match ids

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agomisc: altera_sysid: minor clean up
Thomas Chou [Sat, 31 Oct 2015 12:54:53 +0000 (20:54 +0800)]
misc: altera_sysid: minor clean up

- Remove the penultimate comma in of_match ids

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agotimer: altera_timer: minor clean up
Thomas Chou [Sat, 31 Oct 2015 12:54:16 +0000 (20:54 +0800)]
timer: altera_timer: minor clean up

- Moved macro definitions to top
- Remove the penultimate comma in of_match ids

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agotimer: altera_timer: use BIT macro
Thomas Chou [Thu, 29 Oct 2015 13:16:39 +0000 (21:16 +0800)]
timer: altera_timer: use BIT macro

Replace numerical bit shift with BIT macro
in altera_timer

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoserial: altera_uart: minor clean up
Thomas Chou [Sat, 31 Oct 2015 12:53:23 +0000 (20:53 +0800)]
serial: altera_uart: minor clean up

- Moved macro definitions to top
- Re-arrange header includes ascending order
- Remove unused header linux/compiler.h
- Remove the penultimate comma in of_match ids

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoserial: altera_uart: use BIT macro
Thomas Chou [Thu, 29 Oct 2015 13:18:01 +0000 (21:18 +0800)]
serial: altera_uart: use BIT macro

Replace numerical bit shift with BIT macro
in altera_uart

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoserial: altera_jtag_uart: minor clean up
Thomas Chou [Sat, 31 Oct 2015 12:52:38 +0000 (20:52 +0800)]
serial: altera_jtag_uart: minor clean up

- Moved macro definitions to top
- Give spaces around the '>>' in ALTERA_JTAG_WSPACE()
- Re-arrange header includes ascending order
- Remove unused header linux/compiler.h
- Remove the penultimate comma in of_match ids

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoserial: altera_jtag_uart: use BIT macro
Thomas Chou [Thu, 29 Oct 2015 13:09:31 +0000 (21:09 +0800)]
serial: altera_jtag_uart: use BIT macro

Replace numerical bit shift with BIT macro
in altera_jtag_uart

:%s/(1 << nr)/BIT(nr)/g
where nr = 0, 1, 2 .... 31

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agonios2: enable setexpr command in defconfig
Thomas Chou [Thu, 29 Oct 2015 08:33:23 +0000 (16:33 +0800)]
nios2: enable setexpr command in defconfig

Enable setexpr command in defconfig because it is really
useful as suggested by Marek.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: clean up macros that do not need a value in board header
Thomas Chou [Thu, 29 Oct 2015 08:43:46 +0000 (16:43 +0800)]
nios2: clean up macros that do not need a value in board header

Clean up macros that do not need a value as suggested by
Marek.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: use common sequence for reserve_uboot
Thomas Chou [Tue, 27 Oct 2015 03:23:39 +0000 (11:23 +0800)]
nios2: use common sequence for reserve_uboot

Use common sequence for reserve_uboot, as the result is
the same.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
9 years agonios2: use dram bank in board info
Thomas Chou [Tue, 27 Oct 2015 02:21:06 +0000 (10:21 +0800)]
nios2: use dram bank in board info

Use dram bank in board info, so that it displays correct
memory values in bdinfo command.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: change virt_to_phys to use physaddr_mask in global data
Thomas Chou [Tue, 27 Oct 2015 01:02:17 +0000 (09:02 +0800)]
nios2: change virt_to_phys to use physaddr_mask in global data

As virt_to_phys() is used a lot in DMA transfer, change it
to use physaddr_mask in global data. This will save an "if"
statement and get a little faster.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: remove the useless parenthesis in asm/io.h
Thomas Chou [Thu, 29 Oct 2015 13:00:32 +0000 (21:00 +0800)]
nios2: remove the useless parenthesis in asm/io.h

Remove the useless parenthesis in asm/io.h as suggested
by Marek.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agonios2: fix map_physmem to do real cache mapping
Thomas Chou [Tue, 27 Oct 2015 00:30:22 +0000 (08:30 +0800)]
nios2: fix map_physmem to do real cache mapping

Fix the map_physmem() to do real cache mapping.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Marek Vasut <marex@denx.de>
9 years agosf: Add SPI NOR protection mechanism
Fabio Estevam [Thu, 5 Nov 2015 14:43:42 +0000 (12:43 -0200)]
sf: Add SPI NOR protection mechanism

Many SPI flashes have protection bits (BP2, BP1 and BP0) in the
status register that can protect selected regions of the SPI NOR.

Take these bits into account when performing erase operations,
making sure that the protected areas are skipped.

Tested on a mx6qsabresd:

=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB
=> sf protect lock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
offset 0x3f0000 is protected and cannot be erased
SF: 65536 bytes @ 0x3f0000 Erased: ERROR
=> sf protect unlock  0x3f0000 0x10000
=> sf erase 0x3f0000 0x10000
SF: 65536 bytes @ 0x3f0000 Erased: OK

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
[re-worked to fit the lock common to dm and non-dm]
Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agosf: Add SPI protection mechanism from the kernel
Fabio Estevam [Thu, 5 Nov 2015 14:43:41 +0000 (12:43 -0200)]
sf: Add SPI protection mechanism from the kernel

Add the SPI NOR protection mechanism from the kernel.

This code is based on the work from
Brian Norris <computersforpeace@gmail.com>
Here is the commit details:
"mtd: spi-nor: refactor block protection functions"
(sha1: 62593cf40b23b523b9fc9334ca61ba6c595ebb09)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agopowerpc: Remove __ilog2_u64 and ffs4 from bitops
Fabio Estevam [Thu, 5 Nov 2015 14:43:40 +0000 (12:43 -0200)]
powerpc: Remove __ilog2_u64 and ffs4 from bitops

Remove __ilog2_u64 and ffs4 from powerpc bitops to align with the
kernel implementation.

Use the generic __ffs64 instead of a custom powerpc implementation.

Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agocompat: Remove is_power_of_2() definition
Fabio Estevam [Thu, 5 Nov 2015 14:43:39 +0000 (12:43 -0200)]
compat: Remove is_power_of_2() definition

Use the is_power_of_2() definition from log2.h to align with the
kernel implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agobitops: Add fls_long and __ffs64
Fabio Estevam [Thu, 5 Nov 2015 14:43:38 +0000 (12:43 -0200)]
bitops: Add fls_long and __ffs64

Add fls_long and __ffs64 support to align with the kernel bitops
implementation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoavr32: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:37 +0000 (12:43 -0200)]
avr32: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoarc: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:36 +0000 (12:43 -0200)]
arc: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agomips: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:35 +0000 (12:43 -0200)]
mips: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agonios2: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:34 +0000 (12:43 -0200)]
nios2: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agonds32: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:33 +0000 (12:43 -0200)]
nds32: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoopenrisc: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:32 +0000 (12:43 -0200)]
openrisc: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agosparc: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:31 +0000 (12:43 -0200)]
sparc: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agosandbox: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:30 +0000 (12:43 -0200)]
sandbox: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agomicroblaze: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:29 +0000 (12:43 -0200)]
microblaze: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agosh: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:28 +0000 (12:43 -0200)]
sh: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
9 years agoblackfin: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:27 +0000 (12:43 -0200)]
blackfin: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agom68k: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:26 +0000 (12:43 -0200)]
m68k: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agox86: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:25 +0000 (12:43 -0200)]
x86: Use the generic bitops headers

Use the generic bitops and also add custom __ffs() implementation
as per the kernel.

Also align the ffs() implementation with the kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoARM: Use the generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:24 +0000 (12:43 -0200)]
ARM: Use the generic bitops headers

The generic bitops headers are required when calling logarithmic
functions, such as ilog2().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoinclude: Add generic bitops headers
Fabio Estevam [Thu, 5 Nov 2015 14:43:23 +0000 (12:43 -0200)]
include: Add generic bitops headers

Use the generic bitops header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
9 years agoinclude: Add log2 header from the kernel
Fabio Estevam [Thu, 5 Nov 2015 14:43:22 +0000 (12:43 -0200)]
include: Add log2 header from the kernel

Use the log2 header files from the kernel.

Imported from kernel 4.2.3.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Tom Rini [Thu, 5 Nov 2015 12:47:21 +0000 (07:47 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-video

9 years agoMerge git://git.denx.de/u-boot-samsung
Tom Rini [Thu, 5 Nov 2015 12:46:45 +0000 (07:46 -0500)]
Merge git://git.denx.de/u-boot-samsung

9 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 5 Nov 2015 12:46:37 +0000 (07:46 -0500)]
Merge git://git.denx.de/u-boot-usb

9 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 5 Nov 2015 12:46:28 +0000 (07:46 -0500)]
Merge git://git.denx.de/u-boot-socfpga

9 years agovideo: Drop DEV_EXT_VIDEO flag
Bin Meng [Wed, 4 Nov 2015 07:23:38 +0000 (23:23 -0800)]
video: Drop DEV_EXT_VIDEO flag

DEV_EXT_VIDEO does not have any actual meaning, hence drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agovideo: Drop DEV_FLAGS_SYSTEM flag
Bin Meng [Wed, 4 Nov 2015 07:23:37 +0000 (23:23 -0800)]
video: Drop DEV_FLAGS_SYSTEM flag

DEV_FLAGS_SYSTEM does not have any actual meaning, hence drop it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
9 years agosandbox: adc: Add missing header file
Przemyslaw Marczak [Wed, 4 Nov 2015 17:30:09 +0000 (18:30 +0100)]
sandbox: adc: Add missing header file

Commit: sandbox: add ADC driver

adds the driver without its main header file.
It causes build brake for sandbox_defonfig.

This commit adds a missing header:
- include/sandbox-adc.h

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 years agoarm: dts: socfpga: Increase the spi-max-frequency for QSPI flash
Chin Liang See [Sat, 17 Oct 2015 13:32:56 +0000 (08:32 -0500)]
arm: dts: socfpga: Increase the spi-max-frequency for QSPI flash

With a working QSPI calibration, the SCLK can now run up to 100MHz

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agospi: cadence_qspi: Ensure check for max frequency in place
Chin Liang See [Sat, 17 Oct 2015 13:32:38 +0000 (08:32 -0500)]
spi: cadence_qspi: Ensure check for max frequency in place

Ensure the intended SCLK frequency not exceeding the maximum
frequency. If that happen, SCLK will set to maximum frequency.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
9 years agospi: cadence_qspi: Fix fdt read of spi-max-frequency
Chin Liang See [Sat, 17 Oct 2015 13:32:14 +0000 (08:32 -0500)]
spi: cadence_qspi: Fix fdt read of spi-max-frequency

Fix the fdt read for spi-max-frequency as it's contained
in the child node. Current state of code is always
returning default value.

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Pavel Machek <pavel@denx.de>
9 years agospi: cadence_qspi: Ensure spi_calibration is run when sclk change
Chin Liang See [Sat, 17 Oct 2015 13:31:55 +0000 (08:31 -0500)]
spi: cadence_qspi: Ensure spi_calibration is run when sclk change

Ensuring spi_calibration is run when there is a change of sclk
frequency. This will ensure the qspi flash access works for high
sclk frequency

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Jagan Teki <jteki@openedev.com>
9 years agolib, fdt: Adding fdtdec_get_uint function
Chin Liang See [Sat, 17 Oct 2015 13:30:32 +0000 (08:30 -0500)]
lib, fdt: Adding fdtdec_get_uint function

Adding fdtdec_get_uint function which is the
unsigned version for fdtdec_get_int

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Dinh Nguyen <dinh.linux@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Heiko Schocher <hs@denx.de>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Wed, 4 Nov 2015 23:30:51 +0000 (18:30 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

9 years agompc85xx: Add support for the Varisys Cyrus board
Andy Fleming [Wed, 4 Nov 2015 21:48:32 +0000 (15:48 -0600)]
mpc85xx: Add support for the Varisys Cyrus board

This board runs a P5020 or P5040 chip, and utilizes
an EEPROM with similar formatting to the Freescale P5020DS.

Large amounts of this code were developed by
Adrian Cox <adrian at humboldt dot co dot uk>

Signed-off-by: Andy Fleming <afleming@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agortc: Add MCP79411 support to DS1307 rtc driver
Andy Fleming [Wed, 21 Oct 2015 23:59:06 +0000 (18:59 -0500)]
rtc: Add MCP79411 support to DS1307 rtc driver

The code is from Adrian Cox, and is patterned after similar
support in Linux (drivers/rtc/rtc-ds1307.c:1121-1135). This
chip is used on the Cyrus board from Varisys.

Signed-off-by: Andy Fleming <afleming@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoARM: zynq: Remove zc70x target
Michal Simek [Fri, 30 Oct 2015 14:05:54 +0000 (15:05 +0100)]
ARM: zynq: Remove zc70x target

Remove zc70x target which was one setting for zc702 and zc706.
Currently zc702 and zc706 are separated.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
9 years agoarm: zynq: Move serial driver to driver model
Simon Glass [Sun, 18 Oct 2015 01:41:27 +0000 (19:41 -0600)]
arm: zynq: Move serial driver to driver model

Update this driver to use driver model and change all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: zynq: serial: Drop non-device-tree serial driver portions
Simon Glass [Sun, 18 Oct 2015 01:41:26 +0000 (19:41 -0600)]
arm: zynq: serial: Drop non-device-tree serial driver portions

Since we use device tree in SPL also, we can drop this code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynqmp: Enable DM and OF binding
Michal Simek [Sun, 18 Oct 2015 01:41:25 +0000 (19:41 -0600)]
ARM: zynqmp: Enable DM and OF binding

SPI requires DM and OF that's why enable DM for ZynqMP
and start to use configuration based on embedded OF.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoarm: zynq: dts: Add U-Boot device tree additions
Simon Glass [Sun, 18 Oct 2015 01:41:24 +0000 (19:41 -0600)]
arm: zynq: dts: Add U-Boot device tree additions

We need to mark some device tree nodes so that they are available before
relocation. This enables driver model to find these automatically. In the
case of SPL it ensures that these nodes will be retained in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodm: arm: zynq: Enable device tree control in SPL
Simon Glass [Sun, 18 Oct 2015 01:41:23 +0000 (19:41 -0600)]
dm: arm: zynq: Enable device tree control in SPL

Move to using device tree control in SPL so that we can use the same driver
code in both SPL and U-Boot proper.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: zynq: Support the debug UART
Simon Glass [Sun, 18 Oct 2015 01:41:22 +0000 (19:41 -0600)]
arm: zynq: Support the debug UART

Add support for the debug UART to assist with early debugging. Enable it
for Zybo as an example.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: zynq: Drop unnecessary code in SPL board_init_f()
Simon Glass [Sun, 18 Oct 2015 01:41:21 +0000 (19:41 -0600)]
arm: zynq: Drop unnecessary code in SPL board_init_f()

Move to the new way of starting up SPL. Clearing of BSS and calling
board_init_r() is now handled by crt0.S.

Also tidy up the header include order.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: zynq: Use separate device tree instead of embedded
Simon Glass [Sun, 18 Oct 2015 01:41:20 +0000 (19:41 -0600)]
arm: zynq: Use separate device tree instead of embedded

Production boards should not use CONFIG_OF_EMBED. Fix this for the Zybo
boards.

The image to use now becomes u-boot-dtb.bin.

For example, the .bif file should contain a line like:

  [load = 0x04000000,startup=0x04000000]/path/to/u-boot-dtb.bin

instead of:

  [load = 0x04000000,startup=0x04000000]/path/to/u-boot.bin

When device tree is enabled we need to load u-boot-dtb.img. Change the
settings so that SPL does the right thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodm: spl: Support device tree when BSS is in a different section
Simon Glass [Sun, 18 Oct 2015 01:41:19 +0000 (19:41 -0600)]
dm: spl: Support device tree when BSS is in a different section

At present in SPL we place the device tree immediately after BSS. This
avoids needing to copy it out of the way before BSS can be used. However on
some boards BSS is not placed with the image - e.g. it can be in RAM if
available.

Add an option to tell U-Boot that the device tree should be placed at the
end of the image binary (_image_binary_end) instead of at the end of BSS.

Note: A common reason to place BSS in RAM is to support the FAT filesystem.
We should update the code so that it does not use so much BSS.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodm: spl: Generate u-boot-spl-dtb.bin only when enabled
Simon Glass [Sun, 18 Oct 2015 01:41:18 +0000 (19:41 -0600)]
dm: spl: Generate u-boot-spl-dtb.bin only when enabled

At present this file is generated even when device tree is not enabled in
SPL. Avoid this, since this file serves no purpose in that case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agodm: serial: Deal with stdout-path with an alias
Simon Glass [Sun, 18 Oct 2015 01:41:17 +0000 (19:41 -0600)]
dm: serial: Deal with stdout-path with an alias

Sometimes stdout-path contains a UART alias along with speed, etc. For
example:

stdout-path = "serial0:115200n8";

Add support for decoding this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofdtgrep: Simplify the alias generation code
Simon Glass [Sun, 18 Oct 2015 01:41:16 +0000 (19:41 -0600)]
fdtgrep: Simplify the alias generation code

We don't need to allocate a new region list when we run out of space.
The outer function can take care of this for us.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofdt: Correct handling of alias regions
Simon Glass [Sun, 18 Oct 2015 01:41:15 +0000 (19:41 -0600)]
fdt: Correct handling of alias regions

At present the last four bytes of the alias region are dropped in
the case where the last alias is included. This results in a corrupted
device tree. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofdt: Add a function to look up a /chosen property
Simon Glass [Sun, 18 Oct 2015 01:41:14 +0000 (19:41 -0600)]
fdt: Add a function to look up a /chosen property

It is sometimes useful to find a property in the chosen node. Add a function
for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: zynqmp: Add DTS for ep108 board
Michal Simek [Fri, 30 Oct 2015 14:39:18 +0000 (15:39 +0100)]
ARM: zynqmp: Add DTS for ep108 board

Add DTS for ep108 board.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Series-to: u-boot
9 years agozynq-common: Define CONFIG_SYS_I2C_ZYNQ based on board config
Siva Durga Prasad Paladugu [Wed, 28 Oct 2015 05:49:08 +0000 (11:19 +0530)]
zynq-common: Define CONFIG_SYS_I2C_ZYNQ based on board config

Enable CONFIG_SYS_I2C_ZYNQ only if it has either I2C0 or I2C1
enabled in a board config.This fixes the issue of i2c error
during board init if board specific doesnt have either I2C0
or I2C1.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoarm: socfpga: reset: correct dma, qspi, and sdmmc reset bit defines
Dinh Nguyen [Mon, 2 Nov 2015 23:11:21 +0000 (17:11 -0600)]
arm: socfpga: reset: correct dma, qspi, and sdmmc reset bit defines

The DMA, QSPI, and SD/MMC reset bits are located in the permodrst register,
not the mpumodrst. So the bank for these reset bits should be 1, not 0.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
9 years agousb: udc: Fix warnings on 64-bit builds
Michal Simek [Fri, 30 Oct 2015 15:21:30 +0000 (16:21 +0100)]
usb: udc: Fix warnings on 64-bit builds

Cast u32 bit value to 64bit before recasting to 64bit pointer to avoid
pointer from integer cast size mismatch warnings.

Warning log:
+../drivers/usb/gadget/udc/udc-core.c: In function
‘usb_gadget_unmap_request’:
+../drivers/usb/gadget/udc/udc-core.c:68:19: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agousb: lthor: Specify correct parameter for sizeof type
Michal Simek [Fri, 30 Oct 2015 15:19:43 +0000 (16:19 +0100)]
usb: lthor: Specify correct parameter for sizeof type

This patch removes this warning:
  CC      drivers/usb/gadget/f_thor.o
drivers/usb/gadget/f_thor.c: In function ‘thor_tx_data’:
drivers/usb/gadget/f_thor.c:572:2: warning: format ‘%d’ expects argument
of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
  debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__,
  ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agousb: dwc3: Fix warnings on 64-bit builds
Michal Simek [Fri, 30 Oct 2015 15:24:06 +0000 (16:24 +0100)]
usb: dwc3: Fix warnings on 64-bit builds

Change aritmentics to use 64bit types to be compatible with 64bit
builds.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoARM: dra7xx_evm: Add DFU support for qspi flash
Vignesh R [Tue, 20 Oct 2015 09:52:01 +0000 (15:22 +0530)]
ARM: dra7xx_evm: Add DFU support for qspi flash

This adds support to update firmware on qspi flash using DFU.

On device:
=> setenv dfu_alt_info ${dfu_alt_info_qspi}
=> dfu 0 sf 0:0

On host:
$ sudo dfu-util -l
$ sudo dfu-util -D MLO -a MLO
$ sudo dfu-util -D u-boot.img -a u-boot.img

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agodfu: dfu_sf: Pass duplicate devstr to parse_dev
Vignesh R [Tue, 20 Oct 2015 09:52:00 +0000 (15:22 +0530)]
dfu: dfu_sf: Pass duplicate devstr to parse_dev

parse_dev() alters the string pointed by devstr parameter. Due to this
subsequent parsing of sf entities will fail, as string pointed by devstr
is no longer valid sf dev arguments.
Fix this by passing pointer to the copy of the string to parse_dev
instead of pointer to the actual devstr.

Signed-off-by: Vignesh R <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
9 years agoohci: Add missing cache-flush for hcca area
Hans de Goede [Tue, 20 Oct 2015 16:39:29 +0000 (18:39 +0200)]
ohci: Add missing cache-flush for hcca area

We need to cache-flush the hcca area after the initial memset, otherwise
on the first hc_interrupt we might see an old $random value as done_head and
try to interpret that as the address for a completed td (followed by chaos).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agocommon/usb_storage.c: Clean up usb_storage_probe()
Tom Rini [Sun, 11 Oct 2015 11:26:27 +0000 (07:26 -0400)]
common/usb_storage.c: Clean up usb_storage_probe()

We have the protocol and subclass variables which are used only in
disabled debug code.  This code dates back to the initial git import and
seemingly dead code so remove it.

This was detected by Coverity (CID 131117)

Signed-off-by: Tom Rini <trini@konsulko.com>
9 years agoarm: at91: reworked meesc board support
Daniel Gorsulowski [Mon, 2 Nov 2015 06:59:49 +0000 (07:59 +0100)]
arm: at91: reworked meesc board support

Signed-off-by: Daniel Gorsulowski <daniel.gorsulowski@esd.eu>