]> git.sur5r.net Git - u-boot/log
u-boot
6 years agoARM: rmobile: Zap ad-hoc DRAM configuration macros
Marek Vasut [Mon, 27 Nov 2017 05:01:20 +0000 (06:01 +0100)]
ARM: rmobile: Zap ad-hoc DRAM configuration macros

These macros are no longer needed since the DRAM configuration is parsed
from the DT. Drop them all.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Configure DRAM sizes from DT
Marek Vasut [Mon, 27 Nov 2017 04:37:53 +0000 (05:37 +0100)]
ARM: rmobile: Configure DRAM sizes from DT

Drop the ad-hoc DRAM configuration with macros and just decode
the DRAM configuration from device tree instead. This makes it
far cleaner and easier.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Zap rmobile_sysinfo on Gen3
Marek Vasut [Mon, 27 Nov 2017 04:48:30 +0000 (05:48 +0100)]
ARM: rmobile: Zap rmobile_sysinfo on Gen3

Since checkboard() is gone, rmobile_sysinfo is also pointless on Gen3.
Furthermore, nuke ad-hoc CONFIG_RCAR_BOARD_STRING which is also dead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Zap checkboard on Gen3
Marek Vasut [Mon, 27 Nov 2017 04:45:46 +0000 (05:45 +0100)]
ARM: rmobile: Zap checkboard on Gen3

The checkboard() function showing hard-coded board model for which the
U-Boot was built is superseded on Gen3 by show_board_info() displaying
the Model from device tree. Add small ifdef to stop compiling the
function into U-Boot.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop CPU type ifdef from salvator-x
Marek Vasut [Sat, 25 Nov 2017 23:01:32 +0000 (00:01 +0100)]
ARM: rmobile: Drop CPU type ifdef from salvator-x

We can now use rmobile_get_cpu_type() to check the CPU ID rather
than using a macro, make it so.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Unify R8A7795 and R8A7796 in rmobile Makefile
Marek Vasut [Sat, 25 Nov 2017 23:05:08 +0000 (00:05 +0100)]
ARM: rmobile: Unify R8A7795 and R8A7796 in rmobile Makefile

Since both R8A7795 and R8A7796 now use the same files, unify the
Makefile entry to CONFIG_RCAR_GEN3.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Unify memory map for RCar Gen3
Marek Vasut [Sat, 25 Nov 2017 22:24:01 +0000 (23:24 +0100)]
ARM: rmobile: Unify memory map for RCar Gen3

Unify the R7A7795 and R8A7796 memory maps in memmap-gen3 and, for now,
select which one is used based on which SoC is selected. Since this is
done in C code instead of statically assigned now, the decision can be
taken by PRR SoC match as well, which will be done in a subsequent patch.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Add PRR CPU ID macros
Marek Vasut [Sat, 25 Nov 2017 22:54:10 +0000 (23:54 +0100)]
ARM: rmobile: Add PRR CPU ID macros

Replace the ad-hoc values in the PRR CPU ID table with macros,
so that users can use rmobile_get_cpu_type() can compare the
returned value with these macros to figure out on which CPU they
are running.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Dispose of r8a779x.h for Gen3
Marek Vasut [Sat, 25 Nov 2017 21:53:04 +0000 (22:53 +0100)]
ARM: rmobile: Dispose of r8a779x.h for Gen3

These files no longer contain anything useful, so remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Stop using rcar-common/common.c on Gen3
Marek Vasut [Sat, 25 Nov 2017 21:43:57 +0000 (22:43 +0100)]
ARM: rmobile: Stop using rcar-common/common.c on Gen3

Since the Gen3 clock driver now has a .remove callback, it is no
longer necessary to shut the clock down before booting Linux in the
arch_preboot_os hook. Stop using it and while doing so, remove all
the ad-hoc config options which this hook used.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Zap Gen3 PFC tables
Marek Vasut [Wed, 13 Sep 2017 22:27:33 +0000 (00:27 +0200)]
ARM: rmobile: Zap Gen3 PFC tables

These old PFC tables are no longer needed as there is now a proper
PFC pinmux driver in drivers/pinctrl/renesas . Remove them .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable xHCI on RCar Gen3 boards
Marek Vasut [Sun, 10 Sep 2017 10:33:11 +0000 (12:33 +0200)]
ARM: rmobile: Enable xHCI on RCar Gen3 boards

Enable the XHCI support on all boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Clean up GIC macros
Marek Vasut [Tue, 28 Nov 2017 07:25:21 +0000 (08:25 +0100)]
ARM: rmobile: Clean up GIC macros

Pull out the GIC macros from the board configuration files
into the common Gen3 configuration file since these macros
are the same for all Gen3 systems.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Remove CONFIG_CMD_SDRAM from Salvator-X
Marek Vasut [Tue, 28 Nov 2017 07:20:34 +0000 (08:20 +0100)]
ARM: rmobile: Remove CONFIG_CMD_SDRAM from Salvator-X

This command is useless on Salvator-X as it is reading DRAM info from
SPD. We have no SPD on Salvator-X.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop SDHI address macros from Gen3
Marek Vasut [Sat, 25 Nov 2017 20:15:36 +0000 (21:15 +0100)]
ARM: rmobile: Drop SDHI address macros from Gen3

Since the RCar Gen3 no longer uses the SH SDHI driver, but rather
uses the Matsushita SD driver, which loads all the properties from
device tree, these macros are no longer used, remove them.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Drop CONFIG_USB_MAX_CONTROLLER_COUNT on Gen3 boards
Marek Vasut [Sat, 25 Nov 2017 22:13:37 +0000 (23:13 +0100)]
ARM: rmobile: Drop CONFIG_USB_MAX_CONTROLLER_COUNT on Gen3 boards

The USB support has been switched to DM, so this macro is no
longer meaningful, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable Micrel KSZ90x1 PHY driver on ULCB
Marek Vasut [Sun, 26 Nov 2017 19:59:23 +0000 (20:59 +0100)]
ARM: rmobile: Enable Micrel KSZ90x1 PHY driver on ULCB

Enable the Micrel KSZ90x1 driver on ULCB, since the board is populated
with KSZ9031 and without this driver, the PHY cannot be operated.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Fix eMMC signal voltage on ULCB
Marek Vasut [Sun, 26 Nov 2017 13:50:37 +0000 (14:50 +0100)]
ARM: rmobile: Fix eMMC signal voltage on ULCB

The eMMC is 1V8 device only and the signaling is always 1V8,
fix the DT for ULCB to describe the hardware correctly.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agonet: ravb: Fix reset GPIO handling
Marek Vasut [Thu, 9 Nov 2017 21:49:19 +0000 (22:49 +0100)]
net: ravb: Fix reset GPIO handling

Fix handling of the reset GPIO. Drop the _nodev() suffix from the
gpio_request_by_name() call as there is now a proper DM capable
GPIO driver. Also check if the GPIO is valid before freeing it in
remove path, otherwise U-Boot will crash.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoi2c: rcar_iic: Add RCar IIC driver
Marek Vasut [Tue, 28 Nov 2017 07:02:27 +0000 (08:02 +0100)]
i2c: rcar_iic: Add RCar IIC driver

Add driver for the RCar IIC or DVFS I2C controller. This driver is based
on the SH I2C driver, but supports DM and DT probing as well as modern
I2C framework API.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoserial: sh: Unify R8A7795 and R8A7796 as Gen3
Marek Vasut [Sat, 25 Nov 2017 22:08:34 +0000 (23:08 +0100)]
serial: sh: Unify R8A7795 and R8A7796 as Gen3

Unify the CONFIG_R8A7795 and CONFIG_R8A7796 as CONFIG_RCAR_GEN3
so that every time we add a new SoC, we won't have to add more
stuff to this list.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: rmobile: Add R8A7796 xHCI clock
Marek Vasut [Fri, 10 Nov 2017 22:17:51 +0000 (23:17 +0100)]
clk: rmobile: Add R8A7796 xHCI clock

Add xHCI entry into the clock tables, so that the xHCI USB driver
can enable the clock for the xHCI block via clock framework.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: rmobile: Move preboot clock shutdown to the driver
Marek Vasut [Sat, 25 Nov 2017 21:08:55 +0000 (22:08 +0100)]
clk: rmobile: Move preboot clock shutdown to the driver

The MSTP registers were poked in boards/renesas/rcar-common/common.c
in arch_preboot_os hook thus far to shut down the clock before Linux
takes over. With DM, this is no longer needed and we can do the same
in the clock driver .remove callback. This patch adds such a .remove
callback for R8A7795 and R8A7796.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agofdtdec: Support parsing multiple /memory nodes
Marek Vasut [Mon, 27 Nov 2017 04:32:42 +0000 (05:32 +0100)]
fdtdec: Support parsing multiple /memory nodes

It is legal to have multiple /memory nodes in a device tree . Currently,
fdtdec_setup_memory_size() only supports parsing the first node . This
patch extends the function such that if a particular /memory node does
no longer have further "reg" entries and CONFIG_NR_DRAM_BANKS still
allows for more DRAM banks, the code moves on to the next memory node
and checks it's "reg"s. This makes it possible to handle both systems
with single memory node with multiple entries and systems with multiple
memory nodes with single entry.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
6 years agoMAINTAINERS: Add myself as RCar/RMobile comaintainer
Marek Vasut [Sun, 15 Oct 2017 12:51:55 +0000 (14:51 +0200)]
MAINTAINERS: Add myself as RCar/RMobile comaintainer

To help out with the RCar/RMobile upstreaming, I'm adding myself
as the RCar/RMobile maintainer.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge tag 'xilinx-for-v2018.01' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Wed, 29 Nov 2017 13:26:07 +0000 (08:26 -0500)]
Merge tag 'xilinx-for-v2018.01' of git://www.denx.de/git/u-boot-microblaze

Xilinx changes for v2018.1

Zynq:
- Add support for Syzygy and cc108 boards
- Add support for mini u-boot configurations (cse)
- dts updates
- config/defconfig updates in connection to Kconfig changes
- Fix psu_init handling

ZynqMP:
- SPL fixes
- Remove slcr.c
- Fixing r5 startup sequence
- Add support for external pmufw
- Add support for new ZynqMP chips
- dts updates
- Add support for zcu102 rev1.0 board

Drivers:
- nand: Support external timing setting and board init
- ahci: Fix wording
- axi_emac: Wait for bit, non processor mode, readl/write conversion
- zynq_gem: Fix SGMII/PCS support

6 years agonet: xilinx_axi_emac: Use readl and writel for io ops
Siva Durga Prasad Paladugu [Thu, 23 Nov 2017 06:53:12 +0000 (12:23 +0530)]
net: xilinx_axi_emac: Use readl and writel for io ops

This patch uses readl and writel instead of in_be32 and
out_be32 for io ops as these internally uses readl,
writel for microblaze and for Zynq, ZynqMP there is
no need of endianness conversion and readl, writel
should work straightaway. This patch starts supporting
the driver for Zynq and ZynqMP platforms.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: zynq_gem: Dont enable SGMII and PCS selection
Siva Durga Prasad Paladugu [Thu, 23 Nov 2017 07:26:55 +0000 (12:56 +0530)]
net: zynq_gem: Dont enable SGMII and PCS selection

Dont enable SGMII and PCS selection if internal PCS/PMA
is not used, by getting the info about internal/external
PCS/PMA usage from dt property "is-internal-phy".

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Change Zynq/ZynqMP Kconfig description
Michal Simek [Thu, 23 Nov 2017 07:25:41 +0000 (08:25 +0100)]
arm: zynq: Change Zynq/ZynqMP Kconfig description

Use more accurate description for Xilinx Zynq and ZynqMP based platforms.
With using driver model there shouldn't be a need to create separate
Kconfig config options.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotools: zynqmpimage: adjust ug1085 reference to v1.4 of the document
Jean-Francois Dagenais [Thu, 23 Mar 2017 11:39:14 +0000 (07:39 -0400)]
tools: zynqmpimage: adjust ug1085 reference to v1.4 of the document

The chapter in which the table explaining the image format changed
chapter as the document evolved. This should help people track the
info down faster.

Signed-off-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomtd: nand: zynq: Add support for the NAND lock/unlock operation
Joe Hershberger [Tue, 7 Nov 2017 02:16:10 +0000 (18:16 -0800)]
mtd: nand: zynq: Add support for the NAND lock/unlock operation

Zynq NAND driver is not support for NAND lock or unlock operation.
Hence, accidentally write into the critical NAND region might cause
data corruption to occur.

This commit is to add NAND lock/unlock command into NAND SMC register
set for NAND lock/unlock operaion.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Keng Soon Cheah <keng.soon.cheah@ni.com>
Cc: Chen Yee Chew <chen.yee.chew@ni.com>
Cc: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Scott Wood <oss@buserror.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agomtd: zynq: nand: Move board_nand_init() function to board.c
Wilson Lee [Wed, 15 Nov 2017 09:14:35 +0000 (01:14 -0800)]
mtd: zynq: nand: Move board_nand_init() function to board.c

Putting board_nand_init() function inside NAND driver was not appropriate
due to it doesn't allow board vendor to customise their NAND
initialization code such as adding NAND lock/unlock code.

This commit was to move the board_nand_init() function from NAND driver
to board.c file. This allow customization of board_nand_init() function.

Signed-off-by: Wilson Lee <wilson.lee@ni.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Keng Soon Cheah <keng.soon.cheah@ni.com>
Cc: Chen Yee Chew <chen.yee.chew@ni.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Cc: Scott Wood <oss@buserror.net>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add ps7_init for cc108
Michal Simek [Fri, 10 Nov 2017 11:41:10 +0000 (12:41 +0100)]
arm: zynq: Add ps7_init for cc108

After some generic cleanup adding ps7_init* to repository
is not big pain now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Show information about silicon version
Michal Simek [Fri, 10 Nov 2017 12:01:10 +0000 (13:01 +0100)]
arm: zynq: Show information about silicon version

Show information about silicon in bootlog.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Do not show information from checkboard twice
Michal Simek [Fri, 10 Nov 2017 12:03:50 +0000 (13:03 +0100)]
arm: zynq: Do not show information from checkboard twice

There is no reason to show information about board twice.
Remove boardinfo late calls.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Use unsigned type with comparison with ARRAY_SIZE
Michal Simek [Fri, 10 Nov 2017 12:28:07 +0000 (13:28 +0100)]
arm: zynq: Use unsigned type with comparison with ARRAY_SIZE

Sparse is return warning about this:
arch/arm/mach-zynq/slcr.c: In function 'zynq_slcr_get_mio_pin_status':
arch/arm/mach-zynq/slcr.c:185:16: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < ARRAY_SIZE(mio_periphs); i++) {
                ^

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Convert all board to use arch ps7_init code
Michal Simek [Fri, 10 Nov 2017 10:00:42 +0000 (11:00 +0100)]
arm: zynq: Convert all board to use arch ps7_init code

Use generic implementation. It will also reduce config data size for
converted boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add support for EMIT_WRITE operation
Michal Simek [Fri, 10 Nov 2017 10:03:47 +0000 (11:03 +0100)]
arm: zynq: Add support for EMIT_WRITE operation

Add proper support for EMIT_WRITE operation which is write only.
Do not use EMIT_MASKWRITE which is read-modify-write.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add ps7GetSiliconVersion() to ps7_spl_init
Michal Simek [Fri, 10 Nov 2017 10:06:02 +0000 (11:06 +0100)]
arm: zynq: Add ps7GetSiliconVersion() to ps7_spl_init

Unfortunately camelcase is coming from ps7_init* format.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Move common ps7_init* initialization to arch code
Michal Simek [Fri, 10 Nov 2017 08:47:28 +0000 (09:47 +0100)]
arm: zynq: Move common ps7_init* initialization to arch code

This patch is based on work done in topic board where the first address
word also storing operation which should be done. This is reducing size
of configuration data.
This patch is not breaking an option to copy default ps7_init_gpl* files
from hdf file but it is doing preparation for ps7_init* consolidation.

The patch is also marking ps7_config as weak function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Get rid of ps7_reset_apu() for syzygy board
Michal Simek [Fri, 10 Nov 2017 08:51:17 +0000 (09:51 +0100)]
arm: zynq: Get rid of ps7_reset_apu() for syzygy board

There is no reason to call separate function.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Move ps7_* to separate file
Michal Simek [Wed, 8 Nov 2017 15:14:47 +0000 (16:14 +0100)]
arm: zynq: Move ps7_* to separate file

Extract ps7_* from spl code to prepare for extension.
And also return value.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Remove ps7_debug code
Michal Simek [Fri, 10 Nov 2017 08:09:48 +0000 (09:09 +0100)]
arm: zynq: Remove ps7_debug code

SPL is not calling this code that's why it is dead code and can be
removed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Enable debug uart on zc706
Michal Simek [Fri, 10 Nov 2017 08:26:40 +0000 (09:26 +0100)]
arm: zynq: Enable debug uart on zc706

Enable debug uart by default.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Add missing ps7_post_config declaration
Michal Simek [Wed, 8 Nov 2017 15:10:35 +0000 (16:10 +0100)]
arm: zynq: Add missing ps7_post_config declaration

Add missing declaration to header.

Warning log:
arch/arm/mach-zynq/spl.c:94:12: warning: symbol 'ps7_post_config' was
not declared. Should it be static?

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: xilinx_axi_emac: Add support for non processor mode
Siva Durga Prasad Paladugu [Fri, 6 Jan 2017 10:57:15 +0000 (16:27 +0530)]
net: xilinx_axi_emac: Add support for non processor mode

Add support for non processor mode, this mode doesn't have
access to some of the registers and hence this patch
bypasses it and also length has to be calculated from
status instead of app4 in this mode.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
6 years agoMerge git://git.denx.de/u-boot-mips
Tom Rini [Tue, 28 Nov 2017 21:54:30 +0000 (16:54 -0500)]
Merge git://git.denx.de/u-boot-mips

6 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Tue, 28 Nov 2017 21:54:09 +0000 (16:54 -0500)]
Merge git://git.denx.de/u-boot-uniphier

6 years agoboston: Add u-boot.mcs make target
Paul Burton [Tue, 21 Nov 2017 22:31:07 +0000 (14:31 -0800)]
boston: Add u-boot.mcs make target

U-Boot is generally flashed to a MIPS Boston development board by means
of a .mcs file which Xilinx Vivado software can write to the flash
present on the board. As such we'd generally want to produce an mcs file
when building U-Boot to target the Boston board. Introduce a make target
for u-boot.mcs which generates it using the srec_cat tool available from
the SRecord project, and build it by default when srec_cat is present.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoboston: Set CONFIG_SYS_LOAD_ADDR to 0x88000000
Paul Burton [Tue, 21 Nov 2017 20:35:31 +0000 (12:35 -0800)]
boston: Set CONFIG_SYS_LOAD_ADDR to 0x88000000

Generally we load Linux kernels on Boston boards in the form of FIT
images containing a compressed kernel binary. Linux is linked at
0x80100000 and so we need to decompress the kernel binary to that
address, however this is our default load address which means that
unless explicitly avoided we hit a decompression error as the
uncompressed kernel binary overwrites its compressed version from the
FIT image.

Avoid this by adjusting CONFIG_SYS_LOAD_ADDR to 0x88000000 (or
0xffffffff88000000 for MIPS64 builds) which avoids the address overlap
between compressed & uncompressed kernel binaries.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoMIPS: Break out of cache loops for unimplemented caches
Paul Burton [Tue, 21 Nov 2017 19:18:39 +0000 (11:18 -0800)]
MIPS: Break out of cache loops for unimplemented caches

If we run on a CPU which doesn't implement a particular cache then we
would previously get stuck in an infinite loop, executing a cache op on
the first "line" of the missing cache & then incrementing the address by
0. This was being avoided for the L2 caches, but not for the L1s. Fix
this by generalising the check for a zero line size & avoiding the cache
op loop when this is the case.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoMIPS: Clear instruction hazards in flush_cache()
Paul Burton [Tue, 21 Nov 2017 19:18:38 +0000 (11:18 -0800)]
MIPS: Clear instruction hazards in flush_cache()

When writing code, for example during relocation, we ensure that the
icache has a coherent view of the new instructions with a call to
flush_cache(). This handles the bulk of the work to ensure the new
instructions will execute as expected, however it does not ensure that
the CPU pipeline doesn't already contain instructions taken from a stale
view of the affected memory. This could theoretically be a problem for
relocation, but in practice typically isn't because we sync caches for
enough code after the entry point of the newly written code that by the
time the CPU pipeline might possibly fetch any of it we'll have long ago
written it back & invalidated any stale icache entries. This is however
a problem for shorter regions of code.

In preparation for later patches which write shorter segments of code,
ensure any instruction hazards are cleared by flush_cache() by
introducing & using a new instruction_hazard_barrier() function which
makes use of the jr.hb instruction to clear the hazard.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoMIPS: Ensure cache ops complete in cache maintenance functions
Paul Burton [Tue, 21 Nov 2017 19:18:37 +0000 (11:18 -0800)]
MIPS: Ensure cache ops complete in cache maintenance functions

A typical use of cache maintenance functions is to force writeback of
data which a device is about to read using DMA - for example a
descriptor or command structure. Such users of cache maintenance
functions require that operations on the cache have completed before
they proceed to instruct a device to read memory. This requires that we
place a completion barrier (ie. sync instruction) between the cache ops
and whatever write informs the device to perform DMA.

Whilst strictly speaking this isn't all users of the cache maintenance
functions & we could instead place the barriers in the drivers that
require them, it would be much more invasive to do so than to just have
the barrier be the default by placing it in the cache functions
themselves. The cost is low enough that it shouldn't matter to us in any
rare cases that we use the cache functions when not performing DMA.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoUpdate Paul Burton's email address
Paul Burton [Mon, 30 Oct 2017 23:58:21 +0000 (16:58 -0700)]
Update Paul Burton's email address

MIPS is no longer a part of Imagination Technologies, and as such my
@imgtec.com email address will soon cease to function. This patch
updates occurrances of it with my new @mips.com email address, and adds
an entry in .mailmap such that git (& tools such as get_maintainer.pl
when examining history) will use the new address.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: u-boot@lists.denx.de
6 years agoMIPS: Drop unused PTR_COUNT_SHIFT from u-boot.lds
Paul Burton [Fri, 15 Sep 2017 18:35:54 +0000 (11:35 -0700)]
MIPS: Drop unused PTR_COUNT_SHIFT from u-boot.lds

The u-boot.lds linker script for MIPS defines a PTR_COUNT_SHIFT macro to
2 or 3 for 32 bit or 64 bit builds respectively. This macro is never
actually used though, so remove the dead code.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoboston: Remove unused label in lowlevel_display
Paul Burton [Fri, 15 Sep 2017 18:34:31 +0000 (11:34 -0700)]
boston: Remove unused label in lowlevel_display

The lowlevel_display() function includes a "1:" label which is never
used. Remove it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoboston: Drop unused return value
Paul Burton [Fri, 15 Sep 2017 18:33:53 +0000 (11:33 -0700)]
boston: Drop unused return value

The boston lowlevel_init() function zeroes the return register v0,
despite the function not being expected to return a value & that value
never being used.

Remove the redundant assignment to v0.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoARM: uniphier: remove unused NAND CONFIG options
Masahiro Yamada [Mon, 27 Nov 2017 05:13:49 +0000 (14:13 +0900)]
ARM: uniphier: remove unused NAND CONFIG options

The Denali NAND driver does not use these options any more.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: dts: uniphier: Sync with Linux 4.15-rc1
Masahiro Yamada [Fri, 24 Nov 2017 15:25:35 +0000 (00:25 +0900)]
ARM: dts: uniphier: Sync with Linux 4.15-rc1

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agogpio: uniphier: import dt-binginds header from Linux
Masahiro Yamada [Fri, 24 Nov 2017 15:25:34 +0000 (00:25 +0900)]
gpio: uniphier: import dt-binginds header from Linux

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: remove XIRQ pin settings
Masahiro Yamada [Fri, 24 Nov 2017 15:25:33 +0000 (00:25 +0900)]
ARM: uniphier: remove XIRQ pin settings

The XIRQ pins are now set up on the Linux side by the GPIO hogging.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: remove IRQ settings
Masahiro Yamada [Fri, 24 Nov 2017 15:25:32 +0000 (00:25 +0900)]
ARM: uniphier: remove IRQ settings

This work-around has been here in U-Boot because the AIDET and GPIO
drivers were missing in the upstream Linux.  Both are now available
in Linus' tree:
  - drivers/irqchip/irq-uniphier-aidet.c
  - drivers/gpio/gpio-uniphier.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: uniphier: set CONFIG_LOGLEVEL to 6
Masahiro Yamada [Fri, 24 Nov 2017 15:25:31 +0000 (00:25 +0900)]
ARM: uniphier: set CONFIG_LOGLEVEL to 6

Print out KERN_NOTICE or higher level log messages.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: denali: sync with Linux 4.15-rc1
Masahiro Yamada [Tue, 21 Nov 2017 17:38:32 +0000 (02:38 +0900)]
mtd: nand: denali: sync with Linux 4.15-rc1

I largely reworked the Denali NAND controller driver in Linux.
This commit imports the improvements from Linux.  The code is
almost synced with Linux 4.15-rc1.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: introduce NAND_ROW_ADDR_3 flag
Masahiro Yamada [Tue, 21 Nov 2017 17:38:31 +0000 (02:38 +0900)]
mtd: nand: introduce NAND_ROW_ADDR_3 flag

Several drivers check ->chipsize to see if the third row address cycle
is needed.  Instead of embedding magic sizes such as 32MB, 128MB in
drivers, introduce a new flag NAND_ROW_ADDR_3 for clean-up.  Since
nand_scan_ident() knows well about the device, it can handle this
properly.  The flag is set if the row address bit width is greater
than 16.

Delete comments such as "One more address cycle for ..." because
intention is now clear enough from the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 14157f861437ebe2d624b0a845b91bbdf8ca9a2d]

6 years agomtd: nand: add a shorthand to generate nand_ecc_caps structure
Masahiro Yamada [Tue, 21 Nov 2017 17:38:30 +0000 (02:38 +0900)]
mtd: nand: add a shorthand to generate nand_ecc_caps structure

struct nand_ecc_caps was designed as flexible as possible to support
multiple stepsizes (like sunxi_nand.c).

So, we need to write multiple arrays even for the simplest case.
I guess many controllers support a single stepsize, so here is a
shorthand macro for the case.

It allows to describe like ...

NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15);

... instead of

static const int denali_pci_ecc_strengths[] = {8, 15};
static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = {
        .stepsize = 512,
        .strengths = denali_pci_ecc_strengths,
        .nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths),
};
static const struct nand_ecc_caps denali_pci_ecc_caps = {
        .stepinfos = &denali_pci_ecc_stepinfo,
        .nstepinfos = 1,
        .calc_ecc_bytes = denali_calc_ecc_bytes,
};

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: a03c60178c181767ecfb26fb311a88742d228118]

6 years agomtd: nand: add generic helpers to check, match, maximize ECC settings
Masahiro Yamada [Tue, 21 Nov 2017 17:38:29 +0000 (02:38 +0900)]
mtd: nand: add generic helpers to check, match, maximize ECC settings

Driver are responsible for setting up ECC parameters correctly.
Those include:
  - Check if ECC parameters specified (usually by DT) are valid
  - Meet the chip's ECC requirement
  - Maximize ECC strength if NAND_ECC_MAXIMIZE flag is set

The logic can be generalized by factoring out common code.

This commit adds 3 helpers to the NAND framework:
nand_check_ecc_caps - Check if preset step_size and strength are valid
nand_match_ecc_req - Match the chip's requirement
nand_maximize_ecc - Maximize the ECC strength

To use the helpers above, a driver needs to provide:
  - Data array of supported ECC step size and strength
  - A hook that calculates ECC bytes from the combination of
    step_size and strength.

By using those helpers, code duplication among drivers will be
reduced.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 2c8f8afa7f92acb07641bf95b940d384ed1d0294]

6 years agomtd: nand: Pass the CS line to ->setup_data_interface()
Boris Brezillon [Tue, 21 Nov 2017 17:38:28 +0000 (02:38 +0900)]
mtd: nand: Pass the CS line to ->setup_data_interface()

Some NAND controllers can assign different NAND timings to different
CS lines. Pass the CS line information to ->setup_data_interface() so
that the NAND controller driver knows which CS line is concerned by
the setup_data_interface() request.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 104e442a67cfba4d0cc982384761befb917fb6a1]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: allow drivers to request minimum alignment for passed buffer
Masahiro Yamada [Tue, 21 Nov 2017 17:38:27 +0000 (02:38 +0900)]
mtd: nand: allow drivers to request minimum alignment for passed buffer

In some cases, nand_do_{read,write}_ops is passed with unaligned
ops->datbuf.  Drivers using DMA will be unhappy about unaligned
buffer.

The new struct member, buf_align, represents the minimum alignment
the driver require for the buffer.  If the buffer passed from the
upper MTD layer does not have enough alignment, nand_do_*_ops will
use bufpoi.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 477544c62a84d3bacd9f90ba75ffc16c04d78071]

6 years agomtd: nand: Wait for PAGEPROG to finish in drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS
Boris Brezillon [Tue, 21 Nov 2017 17:38:26 +0000 (02:38 +0900)]
mtd: nand: Wait for PAGEPROG to finish in drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS

Drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS are supposed to handle the
full read/write page sequence, and waiting for a page to actually be
programmed is part of this write-page sequence.
This is also what is done in ->write_oob_xxx() hooks, so let's do that in
->write_page_xxx() as well to make it consistent.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 41145649f4acb30249b636b945053db50c9331c5]
[masahiro:
 There is no driver setting NAND_ECC_CUSTOM_PAGE_ACCESS in U-Boot.
 No driver is affected by this change.]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Drop the ->errstat() hook
Boris Brezillon [Tue, 21 Nov 2017 17:38:25 +0000 (02:38 +0900)]
mtd: nand: Drop the ->errstat() hook

The ->errstat() hook is no longer implemented NAND controller drivers.
Get rid of it before someone starts abusing it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 7d135bcced20be2b50128432c5426a7278ec4f6d]
[masahiro: modify davinci_nand.c for U-Boot]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Drop unused cached programming support
Boris Brezillon [Tue, 21 Nov 2017 17:38:24 +0000 (02:38 +0900)]
mtd: nand: Drop unused cached programming support

Cached programming is always skipped, so drop the associated code until
we decide to really support it.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 0b4773fd1649e0d418275557723a7ef54f769dc9]
[masahiro: modify davinci_nand.c for U-Boot]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: add mtd_ooblayout_xxx() helper functions
Boris Brezillon [Tue, 21 Nov 2017 17:38:23 +0000 (02:38 +0900)]
mtd: add mtd_ooblayout_xxx() helper functions

In order to make the ecclayout definition completely dynamic we need to
rework the way the OOB layout are defined and iterated.

Create a few mtd_ooblayout_xxx() helpers to ease OOB bytes manipulation
and hide ecclayout internals to their users.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 75eb2cec251fda33c9bb716ecc372819abb9278a]
[masahiro:
 cherry-pick more code from adbbc3bc827eb1f43a932d783f09ba55c8ec8379]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Support controllers with custom page
Marc Gonzalez [Tue, 21 Nov 2017 17:38:22 +0000 (02:38 +0900)]
mtd: nand: Support controllers with custom page

If your controller already sends the required NAND commands when
reading or writing a page, then the framework is not supposed to
send READ0 and SEQIN/PAGEPROG respectively.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 3371d663bb4579f1b2003a92162edd6d90edd089]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Add a few more timings to nand_sdr_timings
Boris Brezillon [Tue, 21 Nov 2017 17:38:21 +0000 (02:38 +0900)]
mtd: nand: Add a few more timings to nand_sdr_timings

Add the tR_max, tBERS_max, tPROG_max and tCCS_min timings to the
nand_sdr_timings struct.
Assign default/safe values for the statically defined timings, and
extract them from the ONFI parameter table if the NAND is ONFI
compliant.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
[Linux commit: 204e7ecd47e26cc12d9e8e8a7e7a2eeb9573f0ba
 Fixup commit: 6d29231000bbe0fb9e4893a9c68151ffdd3b5469]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Fix data interface configuration logic
Boris Brezillon [Tue, 21 Nov 2017 17:38:20 +0000 (02:38 +0900)]
mtd: nand: Fix data interface configuration logic

When changing from one data interface setting to another, one has to
ensure a specific sequence which is described in the ONFI spec.

One of these constraints is that the CE line has go high after a reset
before a command can be sent with the new data interface setting, which
is not guaranteed by the current implementation.

Rework the nand_reset() function and all the call sites to make sure the
CE line is asserted and released when required.

Also make sure to actually apply the new data interface setting on the
first die.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: d8e725dd8311 ("mtd: nand: automate NAND timings selection")
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
[Linux commit: 73f907fd5fa56b0066d199bdd7126bbd04f6cd7b]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: automate NAND timings selection
Boris Brezillon [Tue, 21 Nov 2017 17:38:19 +0000 (02:38 +0900)]
mtd: nand: automate NAND timings selection

The NAND framework provides several helpers to query timing modes supported
by a NAND chip, but this implies that all NAND controller drivers have
to implement the same timings selection dance. Also currently NAND
devices can be resetted at arbitrary places which also resets the timing
for ONFI chips to timing mode 0.

Provide a common logic to select the best timings based on ONFI or
->onfi_timing_mode_default information. Hook this into nand_reset()
to make sure the new timing is applied each time during a reset.

NAND controller willing to support timings adjustment should just
implement the ->setup_data_interface() method.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[Linux commit: d8e725dd831186a3595036b2b1df9f68cbc6efa3]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Expose data interface for ONFI mode 0
Sascha Hauer [Tue, 21 Nov 2017 17:38:18 +0000 (02:38 +0900)]
mtd: nand: Expose data interface for ONFI mode 0

The nand layer will need ONFI mode 0 to use it as timing mode
before and right after reset.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 6e1f9708dbf3c50a8da93c1952a01a7a2acb5e66]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: convert ONFI mode into data interface
Sascha Hauer [Tue, 21 Nov 2017 17:38:17 +0000 (02:38 +0900)]
mtd: nand: convert ONFI mode into data interface

struct nand_data_interface is the designated type to pass to
the NAND drivers to configure the timing. To simplify further
patches convert the onfi_sdr_timings array from type struct
nand_sdr_timings nand_data_interface.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: b1dd3ca203fccd111926c3f6ac59bf903ec62b05]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Introduce nand_data_interface
Sascha Hauer [Tue, 21 Nov 2017 17:38:16 +0000 (02:38 +0900)]
mtd: nand: Introduce nand_data_interface

Currently we have no data structure to fully describe a NAND timing.
We only have struct nand_sdr_timings for NAND timings in SDR mode,
but nothing for DDR mode and also no container to store both types
of timing.
This patch adds struct nand_data_interface which stores the timing
type and a union of different timings. This can be used to pass to
drivers in order to configure the timing.
Add kerneldoc for struct nand_sdr_timings while touching it anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: eee64b700e26b9bcc6fce024681c31f5e12271fc]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Create a NAND reset function
Sascha Hauer [Tue, 21 Nov 2017 17:38:15 +0000 (02:38 +0900)]
mtd: nand: Create a NAND reset function

When NAND devices are resetted some initialization may have to be done,
like for example they have to be configured for the timing mode that
shall be used. To get a common place where this initialization can be
implemented create a nand_reset() function. This currently only issues
a NAND_CMD_RESET to the NAND device. The places issuing this command
manually are replaced with a call to nand_reset().

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 2f94abfe35b210e7711af9202a3dcfc9e779219a]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: remove unnecessary 'extern' from function declarations
Sascha Hauer [Tue, 21 Nov 2017 17:38:14 +0000 (02:38 +0900)]
mtd: nand: remove unnecessary 'extern' from function declarations

'extern' is not necessary for function declarations. To prevent
people from adding the keyword to new declarations remove the
existing ones.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
[Linux commit: 79022591839f110f465cac0223e117b91d47d5db]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: Add an option to maximize the ECC strength
Boris Brezillon [Tue, 21 Nov 2017 17:38:13 +0000 (02:38 +0900)]
mtd: nand: Add an option to maximize the ECC strength

The generic NAND DT bindings allows one to tweak the ECC strength and
step size to their need. It can be used to lower the ECC strength to
match a bootloader/firmware config, but might also be used to get a better
reliability.

In the latter case, the user might want to use the maximum ECC strength
without having to explicitly calculate the exact value (this value not
only depends on the OOB size, but also on the NAND controller, and can
be tricky to extract).

Add a generic 'nand-ecc-maximize' DT property and the associated
NAND_ECC_MAXIMIZE flag, to let ECC controller drivers select the best
ECC strength and step-size on their own.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
[Linux commit: ba78ee00e1ff84de9b3ad33edbd3ec599099ee82]
[masahiro: of_property_read_bool -> fdt_getprop for U-Boot]
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agomtd: nand: add onfi_* stubs in case ONFI_DETECTION is disabled
Masahiro Yamada [Tue, 21 Nov 2017 17:38:12 +0000 (02:38 +0900)]
mtd: nand: add onfi_* stubs in case ONFI_DETECTION is disabled

Add stubs to the header in case CONFIG_SYS_NAND_ONFI_DETECTION is
disabled.  This is much easier than adding around #ifdef to the
caller side.

Also, I removed the #ifdef around onfi_params.  In Linux, onfi_params
and jedec_params are unified as union.  It will be the right thing
to do.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agobitops: collect BIT macros to include/linux/bitops.h
Masahiro Yamada [Tue, 21 Nov 2017 17:38:11 +0000 (02:38 +0900)]
bitops: collect BIT macros to include/linux/bitops.h

Same macros are defined in various places.  Collect them into
include/linux/bitops.h like Linux.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoARM: openrd: set CONFIG_LOGLEVEL to 2
Masahiro Yamada [Tue, 28 Nov 2017 12:23:20 +0000 (21:23 +0900)]
ARM: openrd: set CONFIG_LOGLEVEL to 2

These boards are on the boundary of "u-boot-nodtb.bin exceeds file
size limit" error.

Reduce the log-level to save memory footprint.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agonet: xilinx_axi_emac: Read dma address using fdtdec_get_addr
Siva Durga Prasad Paladugu [Thu, 22 Jun 2017 05:44:55 +0000 (11:14 +0530)]
net: xilinx_axi_emac: Read dma address using fdtdec_get_addr

Read dma address using fdtdec_get_addr as it checks for
address cells and size cells and reads the address
properly. fdtdec_get_int always assume address is of int
size which goes wrong if using it on 64-bit architecture.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agonet: xilinx_axi_emac: Use wait_for_bit instead of while loop
Siva Durga Prasad Paladugu [Fri, 6 Jan 2017 10:48:50 +0000 (16:18 +0530)]
net: xilinx_axi_emac: Use wait_for_bit instead of while loop

Use wait_for_bit instead while loop during init

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
6 years agoarm64: zynqmp: Add revision to identification string
Michal Simek [Wed, 8 Nov 2017 14:48:57 +0000 (15:48 +0100)]
arm64: zynqmp: Add revision to identification string

It is good to see revision in boot log.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable watchdog by default
Shubhrajyoti Datta [Thu, 6 Apr 2017 06:58:14 +0000 (12:28 +0530)]
arm64: zynqmp: Enable watchdog by default

Enable watchdog in dts for zcu102.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add note about si5328 interrupt
Michal Simek [Thu, 2 Nov 2017 11:45:10 +0000 (12:45 +0100)]
arm64: zynqmp: Add note about si5328 interrupt

Add comment about irq present on the board connected to PL.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: usb: Correct IOMMU node for making SMMU work with USB
Anurag Kumar Vulisha [Tue, 20 Jun 2017 10:55:16 +0000 (16:25 +0530)]
arm64: zynqmp: usb: Correct IOMMU node for making SMMU work with USB

This patch makes SMMU work by moving the iommus node under the dwc3 child
entry from parent node.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove clock setting from dtsi
Michal Simek [Thu, 2 Nov 2017 11:41:34 +0000 (12:41 +0100)]
arm64: zynqmp: Remove clock setting from dtsi

clock setting is handled via clk dtsi file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Uncomment snps,quirk-frame-length-adjustment flag in dwc3
Anurag Kumar Vulisha [Fri, 10 Mar 2017 13:48:17 +0000 (19:18 +0530)]
arm64: zynqmp: Uncomment snps,quirk-frame-length-adjustment flag in dwc3

This patch uncomments snps,quirk-frame-length-adjustment which has
the value to adjust the SOF/ITP generated from the controller.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add USB OTG interrupts support in dt
Manish Narani [Wed, 18 Jan 2017 12:04:48 +0000 (17:34 +0530)]
arm64: zynqmp: Add USB OTG interrupts support in dt

This patch adds OTG interrupt support in device tree. It will add
an extra interrupt line number dedicated to OTG events. This will
enable OTG interrupts to serve in DWC3 OTG driver.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enabled CCI support for USB
Manish Narani [Mon, 27 Mar 2017 12:17:00 +0000 (17:47 +0530)]
arm64: zynqmp: Enabled CCI support for USB

This patch adds CCI support for USB when CCI is enabled in design.
This patch also adds 'reg' property for Xilinx USB 3.0 IP. The 'reg'
property is added in order to modify a register in that to enable
coherency in Hardware.

Also add address to unit name to avoid dtc warning

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support reading SoC revision using nvmem driver in dwc3
Anurag Kumar Vulisha [Thu, 2 Mar 2017 09:10:51 +0000 (14:40 +0530)]
arm64: zynqmp: Add support reading SoC revision using nvmem driver in dwc3

This patch adds support for reading silicon revision using zynqmp nvmem
driver.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Move nodes which have no reg property out of bus
Michal Simek [Wed, 5 Jul 2017 12:51:42 +0000 (14:51 +0200)]
arm64: zynqmp: Move nodes which have no reg property out of bus

Nodes without reg properties shouldn't be placed in amba node.
Move them out.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: dt: Add AMS node
Michal Simek [Thu, 2 Nov 2017 11:04:43 +0000 (12:04 +0100)]
arm64: zynqmp: dt: Add AMS node

The AMS includes an ADC as well as on-chip sensors that can be used to
sample external voltages and monitor on-die operating conditions, such as
temperature and supply voltage levels.

Signed-off-by: Rajnikant Bhojani <rajnikant.bhojani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: sdhci: set host quirk2 for no 1.8V support for 1.0 silicon
Manish Narani [Wed, 19 Jul 2017 15:46:33 +0000 (21:16 +0530)]
arm64: zynqmp: sdhci: set host quirk2 for no 1.8V support for 1.0 silicon

This patch sets host quirk2 bit field for No 1.8V supported in case of
1.0 silicon. The 1.0 silicon doesn't have support for UHS-I modes. This
property will ensure the SD runs on High Speed mode.

Signed-off-by: Manish Narani <mnarani@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>