project/bcm63xx/u-boot.git
10 years agoARM: mx6: Allow enablement of FEC Anatop based clock for all MX6
Otavio Salvador [Mon, 16 Dec 2013 22:44:05 +0000 (20:44 -0200)]
ARM: mx6: Allow enablement of FEC Anatop based clock for all MX6

The enable_fec_anatop_clock method should be available for all MX6
variant as it is not MX6 SoloLite specific. This moves the code out of
the #ifdef/#endif and we make it conditional to CONFIG_FEC_MXC
instead.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoARM: mx6: Change the FDT loading address to avoid overlaping
Otavio Salvador [Mon, 16 Dec 2013 22:44:04 +0000 (20:44 -0200)]
ARM: mx6: Change the FDT loading address to avoid overlaping

This patch fixes allow for the DeviceTree and initrd relocation fixing
the boot of FSL 3.10.9-1.0.0-alpha kernel.

This changes following boards:

 - mx6sabreauto
 - mx6sabresd
 - wandboard
 - udoo
 - nitrogen6x
 - cgtqmx6eval

The reasoning, as explained by Hui Liu, is:

,----
| The FDT blob will be placed at DDR physical addr: 0x11000000. When Linux kernel
| Boot up, it will decompress the compressed kernel image and place the decompressed
| kernel image at the low end of the DDR memory and start running from it. If the
| decompressed kernel image is bigger for example than 16M, it may over written the
| fdt blob which u-boot loaded to the DDR memory @0x11000000 with fdt_addr=0x11000000
|
| To expand the fdt_addr from 0x11000000 to 0x18000000, which can avoid the override
| Since we will not likely have one kernel image larger than 128MB.
`----

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agomx28evk: Extend environment to easy write of NAND system
Otavio Salvador [Mon, 16 Dec 2013 22:44:03 +0000 (20:44 -0200)]
mx28evk: Extend environment to easy write of NAND system

This adds following new targets:

 - update_nand_kernel
 - update_nand_fdt
 - update_nand_filesystem

and to avoid confusion, the 'update_nand_full' has been renamed to
'update_nand_firmware_full'.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
10 years agomx28evk: Add 'nandboot' environment command
Otavio Salvador [Mon, 16 Dec 2013 22:44:02 +0000 (20:44 -0200)]
mx28evk: Add 'nandboot' environment command

This reads the kernel, ftd and boot into ubifs filesystem. While on
that, the SD firmware filename definition has been moved next to the
other SD related commands.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx28evk: Use 512k for fdt partition to align it
Otavio Salvador [Mon, 16 Dec 2013 22:44:01 +0000 (20:44 -0200)]
mx28evk: Use 512k for fdt partition to align it

Using 512k for fdt partition allow it to be aligned with the other
small partitions and 512k erase block size.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoimx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro
Otavio Salvador [Mon, 16 Dec 2013 22:44:00 +0000 (20:44 -0200)]
imx: Easy enabling of SION per-pin using MUX_MODE_SION helper macro

The macro allows easy setting in per-pin, as for example:

,----
| imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION);
`----

The IOMUX_CONFIG_SION allows for reading PAD value from PSR register.

The following quote from the datasheet:

,----
| ...
| 28.4.2.2 GPIO Write Mode
| The programming sequence for driving output signals should be as follows:
| 1. Configure IOMUX to select GPIO mode (Via IOMUXC), also enable SION if need
| to read loopback pad value through PSR
| 2. Configure GPIO direction register to output (GPIO_GDIR[GDIR] set to 1b).
| 3. Write value to data register (GPIO_DR).
| ...
`----

This fixes the gpio_get_value to properly work when a GPIO is set for
output and has no conflicts.

Thanks for Benoît Thébaudeau <benoit.thebaudeau@advansee.com>, Fabio
Estevam <fabio.estevam@freescale.com> and Eric Bénard
<eric@eukrea.com> for helping to properly trace this down.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agomx6: soc: Disable VDDPU regulator
Fabio Estevam [Thu, 26 Dec 2013 16:51:35 +0000 (14:51 -0200)]
mx6: soc: Disable VDDPU regulator

As U-boot does not use GPU/VPU peripherals, shutdown the VDDPU regulator
in order to save power.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: soc: Add the required LDO ramp up delay
Fabio Estevam [Thu, 26 Dec 2013 16:51:34 +0000 (14:51 -0200)]
mx6: soc: Add the required LDO ramp up delay

When changing LDO voltages we need to wait for the required amount of time
for the voltage to settle.

Also, as the timer is still not available when arch_cpu_init() is called, we
need to call it later at board_postclk_init() phase.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: soc: Introduce set_ldo_voltage()
Fabio Estevam [Thu, 26 Dec 2013 16:51:33 +0000 (14:51 -0200)]
mx6: soc: Introduce set_ldo_voltage()

Introduce set_ldo_voltage() so that all three LDO regulators can be configured.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: soc: Set the VDDSOC at 1.175 V
Fabio Estevam [Thu, 26 Dec 2013 16:51:32 +0000 (14:51 -0200)]
mx6: soc: Set the VDDSOC at 1.175 V

mx6 datasheet specifies that the minimum VDDSOC at 792 MHz is 1.15 V.
Add a 25 mV margin and set it to 1.175V.

This also matches the VDDSOC voltages for 792MHz operation that the kernel configures:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/mach-mx6/cpu_op-mx6.c?h=imx_3.0.35_4.1.0

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages
Fabio Estevam [Thu, 26 Dec 2013 16:51:31 +0000 (14:51 -0200)]
mx6: soc: Clear the LDO ramp values up prior to setting the LDO voltages

Since ROM may modify the LDO ramp up time according to fuse setting,
it is safer to reset the ramp up field to its default value of 00:

00: 64 cycles of 24MHz clock;
01: 128 cycles of 24MHz clock;
02: 256 cycles of 24MHz clock;
03: 512 cycles of 24MHz clock;

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: soc: Staticize set_vddsoc()
Fabio Estevam [Thu, 26 Dec 2013 16:51:30 +0000 (14:51 -0200)]
mx6: soc: Staticize set_vddsoc()

set_vddsoc() is not used anywhere else, so make it static.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6sabre_common.h: Add CONFIG_CMD_FUSE support
Fabio Estevam [Mon, 23 Dec 2013 15:07:18 +0000 (13:07 -0200)]
mx6sabre_common.h: Add CONFIG_CMD_FUSE support

Add CONFIG_CMD_FUSE option, so that the fuse API can be used.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
10 years agodoc: README.fuse: Add an example on how to use the fuse API on mx6q
Fabio Estevam [Mon, 23 Dec 2013 15:07:17 +0000 (13:07 -0200)]
doc: README.fuse: Add an example on how to use the fuse API on mx6q

When using the fuse API in U-boot user must calculate the 'bank' and 'word'
values.

Provide a real example on how to calculate such values for the mx6q.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
10 years agoMX6: fix sata compilation for i.MX6
Stefano Babic [Thu, 19 Dec 2013 10:04:33 +0000 (11:04 +0100)]
MX6: fix sata compilation for i.MX6

Commit 164d98466103a46b7c881149e92ec2a28a6375be breaks
board with SATA support, because sata is not compiled.

Signed-off-by: Stefano Babic <sbabic@denx.de>
10 years agoimx6: fix random hang when download by usb
Frank Li [Wed, 13 Nov 2013 16:58:46 +0000 (00:58 +0800)]
imx6: fix random hang when download by usb

ROM did not invalidate L1 cache when download by usb
Need invalidate L1 cache before enable cache

Signed-off-by: Huang yongcai <b20788@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
10 years agoARM: mxs: tools: Fix errno handling in strtoul() invocation
Marek Vasut [Wed, 4 Dec 2013 13:27:40 +0000 (14:27 +0100)]
ARM: mxs: tools: Fix errno handling in strtoul() invocation

According to NOTE in strtoul(3), the errno must be zeroed before strtoul()
is called. Zero the errno. The NOTE reads as such:

  Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for
  strtoull()) on both success and failure, the calling program should set
  errno  to  0  before the call, and then determine if an error occurred
  by checking whether errno has a nonzero value after the call.

This issue was detected on Fedora 19 with glibc 2.17 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
10 years agomx6sabresd: Fix LVDS width and color format
Fabio Estevam [Wed, 4 Dec 2013 03:08:17 +0000 (01:08 -0200)]
mx6sabresd: Fix LVDS width and color format

mx6sabresd boards have a 18-bit LVDS data width and the correct color format
is RGB666.

Suggested-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6sabresd: Allow probing HSYNC, VSYNC and DISP_CLK signals
Fabio Estevam [Wed, 4 Dec 2013 03:08:16 +0000 (01:08 -0200)]
mx6sabresd: Allow probing HSYNC, VSYNC and DISP_CLK signals

HSYNC, VSYNC and DISP_CLK are very useful display signals for debugging.

Configure them as active pins.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6: clock: Fix the calculation of PLL_ENET frequency
Fabio Estevam [Tue, 3 Dec 2013 20:26:13 +0000 (18:26 -0200)]
mx6: clock: Fix the calculation of PLL_ENET frequency

According to the mx6 quad reference manual, the DIV_SELECT field of register
CCM_ANALOG_PLL_ENETn has the following meaning:

"Controls the frequency of the ethernet reference clock.
- 00 - 25MHz
- 01 - 50MHz
- 10 - 100MHz
- 11 - 125MHz"

Current logic does not handle the 25MHz case correctly, so fix it.

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoARM: mx53: video: Add IPUv3 LCD support for M53EVK
Marek Vasut [Mon, 2 Dec 2013 16:01:42 +0000 (17:01 +0100)]
ARM: mx53: video: Add IPUv3 LCD support for M53EVK

This patch adds support for the AMPIRE 800x480 LCD panel that is available
for M53EVK.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
10 years agoMX6 SabreSD: Use readl() to read the CCM_CCGR3 register
Liu Ying [Fri, 29 Nov 2013 14:38:39 +0000 (22:38 +0800)]
MX6 SabreSD: Use readl() to read the CCM_CCGR3 register

Align with the context to use readl() to read the CCM_CCGR3
register with memory barrier instead of __raw_readl().

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoARM: mx6: Update non-Freescale boards to include CPU errata.
Eric Nelson [Wed, 27 Nov 2013 00:40:30 +0000 (17:40 -0700)]
ARM: mx6: Update non-Freescale boards to include CPU errata.

The CPU errata expressed in include/configs/mx6_common.h apply
to all i.MX6DQ and i.MX6DLS parts.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agoconfigs: imx: Remove CONFIG_SYS_SPD_BUS_NUM option
Fabio Estevam [Wed, 20 Nov 2013 22:38:10 +0000 (20:38 -0200)]
configs: imx: Remove CONFIG_SYS_SPD_BUS_NUM option

According to the README:

"- CONFIG_SYS_SPD_BUS_NUM
If SPD EEPROM is on an I2C bus other than the first
one, specify here. Note that the value must resolve
to something your driver can deal with."

There is no SPD EEPROM on the imx boards, so ged rid of this option.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoudoo: Add SATA support on uDoo Board.
Giuseppe Pagano [Thu, 28 Nov 2013 11:32:49 +0000 (12:32 +0100)]
udoo: Add SATA support on uDoo Board.

Add SATA support on uDoo Board.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
10 years agonitrogen6x: Move setup_sata to common part
Giuseppe Pagano [Thu, 28 Nov 2013 11:32:48 +0000 (12:32 +0100)]
nitrogen6x: Move setup_sata to common part

Move setup_sata function definition from platform file nitrogen6x.c
to arch/arm/imx-common/sata.c to avoid code duplication.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoi.MX6 (DQ/DLS): use macros for mux and pad declarations
Eric Nelson [Wed, 13 Nov 2013 23:36:19 +0000 (16:36 -0700)]
i.MX6 (DQ/DLS): use macros for mux and pad declarations

This allows the use of either or both declarations from
the files mx6q_pins.h and mx6dl_pins.h.

All board files should include <asm/arch/mx6-pins.h>
with one of the following defined in boards.cfg
    MX6Q   - for boards targeting i.MX6Q or i.MX6D
    MX6DL  - for boards targeting i.MX6DL
    MX6S   - for boards targeting i.MX6S
    MX6QDL - for boards that support any of the above with
             run-time detection

Pad declarations will be MX6_PAD_x for single-variant boards
and MX6Q_PAD_x and MX6DL_PAD_x for boards supporting both
processor classes.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoimx: Explicitly pass the I2C bus number in pmic_init()
Fabio Estevam [Wed, 20 Nov 2013 23:17:36 +0000 (21:17 -0200)]
imx: Explicitly pass the I2C bus number in pmic_init()

The pmic_init() function has the I2C or SPI bus number that is connected to the
PMIC.

Instead of passing I2C_PMIC, explicitly pass the I2C bus number via I2C_x
definition.

The motivation for doing this is to avoid people just doing a copy and paste
of I2C_PMIC into their board file when another I2C bus is actually used to
interface to their PMIC.

This also makes more obvious which is the I2C bus connected to the PMIC, without
having to search in the source code for the meaning of the 'I2C_PMIC' number.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoudoo: Fix watchdog during kernel boot.
Giuseppe Pagano [Fri, 15 Nov 2013 16:42:54 +0000 (17:42 +0100)]
udoo: Fix watchdog during kernel boot.

uDoo uses APX823-31W5 watchdog chip. Timeout is about 1.2 seconds.
To disabled watchdog during kernel boot, WDI pin of that chip needs to be
in "high impedance" state. I.mx6 gpio configuration does not contemplate
tristate, so pin is set as input in high impedance.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoudoo: Add ethernet support (FEC + Micrel KSZ9031).
Giuseppe Pagano [Fri, 15 Nov 2013 16:42:51 +0000 (17:42 +0100)]
udoo: Add ethernet support (FEC + Micrel KSZ9031).

Add Ethernet and networking support on uDoo board (FEC +phy Micrel KSZ9031).
Ethernet speed is currently limited to 10/100Mbps.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoudoo: Move and optimize platform register setting.
Giuseppe Pagano [Fri, 15 Nov 2013 16:42:50 +0000 (17:42 +0100)]
udoo: Move and optimize platform register setting.

Previous uDoo configuration adopts register settings for DDR3, clock, muxing,
etc. taken from Nitrogen6x. uDoo schematics is rather different from that board,
and it needs customized setting for most of the registers.
All this changes can be considered atomical since it is part of initial support
of the board.

Patch changes uDoo configuration files path to a specific one, and adopt
optimized value for every configured register.

Signed-off-by: Giuseppe Pagano <giuseppe.pagano@seco.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6sabresd: Add SPI NOR support
Fabio Estevam [Fri, 8 Nov 2013 18:20:54 +0000 (16:20 -0200)]
mx6sabresd: Add SPI NOR support

mx6sabre board has a m25p32 SPI NOR connected to ECSPI1 port.

Add support for it.

This patch allows the SPI NOR flash to be succesfully detected:

=> sf probe
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx6sabresd: Fix wrong colors in LVDS splash
Fabio Estevam [Mon, 25 Nov 2013 12:34:26 +0000 (10:34 -0200)]
mx6sabresd: Fix wrong colors in LVDS splash

Currently HDMI splash screen is selected by default on mx6sabresd boards.

As LVDS is also enabled, this causes incorrect colors to be displayed im the
LVDS panel.

Fix this by selecting the LVDS panel as the default splash output and only keep
HDMI or LVDS turned on at the same time.

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agopower: power_fsl: Pass p->bus in the same way for SPI and I2C cases
Fabio Estevam [Wed, 20 Nov 2013 22:26:06 +0000 (20:26 -0200)]
power: power_fsl: Pass p->bus in the same way for SPI and I2C cases

There is no need to pass p->bus differently when the PMIC is connected via SPI
or via I2C.

Handle the both cases in the same way.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoefikamx: Fix pmic_init() argument
Fabio Estevam [Wed, 20 Nov 2013 22:26:05 +0000 (20:26 -0200)]
efikamx: Fix pmic_init() argument

On efikamx board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx31pdk: Fix pmic_init() argument
Fabio Estevam [Wed, 20 Nov 2013 22:26:04 +0000 (20:26 -0200)]
mx31pdk: Fix pmic_init() argument

On mx31pdk board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomx51evk: Fix pmic_init() argument
Fabio Estevam [Wed, 20 Nov 2013 22:26:03 +0000 (20:26 -0200)]
mx51evk: Fix pmic_init() argument

On mx51evk board the PMIC is connected via SPI interface, so it does not make
sense to pass I2C_PMIC into the pmic_init() interface.

Pass the SPI bus number via CONFIG_FSL_PMIC_BUS option instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoimx-common: remove extraneous semicolon from macro
Eric Nelson [Fri, 8 Nov 2013 23:50:53 +0000 (16:50 -0700)]
imx-common: remove extraneous semicolon from macro

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agonitrogen6x: Remove unused OCOTP options
Fabio Estevam [Fri, 8 Nov 2013 13:08:37 +0000 (11:08 -0200)]
nitrogen6x: Remove unused OCOTP options

OCOTP driver is currently selected via CONFIG_MXC_OCOTP option.

Remove the old OCOTP related options, as they are not used anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoNet: FEC: Fix huge memory leak
Marek Vasut [Sat, 12 Oct 2013 18:36:25 +0000 (20:36 +0200)]
Net: FEC: Fix huge memory leak

The fec_halt() never free'd both RX and TX DMA descriptors that
were allocated in fec_init(), nor did it free the RX buffers.
Rework the FEC driver so that these descriptors and buffers are
allocated only once in fec_probe().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
10 years agoi.MX6DQ/DLS: whitespace: Align IOMUX_PAD column in declarations
Eric Nelson [Tue, 5 Nov 2013 00:00:55 +0000 (17:00 -0700)]
i.MX6DQ/DLS: whitespace: Align IOMUX_PAD column in declarations

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoi.MX6DQ/DLS: remove unused pad declarations
Eric Nelson [Tue, 5 Nov 2013 00:00:54 +0000 (17:00 -0700)]
i.MX6DQ/DLS: remove unused pad declarations

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoi.MX6DQ: Add Pinmux settings that are present in mainline and Dual-Lite/Solo
Eric Nelson [Tue, 5 Nov 2013 00:00:53 +0000 (17:00 -0700)]
i.MX6DQ: Add Pinmux settings that are present in mainline and Dual-Lite/Solo

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoi.MX6DQ/DLS: remove useless mux/pad declarations
Eric Nelson [Tue, 5 Nov 2013 00:00:52 +0000 (17:00 -0700)]
i.MX6DQ/DLS: remove useless mux/pad declarations

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoi.MX6DQ/DLS: replace pad names with their Linux kernel equivalents
Eric Nelson [Tue, 5 Nov 2013 00:00:51 +0000 (17:00 -0700)]
i.MX6DQ/DLS: replace pad names with their Linux kernel equivalents

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agomx6: titanium: Move BSP code to barco board directory
Stefan Roese [Mon, 4 Nov 2013 07:35:28 +0000 (08:35 +0100)]
mx6: titanium: Move BSP code to barco board directory

Since the titanium board is not a Freescale board, move its
BSP code from the freescale board directory to the newly created
barco board directory.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Peter Korsgaard <peter.korsgaard@barco.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
10 years agotitanium: Return the error when cpu_eth_init() fails
Fabio Estevam [Mon, 4 Nov 2013 00:12:56 +0000 (22:12 -0200)]
titanium: Return the error when cpu_eth_init() fails

When cpu_eth_init() fails we should not return success.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agowandboard: Return the error when cpu_eth_init() fails
Fabio Estevam [Mon, 4 Nov 2013 00:03:04 +0000 (22:03 -0200)]
wandboard: Return the error when cpu_eth_init() fails

When cpu_eth_init() fails we should not return success.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agowandboard: Return the error immediately when ipuv3_fb_init() fails
Fabio Estevam [Mon, 4 Nov 2013 00:03:03 +0000 (22:03 -0200)]
wandboard: Return the error immediately when ipuv3_fb_init() fails

If ipuv3_fb_init() fails, we should return the error immediately.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agomxs_gpio: fix the handling in gpio_direction_output()
Michael Heimpold [Sun, 3 Nov 2013 21:59:26 +0000 (22:59 +0100)]
mxs_gpio: fix the handling in gpio_direction_output()

Setting the direction and an output value should be done by
1) set the desired output value,
2) switch to output.

If this is done in the inverse order, there can be a glitch on
the GPIO line.

This patch fixes this by using the order as described above.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Stefano Babic <sbabic@denx.de>
10 years agoconfigs: imx: Make CONFIG_SYS_PROMPT uniform across FSL boards
Fabio Estevam [Fri, 1 Nov 2013 10:12:24 +0000 (08:12 -0200)]
configs: imx: Make CONFIG_SYS_PROMPT uniform across FSL boards

There is no real benefit in adding the board name into U-boot's prompt, so
remove the custom CONFIG_SYS_PROMPT definitions so that the standard "=> "
prompt is used across FSL boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
10 years agoarm, am335x: update for the siemens boards
Samuel Egli [Mon, 4 Nov 2013 13:05:03 +0000 (14:05 +0100)]
arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
  - add splashpos=m,m to default environment, so splash screen is always
    centered.
  - adapt environment for bootcount feature
  - add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
  store the bootcount in the environment, as we have no softreset
  save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
  bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
  Add for the siemens boards the possibility to define in dfu mode,
  the iSerialNumber and the bcdDevice fields in the USB Device
  descriptor.
- fix upgrade mechanism based on bootcount
  Correct location of saveenv and remove not active variable.

  Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
  reboot board in case of empty kernel partition. Without
  these defines an empty kernel partition leads to an
  abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
  all:
   * Remove net boot from bootcmd
     Ping can cause a crash on boards without ethernet phy.
     net_nfs command is used only for development

   * Add reset at the end of bootcmd
     In order to have an immediate reset of the boot when bootcmd
     fails, add reset at the end of bootcmd.

  rut:
   * add nand_img_size

  dxr2:
   * update nand_img_size

   * ddr3 timings updated with iocontrol property that can be
     modified via eeprom. New default parameters from software
     leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>
10 years agousb, g_dnl: make bcdDevice value configurable
Heiko Schocher [Mon, 4 Nov 2013 13:05:02 +0000 (14:05 +0100)]
usb, g_dnl: make bcdDevice value configurable

add the possibility to set the bcdDevice number board specific.
Therefore the weak function g_dnl_get_board_bcd_device_number()
is introduced. Used on the siemens boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
11 years agoomap730p2: Remove board
Tom Rini [Mon, 11 Nov 2013 17:09:10 +0000 (12:09 -0500)]
omap730p2: Remove board

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx: Make SoC bootcount driver have its own symbol
Tom Rini [Fri, 8 Nov 2013 18:53:14 +0000 (13:53 -0500)]
am33xx: Make SoC bootcount driver have its own symbol

Some am33xx boards may not use the RTC block for bootcount (as it may
not be wired up for the board) and use some other facility.  So add
another symbol for the bootcount driver for the IP block.

Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agocm-t35: use gpio_led driver for status led
Igor Grinberg [Wed, 6 Nov 2013 14:39:47 +0000 (16:39 +0200)]
cm-t35: use gpio_led driver for status led

Switch to using the generic gpio_led driver instead of the private to
cm_t35 board led implementation.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Nikita Kiryanov <nikita@compulab.co.il>
11 years agoam335x_evm: Fix CONS_INDEX numbering
Andrew Bradford [Mon, 4 Nov 2013 20:42:52 +0000 (15:42 -0500)]
am335x_evm: Fix CONS_INDEX numbering

Commit f6d1f6e4a58edae4776937647381a43fea5e83a5 broke selection of UARTs
other than UART0 for am335x_evm configurations by setting CONS_INDEX to
1 for all configurations.  Revert the CONS_INDEX changes.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
11 years agoboards.cfg: update email address for ti814x_evm maintainer
Matt Porter [Mon, 4 Nov 2013 20:31:15 +0000 (15:31 -0500)]
boards.cfg: update email address for ti814x_evm maintainer

Update my email address as ti814x_evm maintainer to save
people some frustrating bounces and non-response.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
11 years agoarm, am33x: make RTC32K OSC enable configurable
Heiko Schocher [Mon, 4 Nov 2013 13:05:00 +0000 (14:05 +0100)]
arm, am33x: make RTC32K OSC enable configurable

As
http://www.denx.de/wiki/view/U-Boot/DesignPrinciples#2_Keep_it_Fast
states:
"Initialize devices only when they are needed within U-Boot"

enable the RTC32K OSC only, if CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is
enabled. Enable this in ti_am335x_common.h, so all boards in mainline
should work as before.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
11 years agobootcount: store bootcount var in environment
Heiko Schocher [Mon, 4 Nov 2013 13:04:59 +0000 (14:04 +0100)]
bootcount: store bootcount var in environment

If no softreset save registers are found on the hardware
"bootcount" is stored in the environment. To prevent a
saveenv on all reboots, the environment variable
"upgrade_available" is introduced. If "upgrade_available" is
0, "bootcount" is always 0 therefore no need to save the
environment on u-boot boot, if "upgrade_available" is 1 "bootcount"
is incremented in the environment and environment gets written
on u-boot start.
So the Userspace Applikation must set the "upgrade_available"
and "bootcount" variable to 0 (for example with fw_setenv),
if a boot was successfully.

Signed-off-by: Heiko Schocher <hs@denx.de>
11 years agoMerge branch 'iu-boot/master' into 'u-boot-arm/master'
Albert ARIBAUD [Sat, 9 Nov 2013 11:51:47 +0000 (12:51 +0100)]
Merge branch 'iu-boot/master' into 'u-boot-arm/master'

Conflicts:
arch/arm/cpu/arm926ejs/mxs/Makefile
board/compulab/cm_t35/Makefile
board/corscience/tricorder/Makefile
board/ppcag/bg0900/Makefile
drivers/bootcount/Makefile
include/configs/omap4_common.h
include/configs/pdnb3.h

Makefile conflicts are due to additions/removals of
object files on the ARM branch vs KBuild introduction
on the main branch. Resolution consists in adjusting
the list of object files in the main branch version.
This also applies to two files which are not listed
as conflicting but had to be modified:

board/compulab/common/Makefile
board/udoo/Makefile

include/configs/omap4_common.h conflicts are due to
the OMAP4 conversion to ti_armv7_common.h on the ARM
side, and CONFIG_SYS_HZ removal on the main side.
Resolution is to convert as this icludes removal of
CONFIG_SYS_HZ.

include/configs/pdnb3.h is due to a removal on ARM side.
Trivial resolution is to remove the file.

Note: 'git show' will also list two files just because
they are new:

include/configs/am335x_igep0033.h
include/configs/omap3_igep00x0.h

11 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-usb
Tom Rini [Fri, 8 Nov 2013 20:25:29 +0000 (15:25 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-usb

11 years agosandbox: convert to common time functions
Rob Herring [Fri, 8 Nov 2013 14:40:44 +0000 (08:40 -0600)]
sandbox: convert to common time functions

Convert sandbox to use common time functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
11 years agotime: add weak annotation to timer_read_counter declaration
Rob Herring [Fri, 8 Nov 2013 14:40:43 +0000 (08:40 -0600)]
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>
11 years agonetconsole loses 2nd character of input
Suriyan Ramasami [Wed, 16 Oct 2013 16:54:24 +0000 (09:54 -0700)]
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>
11 years agoserial: s5p: Staticize local functions
Axel Lin [Wed, 16 Oct 2013 01:47:13 +0000 (09:47 +0800)]
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>
11 years agoenv: fix the env export varname
Pierre Aubert [Tue, 8 Oct 2013 12:20:27 +0000 (14:20 +0200)]
env: fix the env export varname

The env export command doesn't export the first variable of the list
since commit 5a31ea04c9ee5544fbb70ad7597ea4b294840eab
"env grep" - reimplement command using hexport_r()

Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
11 years agohighbank: set AUTOBOOT_KEYED_CTRLC config option
Mark Langsdorf [Tue, 10 Sep 2013 20:20:24 +0000 (15:20 -0500)]
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>
11 years agoautoboot: add an option to override keyed autoboot
Mark Langsdorf [Tue, 10 Sep 2013 20:20:23 +0000 (15:20 -0500)]
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>
11 years agoserial: xuartlite: Staticize local functions
Axel Lin [Wed, 16 Oct 2013 01:45:56 +0000 (09:45 +0800)]
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>
11 years agoserial: mxs_auart: Staticize local functions
Axel Lin [Tue, 15 Oct 2013 02:52:35 +0000 (10:52 +0800)]
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>
11 years agofs:fat: fix set file name function
Piotr Wilczek [Fri, 11 Oct 2013 13:43:33 +0000 (15:43 +0200)]
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>
11 years agocmd_zfs: normalize 'file not found' errors
Luka Perkov [Wed, 9 Oct 2013 23:32:28 +0000 (01:32 +0200)]
cmd_zfs: normalize 'file not found' errors

Signed-off-by: Luka Perkov <luka@openwrt.org>
11 years agocmd_reiser: normalize 'file not found' errors
Luka Perkov [Wed, 9 Oct 2013 23:32:27 +0000 (01:32 +0200)]
cmd_reiser: normalize 'file not found' errors

Signed-off-by: Luka Perkov <luka@openwrt.org>
11 years agocmd_ubifs: normalize 'file not found' errors
Tim Harvey [Wed, 9 Oct 2013 23:32:26 +0000 (01:32 +0200)]
cmd_ubifs: normalize 'file not found' errors

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
11 years agoinclude: delete include/linux/config.h
Masahiro Yamada [Mon, 7 Oct 2013 07:04:18 +0000 (16:04 +0900)]
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>
11 years agoconfig/sandbox: Add EFI and GPT support
Egbert Eich [Fri, 4 Oct 2013 17:44:07 +0000 (19:44 +0200)]
config/sandbox: Add EFI and GPT support

Signed-off-by: Egbert Eich <eich@suse.com>
11 years agoconfig: Define HAVE_BLOCK_DEVICE when CONFIG_CMD_GPT is set
Egbert Eich [Fri, 4 Oct 2013 17:42:53 +0000 (19:42 +0200)]
config: Define HAVE_BLOCK_DEVICE when CONFIG_CMD_GPT is set

Signed-off-by: Egbert Eich <eich@suse.com>
11 years agocmd/gpt: Support gpt command for all devices
Egbert Eich [Fri, 4 Oct 2013 16:53:04 +0000 (18:53 +0200)]
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>
11 years agocosmetic: UDM-net: clean up the remainders of dead driver
Masahiro Yamada [Tue, 24 Sep 2013 01:32:06 +0000 (10:32 +0900)]
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>
11 years agocosmetic: UDM-serial: clean up the remainders of dead driver
Masahiro Yamada [Tue, 24 Sep 2013 01:32:05 +0000 (10:32 +0900)]
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>
11 years agocosmetic: doc: driver-model: Do not number driver lists
Masahiro Yamada [Tue, 24 Sep 2013 01:32:04 +0000 (10:32 +0900)]
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>
11 years agousb: dfu: make nand upload working
Bo Shen [Thu, 7 Nov 2013 06:29:41 +0000 (14:29 +0800)]
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>
11 years agousb, g_dnl: make iSerialNumber board configurable
Heiko Schocher [Mon, 4 Nov 2013 13:05:01 +0000 (14:05 +0100)]
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>
11 years agousb: dfu: correct dfu buffer inited value
Bo Shen [Wed, 16 Oct 2013 09:26:38 +0000 (17:26 +0800)]
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>
11 years agousb: dfu: decrease dfu->r_left along with the transfer
Bo Shen [Wed, 16 Oct 2013 09:26:37 +0000 (17:26 +0800)]
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>
11 years agousb: ohci-hcd: submit_common_msg: report actual_length properly
Mateusz Kulikowski [Wed, 23 Oct 2013 18:26:27 +0000 (20:26 +0200)]
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>
11 years agousb: ums: add ums exit feature by ctrl+c or by detach usb cable
Przemyslaw Marczak [Wed, 23 Oct 2013 12:30:46 +0000 (14:30 +0200)]
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>
11 years agousb: ums: move ums code from trats to Samsung common directory
Przemyslaw Marczak [Wed, 23 Oct 2013 12:30:45 +0000 (14:30 +0200)]
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>
11 years agousb: ums: fix disk capacity miscalculation and code cleanup
Przemyslaw Marczak [Wed, 23 Oct 2013 12:30:44 +0000 (14:30 +0200)]
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>
11 years agousb: ums: allows using every mmc device with ums.
Przemyslaw Marczak [Wed, 23 Oct 2013 12:30:43 +0000 (14:30 +0200)]
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>
11 years agousb: ums: code refactoring to improve reusability on other boards.
Przemyslaw Marczak [Wed, 23 Oct 2013 12:30:42 +0000 (14:30 +0200)]
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>
11 years agoREADME: remove wrong config name
Igor Grinberg [Wed, 6 Nov 2013 15:24:02 +0000 (17:24 +0200)]
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>
11 years agocosmetic: remove empty lines at the top of file
Masahiro Yamada [Tue, 5 Nov 2013 02:28:48 +0000 (11:28 +0900)]
cosmetic: remove empty lines at the top of file

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
11 years agocommon/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions
Miao Yan [Mon, 4 Nov 2013 03:18:14 +0000 (11:18 +0800)]
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>
11 years agoMakefile: do not create a symbolic link to arch/${ARCH}/include/asm
Masahiro Yamada [Fri, 1 Nov 2013 01:28:45 +0000 (10:28 +0900)]
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>
11 years agoAdd support for SX151x SPI GPIO Expanders
Viktar Palstsiuk [Thu, 31 Oct 2013 08:16:59 +0000 (11:16 +0300)]
Add support for SX151x SPI GPIO Expanders

Signed-off-by: Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
11 years agoboards.cfg: remove git leftovers
Luka Perkov [Thu, 31 Oct 2013 02:59:46 +0000 (03:59 +0100)]
boards.cfg: remove git leftovers

Remove 'HEAD' line which is most likely left there while rebasing. It was
introduced in commit 877bfe37dc00b0ae59f37742954a62bce3fdf3a0.

Signed-off-by: Luka Perkov <luka@openwrt.org>
11 years agoboards.cfg: remove trailing whitespace
Paul Burton [Wed, 23 Oct 2013 10:17:14 +0000 (11:17 +0100)]
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>
11 years agocmd_nvedit.c: Add env exists command
Andrew Ruder [Wed, 23 Oct 2013 00:07:34 +0000 (19:07 -0500)]
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>