Michal Simek [Wed, 7 Oct 2015 14:42:56 +0000 (16:42 +0200)]
net: zynq: Add support for different PHY interface types
MII is setup by default for all cases. The most of boards are using
RGMII but PHY drivers are not doing any specific setting that's why MII
setting was working file. With TI DP83867 is necessary to setup
paramaters based on interface type.
Use one setting per board for it which is something what will be removed
when driver is moved to DM.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Zynq has no priority queues.
ZynqMP requires this change to get network working.
This patch was not needed on ep108 for uknown reason even it should be
used.
Tested on Zynq and ZynqMP.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 5 Oct 2015 09:02:33 +0000 (11:02 +0200)]
zynqmp: Setup correct memory size for ep108
Move memory configuration to board configuration file to ensure memory
setup for every particular board.
Support 2GB ram for dc1 and dc2. Patch for extending it to 4GB will be
added when it is properly tested.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This patch adds support for Microchip part
SST26WF016B. This device needs unlock
block protection command to be sent for
all the erase and write ops to be successful.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:20:01 +0000 (17:20 +0200)]
net: zynq: Change MDC setup for arm64
MDC setting depends on pclk input clocks which varies across SoC. This
driver is used by xilinx zynq and zynqmp SOC.
Origin 224 divider is coming from RTL3.1 setting. The latest RTL doesn't
require this setting on EP108.
Input clock frequence on silicon is 125MHz where divider 64 put
frequency below 2.5MHz requires by spec (125/64=1.95).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:07:01 +0000 (17:07 +0200)]
net: zynq: Fix MDC setting for zynq
Based on spec:
"MDC must not exceed 2.5 MHz (MDC is only active during MDIO read and
write operations)"
Zynq is running on 111MHz. Current setting is 32 which is 111/32=3.47
which is above of 2.5MHz.
Using 48 divider will give us correct setting according spec
(111/48=2.31).
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 14:55:42 +0000 (16:55 +0200)]
net: zynq: Fix mdc clock division setting for 100Mbit/s
Using set and clear macro is incorrect because it is not overwritting
origin mdc clock division setup.
For example origin setup is 8(0b001) and new setup is 64(0b100) which
means 0b101 is setup which is 96 divider.
Using writel to rewrite all setting like for 1000Mbit/s case.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 8 Sep 2015 15:34:17 +0000 (17:34 +0200)]
net: zynq: Add missing const to wait_for_bit()
Remove compilation warning:
../drivers/net/zynq_gem.c:407:19: note: expected 'char *' but argument
is of type 'const char *'
../drivers/net/zynq_gem.c:476:8: warning: passing argument 1 of
'wait_for_bit' discards 'const' qualifier from pointer target type
[enabled by default]
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 3 Sep 2015 08:50:37 +0000 (10:50 +0200)]
ARM: zynqmp: Extend cache handling
- Add cache on/off functions to Kconfig. ARC has already done it and this
should be the same for all platforms.
- Disable caches for noatf dc1/dc2 configurations
- Enable CMD_CACHE
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 3 Sep 2015 06:16:32 +0000 (08:16 +0200)]
ARM: zynqmp: Remove incorrect command
The bug was introduced by:
"zynqmp: usb: Add usb dwc3 driver support for zynqmp"
(sha1: 2d5bc2183fa6484e8411ffa8edf1a33c63cb54b6)
with incorrect conflict resolution.
Remove this additional line.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 17 Aug 2015 07:58:54 +0000 (09:58 +0200)]
net: gem: Add dummy packet to fix packet duplication issue
Target is duplicating packets. IP prefetches another BD and process it
when the first one is sent. Adding one dummy BD to the chain fix the
problem with packet duplication.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 13 Aug 2015 07:23:31 +0000 (09:23 +0200)]
net: Return -EINTR when ctrl+c is pressed
Current behavior is that if CTRL+C is pressed command returns 0 that was
successful which is not correct behavior.
The easiest test case is "tftpboot 80000 uImage && echo yes"
and press CTRL+C. Then the second command is called which is incorrect.
Error log:
zynq-uboot> tftpb 80000 uImage && echo yes
Gem.e000b000:7 is connected to Gem.e000b000. Reconnecting to
Gem.e000b000
Gem.e000b000 Waiting for PHY auto negotiation to complete....... done
Using Gem.e000b000 device
TFTP from server 192.168.0.102; our IP address is 192.168.0.101
Filename 'uImage'.
Load address: 0x80000
Loading: ################
Abort
yes
zynq-uboot>
This patch adds -EINTR return value when CTRL+C is pressed.
Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
For more than 16MiB SPI flash chips, there are 3-Byte and 4-Byte address
mode, and only the 3-Byte address mode is supported in U-Boot so far.
So, reset the SPI flash to 3-Byte address mode in probe to ensure the SPI
flash work correctly, because it may has been set to 4-Byte address mode
after warm boot.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynq-common: Fix redefinition error with configs CMD_SF and CMD_SPI
Define CMD_SF and CMD_SPI configs incase of either
the ZYNQ_SPI or ZYNQ_QSPI or both. This is to avoid
the redefinition error if both ZYNQ_SPI and ZYNQ_QSPI
are enabled.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 12 Aug 2015 09:25:05 +0000 (11:25 +0200)]
ARM: dts: Rename memory@0 to memory
zynq-7000.dtsi include skeleton.dtsi which contains memory node with
base address and size zero. If you add memory@0 node to the platform DTS
in final DTB there are two memory nodes and U-Boot works with the first
one (with zeros) which end up in failing in dram_init because size is
zero.
Platform memory node should rewrite default memory node setup from
skeleton.dtsi that's why platfroms needs to also use memory as node name
instead of memory@0.
Reported-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 5 Aug 2015 06:37:08 +0000 (08:37 +0200)]
ARM: zynqmp: Enable DM and OF binding
SPI requires DM and OF that's why enable DM for ZynqMP
and start to use configuration based on embedded OF.
Disable QSPI driver because it hasn't been moved to DM yet.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynqmp: usb: Add usb dwc3 driver support for zynqmp
Added usb dwc3 driver support for zynqmp
this also supports the DFU and LTHOR to download
the linux images on to RAM and cen be booted from
those linux images.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Modify the dwc3_readl and dwc3_writel to calculate
the register offsets before invking the readl.
This patch is just a workaround to fix the issue
of raising an exception in the previous invokation
method.
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Haikun Wang [Fri, 26 Jun 2015 11:56:40 +0000 (19:56 +0800)]
fdt: armv8: Fix build warnings on armv8
Fix below build warnings on armv8,
drivers/spi/fsl_dspi.c: In function ‘fsl_dspi_ofdata_to_platdata’:
drivers/spi/fsl_dspi.c:667:2:
warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 2 has type ‘fdt_addr_t’ [-Wformat=]
debug("DSPI: regs=0x%x, max-frequency=%d, endianess=%s, num-cs=%d\n",
^
lib/fdtdec.c: In function ‘fdtdec_get_addr_size’:
lib/fdtdec.c:105:4:
warning: format ‘%lx’ expects argument of type ‘long unsigned int’,
but argument 3 has type ‘fdt_size_t’ [-Wformat=]
debug("addr=%08lx, size=%08lx\n",
^
Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
Michal Simek [Wed, 5 Aug 2015 13:41:18 +0000 (15:41 +0200)]
Merge tag 'v2015.07' into xilinx/master
Prepare v2015.07
- Use CONFIG_ARCH_ZYNQ instead of CONFIG_ZYNQ
- Enable DM for SPI and OF_CONTROL for Zynq
- Enable OF_EMBED by default for all Zynq boards and change SPL target
for loading in MMC mode
- Add missing DTS files for Xilinx internal platforms
- Fix ahci_init parameter recasting for ZynqMP
- Fix board parameter setup for ZynqMP
- Remove config_cmd_default.h from ancient platforms
- Use microblaze-generic mainline configuration
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 5 Aug 2015 05:50:16 +0000 (07:50 +0200)]
ARM: zynqmp: Add platform specific arch_get_page_table
Based on the patch:
"armv8: caches: Added routine to set non cacheable region"
(sha1: dad17fd51027ad02ac8f02deed186d08109d61fd)
it is necessary to add platform specific hook.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Mon, 3 Aug 2015 11:09:28 +0000 (13:09 +0200)]
armv8: Sync mmu_set_region_dcache_behaviour() with mainline
Based on our submission sync code with mainline.
Mainline patch:
"armv8: caches: Added routine to set non cacheable region"
(sha1: dad17fd51027ad02ac8f02deed186d08109d61fd)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
zynqmp: mini: Define config for ZynqMP mini support
Define Config for ZynqMP mini to support flash utility.
The u-boot built with this would be used to support
zynqMP flash support to QSPI flash from SDK. This mini
refers to the size of u-boot which will fit in OCM.
Need to build as "make zynqmp_mini_qspi_config"
Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Andre Przywara [Thu, 2 Jul 2015 00:04:23 +0000 (01:04 +0100)]
scsi: fix compiler warning with DEBUG and 48bit LBAs
Commit 2b42c9317db ("ahci: support LBA48 data reads for 2+TB drives")
introduced conditional code which triggers a warning when compiled
with DEBUG enabled:
In file included from common/cmd_scsi.c:12:0:
common/cmd_scsi.c: In function 'scsi_read':
include/common.h:109:4: warning: 'smallblks' may be used uninitialized in this function [-Wmaybe-uninitialized]
...
Since this is for debug only, take the easy way and initialize the
variable explicitly on declaration to avoid the warning.
(Fix a nearby whitespace error on the way.)
Tested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Andre Przywara <osp@andrep.de>
The type of the "size" of "struct mtd_info" is uint64_t, while
mtd_arg_off_size() and mtd_arg_off() treat chipsize as int type.
The chipsize is wrapped around if the argument is given with 2GB
or larger.