platform/kernel/u-boot.git
8 years agoserial: zynq: Remove duplicated header
Michal Simek [Wed, 2 Dec 2015 11:57:11 +0000 (12:57 +0100)]
serial: zynq: Remove duplicated header

debug_uart.h is included twice.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoserial: zynq: Fix incorrect reference to s5p driver
Michal Simek [Tue, 1 Dec 2015 13:29:34 +0000 (14:29 +0100)]
serial: zynq: Fix incorrect reference to s5p driver

Remove this c&p error from s5p driver.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agozynq: sdhci: Move driver to DM
Michal Simek [Mon, 30 Nov 2015 15:13:03 +0000 (16:13 +0100)]
zynq: sdhci: Move driver to DM

Move driver to DM

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agozynq: sdhci: Remove zynq_sdhci_of_init()
Michal Simek [Mon, 30 Nov 2015 15:07:07 +0000 (16:07 +0100)]
zynq: sdhci: Remove zynq_sdhci_of_init()

Prepare for using DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agozynq: sdhci: Calculate minimum frequency based on max frequency
Siva Durga Prasad Paladugu [Wed, 25 Nov 2015 06:21:37 +0000 (11:51 +0530)]
zynq: sdhci: Calculate minimum frequency based on max frequency

Calculate the minimum sd clock based on max clock. This will
be done by add_sdhci() if we pass minimum clock as zero.
It also does based on SD host contoller version.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Remove unused SERIAL macros for serial_zynq
Michal Simek [Fri, 20 Nov 2015 09:11:03 +0000 (10:11 +0100)]
ARM: zynq: Remove unused SERIAL macros for serial_zynq

Remove unused macros when driver was moved to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Extend malloc size
Michal Simek [Tue, 1 Dec 2015 08:03:43 +0000 (09:03 +0100)]
ARM: zynq: Extend malloc size

SPL DM MMC FAT requires more malloc space(3k fat buffers + dm)
that it is available now. Extend SPL malloc space.

Current OCM layout:
0xffff0000 - 0xfff2000 - Full malloc space
0xffff2000 - 0xffff300 - Stack location
0xfffff300 - CONFIG_SYS_MALLOC_F_LEN - Early malloc space
0xfffffd00 - sizeof(GD) - GD
0xfffffe00 - 0xffffffff - SoC specific boot code

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM: zynq: Fix location of stack and malloc areas
Michal Simek [Mon, 23 Nov 2015 15:27:38 +0000 (16:27 +0100)]
ARM: zynq: Fix location of stack and malloc areas

The patch
"board_init: Change the logic to setup malloc_base"
(sha1: 9ac4fc82071ce346e3885118242ff45d22f69b82)
breaks SPL for Zynq because it puts early alloc area on the stack which
caused that stack was decreased by CONFIG_SYS_MALLOC_F_LEN (0x400)
and there was not enough space for regular stack.

This patch changes memory layout to better utilize the last 64k OCM
block.
0xffff0000 - 0xfff1000 - Full malloc space
0xffff1000 - 0xffff300 - Stack location
0xfffff300 - CONFIG_SYS_MALLOC_F_LEN - Early malloc space
0xfffffd00 - sizeof(GD) - GD
0xfffffe00 - 0xffffffff - SoC specific boot code

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Moritz Fischer <moritz.fischer@ettus.com>
8 years agoARM: zynq: Enable debug console for zc702
Michal Simek [Tue, 1 Dec 2015 07:41:17 +0000 (08:41 +0100)]
ARM: zynq: Enable debug console for zc702

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agoARM64: zynqmp: Enable FIT config option via Kconfig
Michal Simek [Fri, 20 Nov 2015 09:13:25 +0000 (10:13 +0100)]
ARM64: zynqmp: Enable FIT config option via Kconfig

Remove configuration options from board file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Enable CTRL+C in wait_for_bit
Michal Simek [Thu, 24 Sep 2015 18:13:45 +0000 (20:13 +0200)]
net: gem: Enable CTRL+C in wait_for_bit

Enable to break waiting loop at any time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agonet: gem: Move gem to Kconfig
Michal Simek [Mon, 30 Nov 2015 13:34:52 +0000 (14:34 +0100)]
net: gem: Move gem to Kconfig

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agonet: gem: Read information about interface from DT
Michal Simek [Mon, 30 Nov 2015 13:17:50 +0000 (14:17 +0100)]
net: gem: Read information about interface from DT

Do not set interface via configs. Read information from DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agonet: gem: Move driver to DM
Michal Simek [Mon, 30 Nov 2015 13:14:56 +0000 (14:14 +0100)]
net: gem: Move driver to DM

- Enable DM_ETH by default for Zynq and ZynqMP
- Remove board_eth_init code
- Change miiphy_read function to return value instead of error code
  based on DM requirement
- Do not enable EMIO DT support by default

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agonet: gem: Fix miiphy_read name
Michal Simek [Mon, 30 Nov 2015 13:14:37 +0000 (14:14 +0100)]
net: gem: Fix miiphy_read name

Sync it with write function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agonet: gem: Remove zynq_gem_of_init()
Michal Simek [Mon, 30 Nov 2015 13:00:20 +0000 (14:00 +0100)]
net: gem: Remove zynq_gem_of_init()

This function was used for OF init before DM.
Remove this function as the part of move to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agonet: gem: Enable MDIO bus earlier
Michal Simek [Mon, 30 Nov 2015 12:58:36 +0000 (13:58 +0100)]
net: gem: Enable MDIO bus earlier

Enable access to MDIO before zynq_gem_init is called.
It enables read information about phy earlier.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Check if priv->phydev is valid
Michal Simek [Mon, 30 Nov 2015 13:03:37 +0000 (14:03 +0100)]
net: gem: Check if priv->phydev is valid

Check return value.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agonet: gem: Extract phy init code
Michal Simek [Mon, 30 Nov 2015 12:54:43 +0000 (13:54 +0100)]
net: gem: Extract phy init code

Move phy init code out of zynq_gem_init. DM drivers are normally calling
this code from probe function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Remove phydev variable
Michal Simek [Mon, 30 Nov 2015 12:44:49 +0000 (13:44 +0100)]
net: gem: Remove phydev variable

Resort code to use priv->phydev variable directly.
It will simplify move to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Change mii function not to use eth_device structure
Michal Simek [Mon, 30 Nov 2015 09:24:15 +0000 (10:24 +0100)]
net: gem: Change mii function not to use eth_device structure

Next step to move driver to driver model. Do not use eth_device
structure. Use private structure instead.
Add iobase to private structure to store gem iobase.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Change mdio_wait prototype to pass regs
Michal Simek [Mon, 30 Nov 2015 09:09:43 +0000 (10:09 +0100)]
net: gem: Change mdio_wait prototype to pass regs

Pass regs instead of dev because this will be chagned by
driver model.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
8 years agonet: gem: Do not continue if phy is not found
Michal Simek [Mon, 30 Nov 2015 12:38:32 +0000 (13:38 +0100)]
net: gem: Do not continue if phy is not found

Add return value for phy detection algorithm to stop init function when
phy is not found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoARM: zynq: Remove CONFIG_API
Michal Simek [Mon, 30 Nov 2015 14:46:12 +0000 (15:46 +0100)]
ARM: zynq: Remove CONFIG_API

CONFIG_API is causing compilation error when DM_ETH is enabled because
eth_get_dev() is not available.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoARM: zynq: Remove PHYLIB from config to defconfig
Michal Simek [Mon, 30 Nov 2015 10:23:32 +0000 (11:23 +0100)]
ARM: zynq: Remove PHYLIB from config to defconfig

Move PHYLIB from board config to defconfig

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
8 years agoam33xx: Update serial pdata
Tom Rini [Sun, 6 Dec 2015 16:09:59 +0000 (11:09 -0500)]
am33xx: Update serial pdata

We now want to make sure that we have the platform data for NS16550 when
we do not have OF_CONTROL set.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agodm: tegra: Provide serial platform data for SPL
Simon Glass [Fri, 4 Dec 2015 15:58:39 +0000 (08:58 -0700)]
dm: tegra: Provide serial platform data for SPL

At present an incorrect #if term is preventing this data from being compiled
in. All tegra boards use driver model for serial, so we can just drop this.

Fixes: fde7e18938d8 ("dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
8 years agodm: serial: ns16550: Add pre-reloc flag to the driver
Simon Glass [Fri, 4 Dec 2015 15:58:38 +0000 (08:58 -0700)]
dm: serial: ns16550: Add pre-reloc flag to the driver

For platforms that don't use device tree in SPL the only way to mark this
driver as 'required by relocation' is with the DM_FLAG_PRE_RELOC flag. Add
this to ensure that the driver is bound.

Fixes: fde7e18938d8 ("dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
8 years agotegra: Remove merge markers in some Kconfig files
Simon Glass [Fri, 4 Dec 2015 15:58:37 +0000 (08:58 -0700)]
tegra: Remove merge markers in some Kconfig files

These were added by mistake in commit fde7e189. They cause a warning when
configuring the boards. Remove them.

Fixes: fde7e18938d8 ("dm: tegra: pci: Move CONFIG_PCI_TEGRA to Kconfig")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reported-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
8 years agorpi: add support for Raspberry Pi Zero
Stephen Warren [Sat, 5 Dec 2015 05:07:46 +0000 (22:07 -0700)]
rpi: add support for Raspberry Pi Zero

For U-Boot's purposes, at present all we care about is ensuring there's
a model table entry.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agorpi: fix revision scheme parsing
Stephen Warren [Sat, 5 Dec 2015 05:07:45 +0000 (22:07 -0700)]
rpi: fix revision scheme parsing

The RPi has two different schemes for encoding board revision values.
When adding RPi 2 support, I thought that the conflicting type field
values were to be interpreted based on bcm2835-vs-bcm2836. In fact, the
scheme bit determines the encoding. The RPi Zero uses the bcm2835 yet
uses the new encoding scheme. Fix the code to cater for this correctly.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agorpi: get rid of BCM2835_BOARD_REV_* macros
Stephen Warren [Sat, 5 Dec 2015 05:07:44 +0000 (22:07 -0700)]
rpi: get rid of BCM2835_BOARD_REV_* macros

There are two numbering schemes for the RPi revision values; old and new
scheme. The values within each scheme overlap. Hence, it doesn't make
sense to have absolute/global names for the revision IDs. Get rid of the
names and just use the raw revision/type values to set up the array of
per-revision data.

This change makes most sense when coupled with the next change. However,
it's split out so that the mechanical cut/paste is separate from the
logic changes for easier review and problem bisection.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
8 years agomkimage : Fix generating multi and script images
Philippe De Swert [Thu, 3 Dec 2015 22:11:23 +0000 (00:11 +0200)]
mkimage : Fix generating multi and script images

Seems 92a655c3 broke creating multi and script type images.
Since the file1:file2:file3 string does not get split up,
it fails on trying to open an non-existing file.

mkimage -A arm -O linux -T multi -C none -d zImage:splash.bmp:device.dtb uimage
tools/mkimage: Can't open zImage:splash.bmp:device.dtb: No such file or directory

Since the sizes of the different parts seem to get added in the actual
routine that handles multi and script type images, we can probably skip the
bit of the code that causes the failure for that type of images.

Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
8 years agocommon: board: Dont relocate FDT incase of CONFIG_OF_EMBED
Siva Durga Prasad Paladugu [Thu, 3 Dec 2015 14:46:03 +0000 (15:46 +0100)]
common: board: Dont relocate FDT incase of CONFIG_OF_EMBED

Don't relocate fdt in case of CONFIG_OF EMBED as the fdt is
already embedded with u-boot image.
Update fdt_blob after relocation as the fdt will be copied
during u-boot relocation.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com> (QEMU x86)
Tested-by: Thomas Chou <thomas@wytron.com.tw> (Nios2)
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agospl: mmc: Unify non/driver model spl_mmc_find_device()
Simon Glass [Wed, 2 Dec 2015 17:59:13 +0000 (10:59 -0700)]
spl: mmc: Unify non/driver model spl_mmc_find_device()

It is risky to have two different functions with much the same code. Future
authors may update one but not the other. It is hard to see which parts are
the same and which are different.

Unify the functions and drop the differences that are not really needed.

Note that one puts() becomes printf() as Tom mentioned that this does not
affect image size:

https://patchwork.ozlabs.org/patch/537276/

Note: It would be better to have an empty printf() and avoid the #ifdef for
CONFIG_SPL_LIBCOMMON_SUPPORT.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
8 years agospl: mmc: Rename 'mmc' variable to 'mmcp'
Simon Glass [Wed, 2 Dec 2015 17:59:12 +0000 (10:59 -0700)]
spl: mmc: Rename 'mmc' variable to 'mmcp'

The 'p' suffix makes it more obvious that we are dealing with a pointer
to a (pointer) value that will be returned to its caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
Tested-by: Michal Simek <michal.simek@xilinx.com>
8 years agospl: mmc: Fix compiler warning with CONFIG_DM_MMC
Simon Glass [Wed, 2 Dec 2015 17:59:11 +0000 (10:59 -0700)]
spl: mmc: Fix compiler warning with CONFIG_DM_MMC

Since commit 4188ba3 we get the following warning on rockchip boards:

common/spl/spl_mmc.c:31:24: warning: ‘mmc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  count = mmc->block_dev.block_read(0, sector, 1, header);
                        ^
common/spl/spl_mmc.c:251:14: note: ‘mmc’ was declared here
  struct mmc *mmc;

Correct this by move the variable init earlier.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
8 years agodrivers: remoteproc: rproc-uclass: Fix check for NULL pointers
Nishanth Menon [Tue, 1 Dec 2015 04:05:58 +0000 (22:05 -0600)]
drivers: remoteproc: rproc-uclass: Fix check for NULL pointers

Neither uc_pdata->name nor check_name are supposed to be NULL in
_rproc_name_is_unique(). if uc_pdata->name is NULL, we are not
intialized yet, however if check_data is NULL, we do not have
proper data. Further, if either were NULL, strlen will crap out
while attempting to derefence NULL.

Instead, just check if either of these are NULL and bail out.

This should also fix the following coverity scan warnings:
*** CID 132281:  Null pointer dereferences  (FORWARD_NULL)
/drivers/remoteproc/rproc-uclass.c: 73 in _rproc_name_is_unique()

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
8 years agoChange e-mail address of Kamil Lulko
Kamil Lulko [Sun, 29 Nov 2015 10:50:53 +0000 (11:50 +0100)]
Change e-mail address of Kamil Lulko

Signed-off-by: Kamil Lulko <kamil.lulko@gmail.com>
8 years agons16550: change reg-shift property default to zero
Thomas Chou [Sun, 29 Nov 2015 06:01:03 +0000 (14:01 +0800)]
ns16550: change reg-shift property default to zero

Change reg-shift property default to zero. When the integer property
is missing, it should be taken as zero. This is consistent to Linux
drivers/tty/serial/of_serial.c.

The x86 and most powerpc use reg-shift of 0. Most others use reg-shift
of 2. While reg-shift of 1 is rarely used.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoarch/arm/cpu/arm920t/ep93xx/led.c: Mark inline functions as static inline
Tom Rini [Sat, 28 Nov 2015 13:04:43 +0000 (08:04 -0500)]
arch/arm/cpu/arm920t/ep93xx/led.c: Mark inline functions as static inline

With gcc-5.x we get warning about inline non-static functions referring to
static elements.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocommon: cli_hush: avoid memory leak
Peng Fan [Fri, 27 Nov 2015 02:12:02 +0000 (10:12 +0800)]
common: cli_hush: avoid memory leak

Need to free memory avoid memory leak, when error.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
8 years agocommon/Makefile: Compile fdt_support is enabled in SPL
Stefan Roese [Thu, 26 Nov 2015 12:38:15 +0000 (13:38 +0100)]
common/Makefile: Compile fdt_support is enabled in SPL

When CONFIG_SPL_OF_TRANSLATE is enabled fdt_support.c needs to get
compiled. Otherwise fdt_translate_address() is missing which is needed
in dev_get_addr().

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agodefconfig: dra74_evm: enable serial driver model
Mugunthan V N [Thu, 26 Nov 2015 11:55:42 +0000 (17:25 +0530)]
defconfig: dra74_evm: enable serial driver model

Enable serial driver model for dra74_evm as ns16550 supports
driver model.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm: dts: dra7-evm: add chosen node to specify serial console device
Mugunthan V N [Thu, 26 Nov 2015 11:55:41 +0000 (17:25 +0530)]
arm: dts: dra7-evm: add chosen node to specify serial console device

Introduce chosen node and specify uart0 to be used as serial console.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoarm: dts: omap: add reg-shift to serial device tree node
Mugunthan V N [Thu, 26 Nov 2015 09:19:10 +0000 (14:49 +0530)]
arm: dts: omap: add reg-shift to serial device tree node

With the commit 'c7b9686d5d48 ("ns16550: unify serial_omap")' all
TI platforms are broken with DM/DT boot as ns16550 driver expects
reg-shift from DT which is not populated for TI platforms.
Earlier it worked as it was hard coded to 2 in serial-omap
driver. So adding the reg-shift to serial nodes for dra7, am4372
and am33xx dtsi files. Tested this patch on am437x-sk-evm,
am437x-gp-evm, am335x-boneblack, dra74x-evm and dra72x-evm.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
8 years agocommon: miiphyutil: avoid memory leak
Peng Fan [Thu, 26 Nov 2015 02:26:59 +0000 (10:26 +0800)]
common: miiphyutil: avoid memory leak

The following code will alloc memory for new_dev and ldev:
"
new_dev = mdio_alloc();
ldev = malloc(sizeof(*ldev));
"
Either new_dev or ldev is NULL, directly return, but this may leak memory.
So before return, using free(ldev) and mdio_free(new_dev) to avoid
leaking memory, also free can handle NULL pointer.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agocommon: mmc: unsigned char compared against 0
Peng Fan [Wed, 25 Nov 2015 09:16:21 +0000 (17:16 +0800)]
common: mmc: unsigned char compared against 0

"enable" is unsigned char type and its value will not be
negative, so discard "enable < 0".

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Diego Santa Cruz <Diego.SantaCruz@spinetix.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoeeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMS
Marek Vasut [Tue, 24 Nov 2015 23:37:44 +0000 (00:37 +0100)]
eeprom: Zap CONFIG_SYS_I2C_MULTI_EEPROMS

This symbol is no longer used anywhere, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
8 years agoFix typo: firstly -> first.
Vagrant Cascadian [Tue, 24 Nov 2015 22:46:24 +0000 (14:46 -0800)]
Fix typo: firstly -> first.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Acked-by: Marek Vasut <marex@denx.de>
8 years agoFix typo: commmand -> command.
Vagrant Cascadian [Tue, 24 Nov 2015 22:45:02 +0000 (14:45 -0800)]
Fix typo: commmand -> command.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
8 years agompc8xx: remove stale "lwmon" files
Wolfgang Denk [Tue, 24 Nov 2015 13:03:00 +0000 (14:03 +0100)]
mpc8xx: remove stale "lwmon" files

Commit acc2372d "mpc8xx: remove lwmon board support" removed support
for the MPC823 based "lwmon" board, but left some board specific POST
files.  This patch cleans up and removes the now unused files.

Signed-off-by: Wolfgang Denk <wd@denx.de>
8 years agocommon: miiphyutil: no need to check name of mii_dev
Peng Fan [Tue, 24 Nov 2015 09:03:47 +0000 (17:03 +0800)]
common: miiphyutil: no need to check name of mii_dev

The entry name of mii_dev is an array not pointer, so
no need to check.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agocommon: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY
Peng Fan [Tue, 24 Nov 2015 08:54:22 +0000 (16:54 +0800)]
common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY

If condition of "(load == image_start || load == image_data)" is true,
should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
at the end of the switch case.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agocommon: cli_hush: avoid dead code
Peng Fan [Tue, 24 Nov 2015 08:54:21 +0000 (16:54 +0800)]
common: cli_hush: avoid dead code

Condition "(value == NULL && ++value == NULL)" actully will
always return false.

Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
but not continue.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Rabin Vincent <rabin@rab.in>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agocommon: bootm: check return value of strict_strtoul
Peng Fan [Tue, 24 Nov 2015 08:54:20 +0000 (16:54 +0800)]
common: bootm: check return value of strict_strtoul

Before continue, check return value of strict_strtoul.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
8 years agoMerge branch 'master' of http://git.denx.de/u-boot-sparc
Tom Rini [Fri, 4 Dec 2015 22:50:34 +0000 (17:50 -0500)]
Merge branch 'master' of git.denx.de/u-boot-sparc

8 years agoMerge branch 'master' of git://www.denx.de/git/u-boot-imx
Tom Rini [Fri, 4 Dec 2015 13:21:28 +0000 (08:21 -0500)]
Merge branch 'master' of git://denx.de/git/u-boot-imx

8 years agosparc: Remove non-generic board init files: board.c, time.c
Francois Retief [Sat, 21 Nov 2015 21:15:07 +0000 (23:15 +0200)]
sparc: Remove non-generic board init files: board.c, time.c

Remove the board.c and time.c files and all associated non-generic board
initialization code.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon3: Added busy wait function, made wait_ms() work when IRQ is disabled
Daniel Hellstrom [Fri, 22 Jan 2010 11:02:40 +0000 (12:02 +0100)]
sparc: leon3: Added busy wait function, made wait_ms() work when IRQ is disabled

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: leon3: Added CPU count and frequency detection.
Daniel Hellstrom [Fri, 22 Jan 2010 12:25:03 +0000 (13:25 +0100)]
sparc: leon3: Added CPU count and frequency detection.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: Removed USB stop from linux bootm, arch-independent bootm stop USB
Daniel Hellstrom [Fri, 22 Jan 2010 12:50:22 +0000 (13:50 +0100)]
sparc: Removed USB stop from linux bootm, arch-independent bootm stop USB

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: Use microseconds instead of ticks for timeout
Francois Retief [Mon, 27 Oct 2014 13:56:01 +0000 (15:56 +0200)]
sparc: Use microseconds instead of ticks for timeout

We now use the generic delay method which specifies the timeout as
microseconds instead of ticks.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards
Francois Retief [Wed, 28 Oct 2015 14:49:02 +0000 (16:49 +0200)]
sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Update PROM initialization code for generic board
Francois Retief [Mon, 23 Nov 2015 11:05:44 +0000 (13:05 +0200)]
sparc: Update PROM initialization code for generic board

Fixed the prom_relocate() function in start.S file by reserving memory in
the board_init_f sequence and saving the offset to the __prom_start_reloc
variable. This value is used as the destination when relocating the PROM.

Add the prom_init() function to the end of the board_init_r sequence.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Update cpu_init.c to use generic timer infrastructure
Francois Retief [Wed, 28 Oct 2015 13:18:22 +0000 (15:18 +0200)]
sparc: Update cpu_init.c to use generic timer infrastructure

Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use
of the generic timer infrastructure in lib/time.c.

Created a timer_init() function to initialize the timer hardware and update
the #ifdef in board_init_f to allow this function to be called during the
start-up sequence.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon2: Updates for generic board initialization
Francois Retief [Sat, 21 Nov 2015 11:25:41 +0000 (13:25 +0200)]
sparc: leon2: Updates for generic board initialization

Reworked the LEON2 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON2 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon3: Updates for generic board initialization
Francois Retief [Wed, 28 Oct 2015 22:02:48 +0000 (00:02 +0200)]
sparc: leon3: Updates for generic board initialization

Reworked the LEON3 start.S code to call board_init_f function at startup.
Also implemented the relocate_code function in assembly to relocate the
monitor and setup the stack pointer before calling relocated board_init_r.

Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON3 boards.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon3: Clear all unused GPTIMER registers.
Daniel Hellstrom [Wed, 22 Sep 2010 15:42:29 +0000 (17:42 +0200)]
sparc: leon3: Clear all unused GPTIMER registers.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: leon3: Move ambapp_bus_init() call to arch_cpu_init() function
Francois Retief [Thu, 29 Oct 2015 10:58:52 +0000 (12:58 +0200)]
sparc: leon3: Move ambapp_bus_init() call to arch_cpu_init() function

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon3: Move snoop detection from startup.S to arch_cpu_init()
Francois Retief [Wed, 28 Oct 2015 13:48:41 +0000 (15:48 +0200)]
sparc: leon3: Move snoop detection from startup.S to arch_cpu_init()

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Initial ground work for generic board initialization
Francois Retief [Wed, 28 Oct 2015 12:29:32 +0000 (14:29 +0200)]
sparc: Initial ground work for generic board initialization

Initial ground work in preperation for generic board initialization
code for the SPARC architecture.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Fix whitespace in cpu/leon2/cpu_init.c
Francois Retief [Sat, 21 Nov 2015 15:07:48 +0000 (17:07 +0200)]
sparc: Fix whitespace in cpu/leon2/cpu_init.c

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX
Francois Retief [Fri, 30 Oct 2015 11:23:41 +0000 (13:23 +0200)]
sparc: leon3: Updated serial driver to use CONFIG_CONS_INDEX

Updated the LEON3 serial driver to make use of the CONFIG_CONS_INDEX
option to select which serial port the console will use.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Serial baud rate register support multiple buses with different frequency
Daniel Hellstrom [Fri, 22 Jan 2010 10:49:04 +0000 (11:49 +0100)]
sparc: Serial baud rate register support multiple buses with different frequency

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: leon3: Clear GD_FLAG_SERIAL_READY flag on AMBA failure
Francois Retief [Mon, 23 Nov 2015 07:49:57 +0000 (09:49 +0200)]
sparc: leon3: Clear GD_FLAG_SERIAL_READY flag on AMBA failure

Clear the GD_FLG_SERIAL_READY flag on AMBA P&P lookup failure so that the
panic function can use DEBUG_UART driver. drivers/serial/serial.c set this
flag before calling this function, preventing DEBUG_UART code from running.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Added function that checks if IRQ is on or off
Daniel Hellstrom [Fri, 22 Jan 2010 10:57:49 +0000 (11:57 +0100)]
sparc: Added function that checks if IRQ is on or off

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
8 years agosparc: Remove version_string variable from start.S file
Francois Retief [Wed, 28 Oct 2015 13:56:45 +0000 (15:56 +0200)]
sparc: Remove version_string variable from start.S file

Remove the version_string variable from start.S file. A weak variable
is also set in the cmd_version.c file. No need for architecture override.

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agosparc: Move SYS_SPARC_NWINDOWS to Kconfig
Francois Retief [Sun, 1 Nov 2015 13:40:00 +0000 (15:40 +0200)]
sparc: Move SYS_SPARC_NWINDOWS to Kconfig

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
8 years agoRevert "LCD: Add an option to skip registration as an stdio output"
Anatolij Gustschin [Wed, 2 Dec 2015 14:38:00 +0000 (15:38 +0100)]
Revert "LCD: Add an option to skip registration as an stdio output"

This reverts commit 05bfe1321024e2ae0039dc16f17d2165610fb4fd.

As discussed on the list, we already have the needed functionality by
defining CONFIG_SYS_CONSOLE_IS_IN_ENV, CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
and adding custom overwrite_console() in the board code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
8 years agoiocon: Disable FIT_VERBOSE
Tom Rini [Tue, 1 Dec 2015 20:49:42 +0000 (15:49 -0500)]
iocon: Disable FIT_VERBOSE

In order to fit into image constraints again, remove this feature.

Signed-off-by: Tom Rini <trini@konsulko.com>
8 years agoarm: imx6: novena: Enable extfs support in SPL
Marek Vasut [Wed, 25 Nov 2015 23:18:45 +0000 (00:18 +0100)]
arm: imx6: novena: Enable extfs support in SPL

Simple patch to enable support for extfs filesystem in SPL,
this is useful to those who want to avoid vfat like plague.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoarm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions
Marek Vasut [Thu, 26 Nov 2015 13:08:50 +0000 (14:08 +0100)]
arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4c7dca7710362f6c871098557b934ad
Author: Peng Fan <Peng.Fan@freescale.com>
Date:   Fri Aug 7 16:43:45 2015 +0800

    power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>
Tested-by: Vagrant Cascadian <vagrant@aikidev.net>
Reviewed-by: Peng Fan <Peng.Fan@freescale.com>
Acked-by: Tim Harvey <tharvey@gateworks.com>
8 years agorockchip: Explicitly set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN
Sjoerd Simons [Sun, 22 Nov 2015 07:21:04 +0000 (08:21 +0100)]
rockchip: Explicitly set CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN

Now that u-boot relocates the malloc area in SPL to SDRAM, with the
malloc area sitting below the SPL_STACK_R_ADDR the
SPL_STACK_R_MALLOC_SIMPLE_LEN needs to be set explicitly for
rockchip as its SPL_STACK_R_ADDR (512kb) is smaller then
STACK_R_MALLOC_SIMPLE_LEN (1Mb).

Using the same value as SYS_MALLOC_F_LEN (8kb) is enough to load u-boot
from SD card.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agoRevert "rockchip: Reconfigure the malloc based to point to system memory"
Sjoerd Simons [Sun, 22 Nov 2015 07:21:03 +0000 (08:21 +0100)]
Revert "rockchip: Reconfigure the malloc based to point to system memory"

This patch was merged shortly before the v2015.10 as a minimal fix for
booting on rockchip. Now that the patch series from Hans to do the
relocation in generic code has been merged it can be dropped.

This reverts commit b1f492ca9e0c090209824ff36456d4f131843190.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: move SYS_MALLOC_SIMPLE to mach-rockchip Kconfig
Ariel D'Alessandro [Mon, 16 Nov 2015 11:15:51 +0000 (08:15 -0300)]
rockchip: move SYS_MALLOC_SIMPLE to mach-rockchip Kconfig

Commit 1eb0c03c2198a7ec9de456b83dacdc4831b96cbf added
SPL_SYS_MALLOC_SIMPLE Kconfig option and changed the way it is
evaluated.

Thus, the definitions of CONFIG_SYS_MALLOC_SIMPLE in rk3***_common.h
board configs are now incorrect because CONFIG_SPL_BUILD is enabled so
CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) will look for SPL_SYS_MALLOC_SIMPLE
instead of SYS_MALLOC_SIMPLE.

This commit fix this enabling SPL_SYS_MALLOC_SIMPLE with the new Kconfig
option by default in rockchip-mach.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: doc: show packet rk3036 uboot image
huang lin [Tue, 17 Nov 2015 06:20:31 +0000 (14:20 +0800)]
rockchip: doc: show packet rk3036 uboot image

show how to packet rk3036 uboot image and boot from SD

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Series-to: u-boot
Series-version: 8
Series-cc: Lin Huang <hl@rock-chips.com>

8 years agorockchip: Add support for rk's second level loader
Jeffy Chen [Tue, 17 Nov 2015 06:20:30 +0000 (14:20 +0800)]
rockchip: Add support for rk's second level loader

The Rockchip boot ROM could load & run an initial spl loader,
and continue to load a second level boot-loader(which stored
right after the initial loader) when it returns.
Modify idblock generation code to support it.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: Add max spl size & spl header configs
Jeffy Chen [Tue, 17 Nov 2015 06:20:29 +0000 (14:20 +0800)]
rockchip: Add max spl size & spl header configs

Our chips may have different max spl size and spl header, so
we need to add configs for that.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Dropped CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
Added $(if...) to tools/Makefile to fix widespread build breakage
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- Drop CONFIG_ROCKCHIP_MAX_SPL_SIZE from rk3288_common.h,
- Add $(if...) to tools/Makefile to fix widespread build breakage

8 years agorockchip: Add basic support for evb-rk3036 board
huang lin [Tue, 17 Nov 2015 06:20:28 +0000 (14:20 +0800)]
rockchip: Add basic support for evb-rk3036 board

This add some basic files required to allow the board to dispaly
serial message and can run command(mmc info etc)

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Moved board Kconfig fragment from previous patch into this one to fix
build error:
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- moved board Kconfig fragment from previous patch into this one

8 years agorockchip: rk3036: Add core Soc start-up code
huang lin [Tue, 17 Nov 2015 06:20:27 +0000 (14:20 +0800)]
rockchip: rk3036: Add core Soc start-up code

rk3036 only 4K size SRAM for SPL, so only support
timer, uart, sdram driver in SPL stage, when finish
initial sdram, back to bootrom.And in rk3036 sdmmc and
debug uart use same iomux, so if you want to boot from
sdmmc, you must disable debug uart.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Fixed build error for chromebook_jerry, firefly-rk3288:
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-changes: 8
- Fix build error for chromebook_jerry, firefly-rk3288

8 years agorockchip: add rk3036 sdram driver
huang lin [Tue, 17 Nov 2015 06:20:26 +0000 (14:20 +0800)]
rockchip: add rk3036 sdram driver

add rk3036 sdram driver so we can set up sdram in SPL

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: add early uart driver
huang lin [Tue, 17 Nov 2015 06:20:25 +0000 (14:20 +0800)]
rockchip: add early uart driver

add early uart driver so we can print debug message in
SPL stage

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: mmc: get the fifo mode and fifo depth property from dts
huang lin [Tue, 17 Nov 2015 06:20:24 +0000 (14:20 +0800)]
rockchip: mmc: get the fifo mode and fifo depth property from dts

rk3036 mmc do not have internal dma, so we use fifo mode when read
and write data, we get the fifo mode and fifo depth property from
dts, pass to dw_mmc driver.

Signed-off-by: Lin Huang <hl@rock-chips.com>
8 years agorockchip: mmc: use non-removable property to distinguish emmc and sdcard register
huang lin [Wed, 18 Nov 2015 01:37:25 +0000 (09:37 +0800)]
rockchip: mmc: use non-removable property to distinguish emmc and sdcard register

emmc and sdcard have different register address, use non-removeable property
to distinguish them.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agommc: dw_mmc: support fifo mode in dwc mmc driver
huang lin [Tue, 17 Nov 2015 06:20:22 +0000 (14:20 +0800)]
mmc: dw_mmc: support fifo mode in dwc mmc driver

some soc(rk3036 etc) use dw_mmc but do not have internal dma,
so we implement fifo mode to read and write data.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agommc: dw_mmc: move data transfer as a separate function
huang lin [Tue, 17 Nov 2015 06:20:21 +0000 (14:20 +0800)]
mmc: dw_mmc: move data transfer as a separate function

the data transfer seem to long in the dwmci_send_cmd function,
so move this block as a separate funciton.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: rk3036: Add pinctrl driver
huang lin [Tue, 17 Nov 2015 06:20:20 +0000 (14:20 +0800)]
rockchip: rk3036: Add pinctrl driver

Add a driver which support pin multiplexing setup for rk3036

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: rk3036: Add a simple syscon driver
huang lin [Tue, 17 Nov 2015 06:20:19 +0000 (14:20 +0800)]
rockchip: rk3036: Add a simple syscon driver

Add a driver that provides access to system controllers

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agorockchip: rk3036: Add Soc reset driver
huang lin [Tue, 17 Nov 2015 06:20:18 +0000 (14:20 +0800)]
rockchip: rk3036: Add Soc reset driver

We can reset the Soc using some CRU (clock/reset unit) register.
Add support for this.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>