]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Fri, 23 Jan 2015 01:04:17 +0000 (20:04 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-uniphier
Tom Rini [Thu, 22 Jan 2015 16:24:11 +0000 (11:24 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-uniphier

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Thu, 22 Jan 2015 14:52:19 +0000 (09:52 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

9 years agoARM: UniPhier: add SG_MEMCONF macros for DDR channel 2
Masahiro Yamada [Wed, 21 Jan 2015 06:27:48 +0000 (15:27 +0900)]
ARM: UniPhier: add SG_MEMCONF macros for DDR channel 2

PH1-sLD3, PH1-LD6b have DDR channel 2.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: rename SG_MEMCONF_* macros for readability
Masahiro Yamada [Wed, 21 Jan 2015 06:27:47 +0000 (15:27 +0900)]
ARM: UniPhier: rename SG_MEMCONF_* macros for readability

Match the suffixes of SG_MEMCONF_* macros with SZ_* macros defined
by <linux/sizes.h> for readability.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: use <linux/sizes.h> for readability
Masahiro Yamada [Wed, 21 Jan 2015 06:27:46 +0000 (15:27 +0900)]
ARM: UniPhier: use <linux/sizes.h> for readability

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: remove non-sense inline directives
Masahiro Yamada [Wed, 21 Jan 2015 06:06:46 +0000 (15:06 +0900)]
ARM: UniPhier: remove non-sense inline directives

The inlining is done by GCC when needed, there is no need to do it
explicitly. Furthermore, the inline keyword does not force-inline
the code, but is only a hint for the compiler.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: add static to local functions
Masahiro Yamada [Wed, 21 Jan 2015 06:06:06 +0000 (15:06 +0900)]
ARM: UniPhier: add static to local functions

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: fix IECTRL set code for PH1-Pro4
Masahiro Yamada [Mon, 19 Jan 2015 13:31:10 +0000 (22:31 +0900)]
ARM: UniPhier: fix IECTRL set code for PH1-Pro4

For PH1-Pro4, the bit 6 of the IECTRL must be set.  It is the only
available bit in this register.  There is no effect of the write
access to the other bits.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: describe init_page_table shorter
Masahiro Yamada [Mon, 19 Jan 2015 13:30:23 +0000 (22:30 +0900)]
ARM: UniPhier: describe init_page_table shorter

The assembly directive ".rept ... .endr" allows us to write the
init_page_table much shorter.  To make things further simpler,
set the text and stack area as Normal Memory, and the other sections
as Device attribute.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: fix comments in SoC Glue init function
Masahiro Yamada [Tue, 13 Jan 2015 09:54:34 +0000 (18:54 +0900)]
ARM: UniPhier: fix comments in SoC Glue init function

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: remove __packed that causes a problem on GCC 4.9
Masahiro Yamada [Wed, 7 Jan 2015 10:41:38 +0000 (19:41 +0900)]
ARM: UniPhier: remove __packed that causes a problem on GCC 4.9

The DDR PHY training function, ddrphy_prepare_training() would not
work if compiled with GCC 4.9.

The struct ddrphy (arch/arm/include/asm/arch-uniphier/ddrphy-regs.h)
is specified with __packed because it represents a hardware register
mapping, but it turned out to cause a problem on GCC 4.9.

If -mno-unaligned-access is specified (yes, it is in
arch/arm/cpu/armv7/config.mk), GCC 4.9 is aware of the
__attribute__((packed)) and generates extra instructions to perform
the memory access in a way that does not cause unaligned access.
(Actually it is not need here because the register base, the first
argument of the ddrphy_prepare_training(), is always given with a
4-byte aligned address.)

Anyway, as a result, readl() / writel() is divided into byte-wise
accesses.  The problem is that this hardware only accepts 4-byte
register access.  Byte-wise accesses lead to unexpected behavior.

There are some options to avoid this problem.

[1] Remove -mno-unaligned-access
[2] Add __aligned(4) along with __packed to struct ddrphy
[3] Remove __packed from struct ddrphy

[1] solves the problem for ARMv7, but it does not for pre-ARMv6 and
ARMv6-M architectures where -mno-unaligned-access is default.
So, [1] does not seem reasonable in terms of code portability.

Both [2] and [3] work well, but [2] seems too much.  All the members
of struct ddrphy have the u32 type.  No padding would be inserted
even if __packed is dropped.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'next' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 22 Jan 2015 14:51:50 +0000 (09:51 -0500)]
Merge branch 'next' of git://www.denx.de/git/u-boot-microblaze

9 years agoMerge branch 'phys_t' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 22 Jan 2015 14:51:18 +0000 (09:51 -0500)]
Merge branch 'phys_t' of git://www.denx.de/git/u-boot-microblaze

9 years agoMerge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Thu, 22 Jan 2015 14:48:22 +0000 (09:48 -0500)]
Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze

9 years agosunxi: Restore lowlevel_init usage
Hans de Goede [Wed, 21 Jan 2015 15:24:05 +0000 (16:24 +0100)]
sunxi: Restore lowlevel_init usage

2 recent sunxi changes have removed the usage of lowlevel_init by moving some
code around and then setting CONFIG_SKIP_LOWLEVEL_INIT.
This is problematic for 2 reasons:

1) It does not just stop s_init from being called, it also stops
cpu_init_cp15 from getting called, which is undesirable.

2) We want u-boot.bin to be usable standalone, without SPL, some people e.g.
use an upstream u-boot.bin together with Allwinner's boot0 loader. So
u-boot.bin must (re)initialize the gpios, timer, etc.

This commit restores the lowlevel_init / s_init usage, while keeping the
changes to no longer use the global-data (gd) struct in the SPL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoboard/T1040rdb: Add VSC9953 support for T1040rdb board
Codrin Ciubotariu [Wed, 21 Jan 2015 09:54:12 +0000 (11:54 +0200)]
board/T1040rdb: Add VSC9953 support for T1040rdb board

This patch configures and initializes the L2 switch on T1040rdb board.
The external L2 switch ports may be connected to PHYs only over
QSGMII, for T1040rdb.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
9 years agoboard/T1040qds: Add VSC9953 support for T1040qds board
Codrin Ciubotariu [Wed, 21 Jan 2015 09:54:11 +0000 (11:54 +0200)]
board/T1040qds: Add VSC9953 support for T1040qds board

This patch configures and initializes the L2 switch on T1040QDS board.
The L2 switch ports must be initialized according to the SerDes
protocols.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
9 years agoboard/T104xrdb: T1040 FMAN ports FM1@DTSEC1 and FM1@DTSEC2 have no PHYs
Codrin Ciubotariu [Mon, 12 Jan 2015 12:08:37 +0000 (14:08 +0200)]
board/T104xrdb: T1040 FMAN ports FM1@DTSEC1 and FM1@DTSEC2 have no PHYs

Freescale's T1040qds board may be configured to have up to
5 FMAN ports (FM1@DTSEC1 to FM1@DTSEC5). From these 5 ports,
2 of them may be fixed-links (FM1@DTSEC1 annd FM1@DTSEC2),
connected to other two ports from an intergrated
VSC9953 L2 Switch (switch ports 8 and 9). These fixed-link
ports have no PHYs attatched, so they don't have a
corresponding MDIO.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/T1040qds: T1040 FMAN ports FM1@DTSEC1 and FM1@DTSEC2 have no PHYs
Codrin Ciubotariu [Mon, 12 Jan 2015 12:08:36 +0000 (14:08 +0200)]
board/T1040qds: T1040 FMAN ports FM1@DTSEC1 and FM1@DTSEC2 have no PHYs

Freescale's T1040qds board may be configured to have up to
5 FMAN ports (FM1@DTSEC1 to FM1@DTSEC5). From these 5 ports,
2 of them may be fixed-links (FM1@DTSEC1 annd FM1@DTSEC2),
connected to other two ports from an intergrated
VSC9953 L2 Switch (switch ports 8 and 9). These fixed-link
ports have no PHYs attatched, so they don't have a
corresponding MDIO.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/T1040qds: Fix lane-to-slot mapping for SerDes protocol 0x89
Codrin Ciubotariu [Mon, 12 Jan 2015 12:08:35 +0000 (14:08 +0200)]
board/T1040qds: Fix lane-to-slot mapping for SerDes protocol 0x89

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoarch/powerpc: Initialize VSC9953 L2 Switch
Codrin Ciubotariu [Wed, 21 Jan 2015 09:54:10 +0000 (11:54 +0200)]
arch/powerpc: Initialize VSC9953 L2 Switch

This patch initializes VSC9953 L2 Switch for boards that have
CONFIG_VSC9953 defined in their config file.

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
9 years agoMIPS: add support for pre-relocation malloc
Daniel Schwierzeck [Sun, 18 Jan 2015 21:18:39 +0000 (22:18 +0100)]
MIPS: add support for pre-relocation malloc

Implement MIPS specific setup of the gd_t structure to support
pre-relocation malloc. If CONFIG_SYS_MALLOC_F_LEN is specified,
a memory area will be reserved after the initial stack area and
the gd->malloc_base pointer will be initialized.

After this patch the new driver model can be used on MIPS.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: add support for CONFIG_SYS_INIT_SP_ADDR
Daniel Schwierzeck [Sun, 18 Jan 2015 21:18:38 +0000 (22:18 +0100)]
MIPS: add support for CONFIG_SYS_INIT_SP_ADDR

Support the existing config option CONFIG_SYS_INIT_SP_ADDR on
MIPS. This allows to move the initial stack to other places
than the beginning of RAM.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: add Kconfig option for CONFIG_SWAP_IO_SPACE
Daniel Schwierzeck [Sun, 18 Jan 2015 21:00:18 +0000 (22:00 +0100)]
MIPS: add Kconfig option for CONFIG_SWAP_IO_SPACE

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: replace $(CPU) with Kconfig symbols
Daniel Schwierzeck [Sun, 18 Jan 2015 20:59:35 +0000 (21:59 +0100)]
MIPS: replace $(CPU) with Kconfig symbols

Conditionally set head-y and lib-y with boolean Kconfig symbols
for selected CPU. This deprecates the usage of the $(CPU) variable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: use common code from lib/time.c
Thomas Langer [Wed, 14 Jan 2015 18:44:00 +0000 (18:44 +0000)]
MIPS: use common code from lib/time.c

The common code just needs the C0_COUNT as free running counter,
without the need of writing and checking C0_COMPARE.

The function get_tbclk() is still implemented here instead of changing
all places of CONFIG_SYS_MIPS_TIMER_FREQ to CONFIG_SYS_TIMER_RATE.

The change was tested on a MIPS32 system, but as the MIPS64 code
was/is the same, this should be no problem.

Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
9 years agoMIPS: bootm: add bootstage reporting
Daniel Schwierzeck [Wed, 14 Jan 2015 20:44:13 +0000 (21:44 +0100)]
MIPS: bootm: add bootstage reporting

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: bootm: prepare a flattened device tree for the kernel
Daniel Schwierzeck [Wed, 14 Jan 2015 20:44:13 +0000 (21:44 +0100)]
MIPS: bootm: prepare a flattened device tree for the kernel

Add the initial code to prepare a flattened device tree for
the kernel like relocating the FDT blob and fixing up the
/chosen and /memory nodes.

The final hand over to the kernel is not yet implemented. After
the community agreed on the MIPS boot interface for device trees,
the corresponding code will be added.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: bootm: add mem, rd_start and rd_size to kernel command line
Daniel Schwierzeck [Wed, 14 Jan 2015 20:44:13 +0000 (21:44 +0100)]
MIPS: bootm: add mem, rd_start and rd_size to kernel command line

If the user wants to boot a kernel without legacy environment,
information like memory size, initrd address and size should be
handed over to the kernel in the command line.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: bootm: refactor preparation of Linux kernel environment
Daniel Schwierzeck [Wed, 14 Jan 2015 20:44:13 +0000 (21:44 +0100)]
MIPS: bootm: refactor preparation of Linux kernel environment

Move preparation of Linux kernel environment in a separate
function and mark it as legacy. Add a Kconfig option to make
that legacy mode configurable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agoMIPS: bootm: refactor preparation of Linux kernel command line
Daniel Schwierzeck [Wed, 14 Jan 2015 20:44:13 +0000 (21:44 +0100)]
MIPS: bootm: refactor preparation of Linux kernel command line

Move preparation of Linux kernel command line in a separate
function and mark it as legacy. Add a Kconfig option to make
that legacy mode configurable.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agomicroblaze: Support stack protection feature
Michal Simek [Tue, 4 Nov 2014 12:30:14 +0000 (13:30 +0100)]
microblaze: Support stack protection feature

Ensure that stack didn't rewrite important part
of u-boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agommc: zynq: Use phys_addr_t for addresses
Michal Simek [Wed, 14 Jan 2015 15:11:47 +0000 (16:11 +0100)]
mmc: zynq: Use phys_addr_t for addresses

phys_addr_t is designed for physical addresses that's why
use it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: ll_temac: Fix compilation warning because of phys_addr_t
Michal Simek [Thu, 15 Jan 2015 17:52:32 +0000 (18:52 +0100)]
net: ll_temac: Fix compilation warning because of phys_addr_t

This patch fix the compilation warning
w+../drivers/net/xilinx_ll_temac.c: In function 'll_temac_init':
w+../drivers/net/xilinx_ll_temac.c:235:3: warning: format '%X' expects
argument of type 'unsigned int', but argument 4 has type 'phys_addr_t'
[-Wformat]
introduced by
"net: Declare physical address as phys_addr_t unsigned type"
(sha1: 16ae7827226ce8b255245d1932e8069f00997a26).

Reported-by: Tom Rini <trini@ti.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agonet: gem: Use phys_addr_t instead of int for addresses
Michal Simek [Wed, 14 Jan 2015 14:44:21 +0000 (15:44 +0100)]
net: gem: Use phys_addr_t instead of int for addresses

Use phys_addr_t for physical address declaration.
It is also unsigned type instead of sign.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: zynqpl: Add support for zc7035
Siva Durga Prasad Paladugu [Tue, 25 Nov 2014 09:59:54 +0000 (15:29 +0530)]
fpga: zynqpl: Add support for zc7035

Added support for zc7035

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: xilinx: Show fpga info if defined
Michal Simek [Wed, 16 Jul 2014 08:36:42 +0000 (10:36 +0200)]
fpga: xilinx: Show fpga info if defined

Show fpga_op->info even if desc->iface_fns is not defined.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agofpga: xilinx: Check if fpga operations are defined
Michal Simek [Wed, 16 Jul 2014 08:31:21 +0000 (10:31 +0200)]
fpga: xilinx: Check if fpga operations are defined

Ensure that operations are correctly setup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agofpga: xilinx: zynqpl: Setup NULL fpga_op without driver
Michal Simek [Wed, 16 Jul 2014 08:47:13 +0000 (10:47 +0200)]
fpga: xilinx: zynqpl: Setup NULL fpga_op without driver

Set fpga operations to NULL for cases where
FPGA is setup in board file but driver is not added

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: xilinx: virtex2: Fix macro indentation
Michal Simek [Wed, 16 Jul 2014 08:47:43 +0000 (10:47 +0200)]
fpga: xilinx: virtex2: Fix macro indentation

No functional changes.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: xilinx: virtex2: Setup NULL fpga_op without driver
Michal Simek [Wed, 16 Jul 2014 08:48:08 +0000 (10:48 +0200)]
fpga: xilinx: virtex2: Setup NULL fpga_op without driver

Set fpga operations to NULL for cases where
FPGA is setup in board file but driver is not added

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: xilinx: spartan3: Setup NULL fpga_op without driver
Michal Simek [Wed, 16 Jul 2014 08:46:35 +0000 (10:46 +0200)]
fpga: xilinx: spartan3: Setup NULL fpga_op without driver

Set fpga operations to NULL for cases where
FPGA is setup in board file but driver is not added.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: xilinx: spartan2: Setup NULL fpga_op without driver
Michal Simek [Wed, 16 Jul 2014 08:43:47 +0000 (10:43 +0200)]
fpga: xilinx: spartan2: Setup NULL fpga_op without driver

Set fpga operations to NULL for cases where
FPGA is setup in board file but driver is not added.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: Export fpga_get_desc for SPL
Michal Simek [Tue, 13 Jan 2015 15:09:53 +0000 (16:09 +0100)]
fpga: Export fpga_get_desc for SPL

SPL needs to detect FPGA device which will be used
for loading bitstream.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: Remove extern prototypes from .h
Michal Simek [Wed, 14 Jan 2015 08:59:00 +0000 (09:59 +0100)]
fpga: Remove extern prototypes from .h

This problem is reported by checkpatch.pl
Warnings:
CHECK: extern prototypes should be avoided in .h files

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agofpga: Protect GZIP usage when LOADMK is enabled
Michal Simek [Wed, 16 Jul 2014 08:30:50 +0000 (10:30 +0200)]
fpga: Protect GZIP usage when LOADMK is enabled

For case where CMD_FPGA_LOADMK is enabled and GZIP disable.

Warning log:
common/built-in.o: In function `do_fpga':
/mnt/disk/u-boot/common/cmd_fpga.c:218: undefined reference to `gunzip'

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agomicroblaze: Enable hardware exception by default
Michal Simek [Tue, 4 Nov 2014 12:27:52 +0000 (13:27 +0100)]
microblaze: Enable hardware exception by default

Enable hardware exception by default to be able to
handle it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
9 years agoMerge git://git.denx.de/u-boot-arc
Tom Rini [Tue, 20 Jan 2015 21:41:11 +0000 (16:41 -0500)]
Merge git://git.denx.de/u-boot-arc

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Tom Rini [Tue, 20 Jan 2015 15:21:36 +0000 (10:21 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

9 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Tue, 20 Jan 2015 15:20:13 +0000 (10:20 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

9 years agoMAINTAINERS: add me as the maintainer of mpc837xerdb
Sinan Akman [Sat, 17 Jan 2015 23:54:52 +0000 (18:54 -0500)]
MAINTAINERS: add me as the maintainer of mpc837xerdb

Signed-off-by: Sinan Akman <sinan@writeme.com>
Cc: Tom Rini <trini@ti.com>
9 years agoUse generic board architecture for MPC837xERDB
Sinan Akman [Sat, 17 Jan 2015 07:09:13 +0000 (02:09 -0500)]
Use generic board architecture for MPC837xERDB

Signed-off-by: Sinan Akman <sinan@writeme.com>
Cc: kim.phillips@freescale.com
9 years agoimx: ls102xa: Remove reference to gdata
Simon Glass [Tue, 23 Dec 2014 19:04:58 +0000 (12:04 -0700)]
imx: ls102xa: Remove reference to gdata

The global_data pointer (gd) has already been set before board_init_f()
is called. We should not assign it again. We should also not use gdata since
it is going away.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoimx: woodburn: Remove reference to gdata
Simon Glass [Tue, 23 Dec 2014 19:04:57 +0000 (12:04 -0700)]
imx: woodburn: Remove reference to gdata

The global_data pointer (gd) has already been set before board_init_f()
is called. We should not assign it again. We should also not use gdata since
it is going away.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stefano Babic <sbabic@denx.de>
9 years agoimx: cm_fx6: Remove reference to gdata
Simon Glass [Tue, 23 Dec 2014 19:04:56 +0000 (12:04 -0700)]
imx: cm_fx6: Remove reference to gdata

The global_data pointer (gd) has already been set before board_init_f()
is called. We should not assign it again. We should also not use gdata since
it is going away.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
9 years agozynq: Remove reference to gdata
Simon Glass [Tue, 23 Dec 2014 19:04:55 +0000 (12:04 -0700)]
zynq: Remove reference to gdata

The global_data pointer (gd) has already been set before board_init_f()
is called. We should not assign it again. We should also not use gdata since
it is going away.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agommc: Skip changing bus width for MMC cards earlier than version 4.0
Andrew Gabbasov [Thu, 25 Dec 2014 16:22:25 +0000 (10:22 -0600)]
mmc: Skip changing bus width for MMC cards earlier than version 4.0

Wider bus widths (larger than default 1 bit) appeared in MMC standard
version 4.0. So, for MMC cards of any earlier version trying to change
the bus width (including ext_csd comparison) does not make any sense.
It may work incorrectly and at least cause unnecessary timeouts.
So, just skip the entire bus width related activity for earlier versions.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
9 years agommc: Avoid redundant switching to 1-bit bus width for MMC cards
Andrew Gabbasov [Thu, 25 Dec 2014 16:22:24 +0000 (10:22 -0600)]
mmc: Avoid redundant switching to 1-bit bus width for MMC cards

If all the commands switching an MMC card to 4- or 8-bit bus width fail,
and the bus width for the controller and the driver is still set
to default 1 bit, there is no need to send one more command to switch
the card to 1-bit bus width. Also, if the card or host controller do not
support wider bus widths, there is no need to send a switch command at all.

However, if one of switch commands succeeds, but the subsequent ext_csd
fields comparison fails, the card should be switched to some other bus width
(next in the list for the loop), or to default 1-bit bus width as a last
resort. That's why it would be incorrect to just remove the 1-bit bus width
case from the list, it should still be processed in some cases.

panto: Minor cosmetic edit removing superfluous parentheses.

Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Tested-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
9 years agommc: extend mmcinfo output to show partition write reliability settings
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:33 +0000 (10:50 +0100)]
mmc: extend mmcinfo output to show partition write reliability settings

This extends the mmcinfo hardware partition info output to show
partitions with write reliability enabled with the "WRREL" string.
If the partition does not have write reliability enabled the "WRREL"
string is omitted; this is analogous to the ehhanced attribute.

Example output:

Device: OMAP SD/MMC
Manufacturer ID: fe
OEM: 14e
Name: MMC16
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.41
High Capacity: Yes
Capacity: 13.8 GiB
Bus Width: 4-bit
Erase Group Size: 8 MiB
HC WP Group Size: 16 MiB
User Capacity: 13.8 GiB ENH WRREL
User Enhanced Start: 0 Bytes
User Enhanced Size: 512 MiB
Boot Capacity: 16 MiB ENH
RPMB Capacity: 128 KiB ENH
GP1 Capacity: 64 MiB ENH WRREL
GP2 Capacity: 64 MiB ENH WRREL

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: extend the mmc hwpartition sub-command to change write reliability
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:32 +0000 (10:50 +0100)]
mmc: extend the mmc hwpartition sub-command to change write reliability

This change extends the mmc hwpartition sub-command to change the
per-partition write reliability settings. It also changes the
syntax used for the enhanced user data area slightly to better
accomodate the write reliability option.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: extend the mmc hardware partitioning API with write reliability
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:31 +0000 (10:50 +0100)]
mmc: extend the mmc hardware partitioning API with write reliability

The eMMC partition write reliability settings are to be set while
partitioning a device, as per the eMMC spec, so changes to these
attributes needs to be done in the hardware partitioning API.
This commit adds such support.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: add mmc hwpartition sub-command to do eMMC hardware partitioning
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:30 +0000 (10:50 +0100)]
mmc: add mmc hwpartition sub-command to do eMMC hardware partitioning

Adds the mmc hwpartition sub-command to perform eMMC hardware
partitioning on an mmc device. The number of arguments can be
large for a complex partitioning, but as the partitioning has
to be done in one go it is difficult to make it simpler.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: add API to do eMMC hardware partitioning
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:29 +0000 (10:50 +0100)]
mmc: add API to do eMMC hardware partitioning

This adds an API to do hardware partitioning on eMMC devices. The
new mmc_hwpart_config() function does the partitioning in one go.
As the different attributes and partitioning options on eMMC may
be interdependent validation has to be done based on the complete
partitioning configuration. The function accepts three modes:

- MMC_HWPART_CONF_CHECK: just validates that the configuration
  is valid.
- MMC_HWPART_CONF_SET: validates and sets all the fields in
  EXT_CSD but without setting the "partitioning completed" bit,
  and thus is reversible.
- MMC_HWPART_CONF_COMPLETE: does everything and is thus not
  reversible.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: the ext_csd data may be used during init even if reading failed
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:28 +0000 (10:50 +0100)]
mmc: the ext_csd data may be used during init even if reading failed

The mmc_startup() function uses the ext_csd data even if reading it
from the mmc device failed. This bug was introduced in commit
bc897b1d4d86597311430dbe7b3e6c807c8c53e5. We now bail out if
reading it fails, this should not be a problem as ext_csd was
introduced in MMC 4.0 and this code is conditional on MMC >= 4.0.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: eMMC partitioning data is not effective till partitioning completed
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:27 +0000 (10:50 +0100)]
mmc: eMMC partitioning data is not effective till partitioning completed

The eMMC spec says that partitioning is only effective after the
PARTITION_SETTING_COMPLETED is set in EXT_CSD (and a power cycle was done,
but that we cannot know). Thus the partition sizes and attributes should
be ignored when that bit is not set, otherwise the various capacities
are not coherent (e.g., the user data capacity will be that of the
unpartitioned device while partition sizes would be non-zero).

Prescence of non-zero partitioning data is nevertheless still used to
activate the high-capacity size definitions (EXT_CSD_ERASE_GROUP_DEF)
as it is necessary to set that to write any of the partitioning fields
in EXT_CSD, so having partitioning data means someone previously
activated that and we should keep it activated.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: show the erase group size and HC WP group size in mmcinfo output
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:26 +0000 (10:50 +0100)]
mmc: show the erase group size and HC WP group size in mmcinfo output

This adds the erase group size and high-capacity WP group size to
mmcinfo's output. The erase group size is necessary to properly align
erase requests on eMMC. The high-capacity WP group size is necessary
to properly align partitions on eMMC.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: read the high capacity WP group size for eMMC
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:25 +0000 (10:50 +0100)]
mmc: read the high capacity WP group size for eMMC

Read the eMMC high capacity write protect group size at mmc device
initialization. This is useful to correctly partition an eMMC device,
as partitions need to be aligned to this size.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: fix erase_grp_size computation with high-capacity size definition
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:24 +0000 (10:50 +0100)]
mmc: fix erase_grp_size computation with high-capacity size definition

The erase_grp_size in struct mmc is to be a size in 512-byte sectors
but the code used to compute it for eMMC when EXT_CSD_ERASE_GROUP_DEF is
enabled computed it as bytes, leading to erase sizes and alignment
much larger than what is actually required by the mmc device.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: display size and start of eMMC enhanced user data area in mmcinfo
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:23 +0000 (10:50 +0100)]
mmc: display size and start of eMMC enhanced user data area in mmcinfo

This adds output to show the eMMC enhanced user data area size and offset
along with the partition sizes in mmcinfo's output.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: read the size of eMMC enhanced user data area
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:22 +0000 (10:50 +0100)]
mmc: read the size of eMMC enhanced user data area

This modification reads the size of the eMMC enhanced user data area
upon initialization of an mmc device, it will be used later by
mmcinfo.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: computation of eMMC GP partition size was missing 512 KiB factor
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:21 +0000 (10:50 +0100)]
mmc: computation of eMMC GP partition size was missing 512 KiB factor

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: incomplete test to switch to high-capacity group size definitions
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:20 +0000 (10:50 +0100)]
mmc: incomplete test to switch to high-capacity group size definitions

The eMMC spec mandates that the high-capacity group size definitions
should be enabled when the device is partitioned (by setting
ERASE_GROUP_DEF in EXT_CSD). The current test to determine when this is
required misses a few cases. In particular a device may have been
partitioned without setting the enhanced attribute on any partition
or partitioning may be completed without creating any extra partitions.

This change moves the code to set ERASE_GROUP_DEF to after reading
all partition information. It is also enabled when
PARTITIONING_SETTING_COMPLETED is set as it is necessary to enable
ERASE_GROUP_DEF before setting that bit, so it means that the user
previously switched to the high capacity definitions.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: skip mmcinfo partition info processing for eMMC < 4.41
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:19 +0000 (10:50 +0100)]
mmc: skip mmcinfo partition info processing for eMMC < 4.41

eMMC partitions are defined as of eMMC 4.41, but mmcinfo process
partition info for eMMC >= 4.0, change it to do it for >= 4.41

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: make eMMC general purpose partition numbering match spec
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:18 +0000 (10:50 +0100)]
mmc: make eMMC general purpose partition numbering match spec

The eMMC spec numbers general purpose partitions starting at 1, but
the mmcinfo output follows the internal numbering which starts at 0.
Make the mmcinfo command output number partitions as in the eMMC
spec to avoid confusion.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: extend mmcinfo to show enhanced partition attribute
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:17 +0000 (10:50 +0100)]
mmc: extend mmcinfo to show enhanced partition attribute

This extends the mmcinfo command's output to show which eMMC partitions
have the enhanced attribute set. Note that the eMMC spec says that
if the enhanced attribute is supported then the boot and RPMB
partitions are of the enhanced type.

The output of mmcinfo becomes:
Device: OMAP SD/MMC
Manufacturer ID: fe
OEM: 14e
Name: MMC16
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.41
High Capacity: Yes
Capacity: 13.8 GiB
Bus Width: 4-bit
User Capacity: 13.8 GiB ENH
Boot Capacity: 16 MiB ENH
RPMB Capacity: 128 KiB ENH
GP1 Capacity: 64 MiB ENH
GP2 Capacity: 64 MiB ENH

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
9 years agommc: show hardware partition sizes in mmcinfo output
Diego Santa Cruz [Tue, 23 Dec 2014 09:50:16 +0000 (10:50 +0100)]
mmc: show hardware partition sizes in mmcinfo output

There is currently no command that will provide an overview of the hardware
partitions present on an eMMC device, one has to switch to every partition
via "mmc dev" and run mmcinfo for each to get the partition's capacity.
This commit adds a few lines of output to mmcinfo with the sizes of the
present partitions, like this:

Device: OMAP SD/MMC
Manufacturer ID: fe
OEM: 14e
Name: MMC16
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.41
High Capacity: Yes
Capacity: 13.8 GiB
Bus Width: 4-bit
User Capacity: 13.8 GiB
Boot Capacity: 16 MiB
RPMB Capacity: 128 KiB
GP1 Capacity: 64 MiB
GP2 Capacity: 64 MiB

panto: Minor edit removing superfluous parentheses.

Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
9 years agommc: rmobile: Add SDHC support for Renesas rmobile ARM SoC
Nobuhiro Iwamatsu [Tue, 16 Dec 2014 23:03:00 +0000 (08:03 +0900)]
mmc: rmobile: Add SDHC support for Renesas rmobile ARM SoC

This adds Renesas rmobile ARM SoC's SD/MMC host support.
This drivers tested with Gose board and Koelsch board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
9 years agousb: eth: asix88179: add ability to modify MAC address
Rene Griessl [Mon, 12 Jan 2015 16:51:16 +0000 (17:51 +0100)]
usb: eth: asix88179: add ability to modify MAC address

This patch enables U-Boot to modify the MAC address of the AX88179.
Tested on RECS5250 (similar to Arndale5250)

Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
9 years agomusb-new: Add interrupt queue support
Hans de Goede [Sun, 11 Jan 2015 19:34:54 +0000 (20:34 +0100)]
musb-new: Add interrupt queue support

Add interrupt queue support, so that a usb keyboard can be used without
causing huge latencies.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Add urb and hep parameters to construct_urb
Hans de Goede [Sun, 11 Jan 2015 19:34:53 +0000 (20:34 +0100)]
musb-new: Add urb and hep parameters to construct_urb

Make construct_urb take an urb and hep parameter, rather then having it always
operate on the file global urb and hep structs. This is a preperation patch
for adding interrupt queue support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Properly remove a transfer from the schedule on timeout
Hans de Goede [Sun, 11 Jan 2015 19:34:52 +0000 (20:34 +0100)]
musb-new: Properly remove a transfer from the schedule on timeout

If a transfer / urb times-out, properly remove it from the schedule, rather
then letting it sit on the ep head. This stops the musb code from getting
confused and refusing to queue further transfers after a timeout.

Tested by unplugging a usb-keyboard, replugging it and doing a usb-reset,
before this commit the keyboard would not work after the usb-reset.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Fix reset sequence when in host mode
Hans de Goede [Sun, 11 Jan 2015 19:34:51 +0000 (20:34 +0100)]
musb-new: Fix reset sequence when in host mode

This commit fixes a number of issues with the reset sequence of musb-new
in host mode:

1) Our usb device probe relies on a second device reset being done after the
first descriptors read. Factor the musb reset code into a usb_reset_root_port
function (and add this as an empty define for other controllers), and call
this when a device has no parent.

2) Just like with normal usb controllers there needs to be a delay after
reset, for normal usb controllers, this is handled in hub_port_reset, add a
delay to usb_reset_root_port.

3) Sync the musb reset sequence with the upstream kernel, clear all bits of
power except bits 4-7, and increase the time reset is asserted to 50 ms.

With these fixes an usb keyboard I have now always enumerates properly, where
as earlier it would only enumerare properly once every 5 tries.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Fix interrupt transfers not working
Hans de Goede [Sun, 11 Jan 2015 19:34:50 +0000 (20:34 +0100)]
musb-new: Fix interrupt transfers not working

For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC,
but it does not do so for interrupt transfers.

musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0,
and thus without anyone setting USB_ST_NOT_PROC would exit immediately for
interrupt urbs, returning the urb status of EINPROGRESS as error.

This commit fixes this, thereby also making usb_kbd.c work together with
musb_new and CONFIG_SYS_USB_EVENT_POLL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Use time based timeouts rather then cpu-cycles based timeouts
Hans de Goede [Sun, 11 Jan 2015 19:34:49 +0000 (20:34 +0100)]
musb-new: Use time based timeouts rather then cpu-cycles based timeouts

CPU cycle based timeouts are no good, because how long they use depends on
CPU speed. Instead use time based timeouts, and wait one second for a
device connection to show up (per the USB spec), and wait USB_TIMEOUT_MS
for various urbs to complete.

This fixes "usb start" taking for ever when no device is plugged into the
otg port.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Add sunxi musb controller support
Hans de Goede [Sun, 11 Jan 2015 19:34:48 +0000 (20:34 +0100)]
musb-new: Add sunxi musb controller support

This is based on Jussi Kivilinna's work for the linux-sunxi-3.4 kernel to use
the kernels musb driver instead of Allwinners own custom driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agomusb-new: Add register defines for different reg layout on sunxi
Hans de Goede [Sun, 11 Jan 2015 19:34:47 +0000 (20:34 +0100)]
musb-new: Add register defines for different reg layout on sunxi

The sunxi SoCs also have a musb controller, but with a different register
layout.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb: Do not log an error when no devices is plugged into a root-hub-less hcd
Hans de Goede [Sun, 11 Jan 2015 19:34:46 +0000 (20:34 +0100)]
usb: Do not log an error when no devices is plugged into a root-hub-less hcd

Before this commit u-boot would print the following on boot with musb and
no usb device plugged in:

starting USB...
USB0:   Port not available.
USB error: all controllers failed lowlevel init

This commit changes this to:

starting USB...
USB0:   Port not available.

Which is the correct thing to do since the low-level init went fine.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb: Fix usb_kbd_deregister when console-muxing is used
Hans de Goede [Sun, 11 Jan 2015 19:34:44 +0000 (20:34 +0100)]
usb: Fix usb_kbd_deregister when console-muxing is used

When iomuxing is used we must not only deregister the device with stdio.c,
but also remove the reference to the device in the console_devices array
used by console-muxing. Add a call to iomux_doenv to usb_kbd_deregister to
update console_devices, which will drop the reference.

This fixes the console filling with "Failed to enqueue URB to controller"
messages after a "usb stop force", or when the USB keyboard is gone after a
"usb reset".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb: Add an interval parameter to create_int_queue
Hans de Goede [Sun, 11 Jan 2015 19:38:28 +0000 (20:38 +0100)]
usb: Add an interval parameter to create_int_queue

Currently create_int_queue is only implemented by the ehci code, and that
does not honor interrupt intervals, but other drivers which might also want
to implement create_int_queue may honor intervals, so add an interval param.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoconfig_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans
Hans de Goede [Tue, 6 Jan 2015 13:27:42 +0000 (14:27 +0100)]
config_distro_bootcmd.h: Remove unnecessary magic to avoid repeated USB scans

Now that "usb start" will only start usb if not already started, we can simply
call "usb start" whenever we (may) need access to usb devices, and it will only
actually scan the bus at the first call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoUSB: make "usb start" start usb only once
Hans de Goede [Tue, 6 Jan 2015 13:27:41 +0000 (14:27 +0100)]
USB: make "usb start" start usb only once

Currently we've this magic in include/config_distro_bootcmd.h to avoid
scanning the usb bus multiple times.

And it does not work when also using an usb keyboard because then the
preboot command has already scanned the bus, so we're still scanning it
twice.

This commit makes "usb start" only start usb if it is no already started,
allowing us to remove all the magic for it from include/config_distro_bootcmd.h
and just call it unconditionally.

This also causes "usb start" and "usb reset" to actually do what their
different names suggest, rather then both of them doing exactly the same.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agousb: gadget: pxa25x_udc: fix use-before-initialized bug
Alex Sadovsky [Thu, 8 Jan 2015 17:51:10 +0000 (20:51 +0300)]
usb: gadget: pxa25x_udc: fix use-before-initialized bug

Fix use-before-initialized bug in pxa25x_udc driver.

Function usb_gadget_register_driver calls udc_disable,
and udc_disable calls pullup_off that uses dev->mach->udc_command.
But dev->mach is initialized in usb_gadget_register_driver after
calling udc_disable. This patch fixes the order of initialization.

Signed-off-by: Alex Sadovsky <Nable.MainInbox@googlemail.com>
9 years agousb: gadget: f_dfu: Add get_alt function to pass the USB compliance test
Stefan Roese [Fri, 9 Jan 2015 13:54:56 +0000 (14:54 +0100)]
usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test

Without this function the USB compliance test (USB 2.0 Command Verifier) will
fail in the "Interface Descriptor Test" with this error message:

FAIL
(1.2.51) A successful GetInterface request must return the alternate setting
set by a prior call to SetInterface.

Lets add this function to read back the value so that the DFU device fully
passes the USB compliance test.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Enrico Leto <enrico.leto@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
9 years agousb: gadget: composite: Fix NULL pointer crash in USB compliance test
Stefan Roese [Fri, 9 Jan 2015 13:54:55 +0000 (14:54 +0100)]
usb: gadget: composite: Fix NULL pointer crash in USB compliance test

On the DXR2 board (AM335x using MUSB) the USB compliance test suite
(USB 2.0 Command Verifier) will cause the board to crash and reset
upon the "BOS Descriptor Test - Addressed state". Here the output
from the DRX2 while running this test:

GADGET DRIVER: usb_dnl_dfu
musb-hdrc: peripheral reset irq lost!
composite_setup (776)
data abort
pc : [<87f693ac>]          lr : [<87f6911c>]
sp : 86f33a58  ip : 00000000     fp : 86f3bbac
r10: 00000f00  r9 : 86f33ef4     r8 : 86f37da8
r7 : 00000005  r6 : 86f33a90     r5 : 00000000  r4 : 86f37e30
r3 : 00000000  r2 : 00000000     r1 : 87f9c888  r0 : 00000016
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

By adding the case statement for USB_DT_BOS and therefore not running
into the default case (jump to unkown label) this crash is fixed.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
Cc: Enrico Leto <enrico.leto@siemens.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
9 years agosunxi: Drop use of lowlevel_init()
Simon Glass [Tue, 23 Dec 2014 19:04:53 +0000 (12:04 -0700)]
sunxi: Drop use of lowlevel_init()

This does nothing now, so drop it. We have SPL anyway to do our low-level
init.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Move SPL s_init() code to board_init_f()
Simon Glass [Tue, 23 Dec 2014 19:04:52 +0000 (12:04 -0700)]
sunxi: Move SPL s_init() code to board_init_f()

The current sunxi implementation uses gdata, which is going away. It also
sets up DRAM before board_init_f() in SPL.

There is really no reason to do much in s_init() since board_init_f() is
called immediately afterwards. The only change is that we need our own
implementation of board_init_f() which sets up DRAM before the BSS (which
is in DRAM) is cleared.

The s_init() code runs once for SPL and again for U-Boot proper. We
shouldn't need to init the clock/timer/gpio/i2c init twice, so just have it
in SPL.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoarm: Add warnings about using gdata
Simon Glass [Tue, 23 Dec 2014 19:04:51 +0000 (12:04 -0700)]
arm: Add warnings about using gdata

We need to get rid of this SPL-specific setting of the global_data pointer.
It is already set up in start.S immediately before board_init_f() is called,
and there may be information there that is needed (e.g. pre-reloc malloc
info).

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agoTI ARMv7: Don't use GD before crt0.S has set it
Tom Rini [Fri, 19 Dec 2014 21:53:24 +0000 (16:53 -0500)]
TI ARMv7: Don't use GD before crt0.S has set it

Prior to this change we set the gd pointer early so that we can store
data in it.  This becomes problematic for DM changes as well as being
odd in general.  Re-work the code paths so that we don't need to set the
gd pointer so early and instead can rely upon the normal setting of it.

In order to do this we do need to move certain calls from s_init into
spl_board_init(), mainly preloader_console_init and
save_omap_boot_params.

Tested on: Beaglebone Black, AM43xx GP EVM, Beagleboard, Beagleboard xM,
OMAP5 uEVM, DRA7xx EVM
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
9 years agonet/vsc9953: Add driver for Vitesse VSC9953 L2 Switch IP
Codrin Ciubotariu [Mon, 12 Jan 2015 12:08:33 +0000 (14:08 +0200)]
net/vsc9953: Add driver for Vitesse VSC9953 L2 Switch IP

This patch adds a driver for VSC9953 L2 Switch. This Vitesse IP
is integrated in Freescale T1040 and T1020 SoCs.
The L2 switch has 10 Ethernet ports: 2 internal fixed-links
(ports 8 and 9) at 2.5 Gbps and and 8 external ports at 1 Gbps.
The external ports may be connected to PHYs over QSGMII and SGMII.

Commands have also been added to enable/disable a port and to
check a port's link speed, duplexity and status. The commands are:

ethsw port <port_nr> enable|disable - enable/disable an l2 switch port
ethsw port <port_nr> show - show an l2 switch port's configuration

port_nr=0..9; use "all" for all ports

For more detailse please see doc/README.t1040-l2switch

Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <yorksun@freescale.com>