Commit Graph

43133 Commits

Author SHA1 Message Date
Michal Simek
ab54684ff1 lib: Add WATCHDOG_RESET to wait_bit.h
wait_for_bit() is missing reset watchdog in case watchdog
is configured.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-01-18 07:53:20 +01:00
Hyun Kwon
f0ec757cf5 ARM64: zynqmp: Change clock conf for DP for zcu100
- Dedicate VPLL for DP
- Enable VPLL frac mode

These changes are done by hand and PCW generation
needs to be checked and validated again.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-18 07:52:19 +01:00
Michal Simek
378a437a49 arm64: zynqmp: Add support for QSPI boot
This patch is enabling support for SPL QSPI boot.

First of all it is necessary to generate atf-spi.ub which is different
format than atf-uboot.ub (this can be made as legacy image too)

ADDR=`arm-xilinx-linux-gnueabi-readelf -a bl31.elf | grep "Entry point
address" | cut -d ':' -f 2 | sed -e 's/^[ \t]*//'`
aarch64-linux-gnu-objcopy -O binary bl31.elf bl31.bin
./tools/mkimage -f auto -A arm64 -T firmware -C none -O u-boot -a $ADDR
-e $ADDR -n "atf1" -E -b arch/arm/dts/zynqmp-zcu102.dtb -d bl31.bin
atf-uboot.ub
./tools/mkimage -A arm64 -T firmware -C none -O u-boot -a $ADDR -e $ADDR
-n "atf-for-qspi" -E -d bl31.bin atf-spi.ub

This patch is using this QSPI layout with offsets:
0 boot.bin
512k atf-ub
640k u-boot.bin
1280k u-boot.img

Which corresponding by writing these images(read from MMC)
mmcinfo
sf probe
load mmc 0 10000000 boot.bin
sf erase 0 +$filesize
sf write 10000000 0 $filesize
load mmc 0 10000000 atf-spi.ub
sf erase 0x80000 +$filesize
sf write 10000000 0x80000 $filesize
load mmc 0 10000000 u-boot.bin
sf erase 0xa0000 +$filesize
sf write 10000000 0xa0000 $filesize
load mmc 0 10000000 u-boot.img
sf erase 0x140000 +$filesize
sf write 10000000 0x140000 $filesize

For testing u-boot running in EL3 you can break atf-spi.ub like this:
sf probe
sf erase 0x80000 +4

Then u-boot.img is executed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-16 13:05:07 +01:00
Michal Simek
d308c38f14 spl: Add missing line ending to SPL print
One print requires line ending to be aligned with SW running
after it. Prints look weird without it.

For example:
U-Boot SPL 2017.01-01801-g1fb1292c7b9d (Jan 16 2017 - 12:50:53)
EL Level:	EL3
Trying to boot from SPINOTICE:  ATF running on XCZU15EG/silicon
v2/RTL5.1 at 0xfffe5000, with PMU firmware
NOTICE:  BL31: Secure code at 0x0

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-16 13:04:22 +01:00
Michal Simek
fd58b39cee ARM64: zynqmp: Remove pmufw.bin from source code
User should use official pmufw compatible with certain version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-12 08:27:33 +01:00
Michal Simek
5704133a23 scsi: dm: Unbind all scsi based block devices before new scan
New scan should unbind all block devices not to be listed again.
Without this patch if scsi reset or scan is called new block devices are
created which point to the same id and lun.

For example:
ZynqMP> scsi scan
scsi_scan: if_type=2, devnum=0: sdhci@ff170000.blk, 6, 0
scsi_scan: if_type=2, devnum=0: ahci@fd0c0000.id1lun0, 2, 0
scsi_scan: if_type=2, devnum=0: ahci@fd0c0000.id1lun0, 2, 1
scsi_scan: if_type=2, devnum=0: ahci@fd0c0000.id1lun0, 2, 2
scsi_scan: if_type=2, devnum=0: ahci@fd0c0000.id1lun0, 2, 3
scsi_scan: if_type=2, devnum=0: ahci@fd0c0000.id1lun0, 2, 4
scanning bus for devices...
  Device 0: (1:0) Vendor: ATA Prod.: KINGSTON SVP200S Rev: 501A
            Type: Hard Disk
            Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)

Reported-by: Ken Ma <make@marvell.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-01-11 14:22:31 +01:00
Michal Simek
1c57ac0ba6 ARM64: zynqmp: Remove empty board file
Remove empty unused file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:22:30 +01:00
Michal Simek
7706d3fb95 Merge tag 'v2017.01' into master
Prepare v2017.01

- Fix defconfigs for v2017.01 -
  DISTRO_DEFAULTS (and remove CMD_PXE, MENU)
  !DISPLAY_BOARDINFO
- Remove CONFIG_CMD_NAND, CONFIG_SYS_NAND_SELF_INIT
  from board file
- Various SPI fixes

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:21:55 +01:00
Michal Simek
caa873397e ARM64: zynqmp: Generate handoff structure for ATF
Xilinx ATF extending options for passing images from BL2(FSBL)
to BL31. U-Boot SPL is FSBL replacement that's why it should generate
handoff structure the same. Support only one entry which is U-Boot in
EL2 itself. When FIT image is adopted structure generate should be data
driven.

Currently ATF is placing this structure at the beggining of OCM which is
rewriting early parts of ATF which should be unused at that time.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:11:20 +01:00
Kamensky Ivan
8256e9549c xilinx_phy: Pass correct pointer to fdtdec_get_int()
This patch fixes incorrect pointer on offset device in device tree blob.
When using with the component "Ethernet 1G/2.5G BASE-X PCS/PMA or SGMII"
it does not understand what type is XAE_PHY_TYPE_1000BASE_X and trying
to change frequency.

Signed-off-by: Kamensky Ivan <kamensky.ivan@mail.ru>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:11:20 +01:00
Siva Durga Prasad Paladugu
1a63d5a98c configs: zynqmp: zcu102: Temporary hack to disable SATA
Add workaround to disable SATA for ZCU102
until SATA issue got fixed

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
2017-01-11 14:11:03 +01:00
Siva Durga Prasad Paladugu
57871d110d net: xilinx_axi_emac: Add support for non processor mode
Add support for non processor mode, this mode doesnt 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>
2017-01-11 14:10:39 +01:00
Siva Durga Prasad Paladugu
91839f015f 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>
2017-01-11 14:10:39 +01:00
Michal Simek
b8463e7461 drivers: usb: Remove !DM_USB code from host driver
Glue logic depends on DM_USB that's why remove !DM_USB
code because only this default case is tested.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:39 +01:00
Michal Simek
dc44ed209f drivers: usb: Add USB_XHCI_ZYNQMP to Kconfig
Move symbol to Kconfig to cleanup configuration file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:39 +01:00
Michal Simek
932297ef3f usb: storage: Show number of storage devices detected for DM_USB
By enabling DM_USB information about number of storage devices
was lost.
Get this information back simply by printing number of devices detected
via BLK uclass.

For example:
scanning bus 0 for devices... 7 USB Device(s) found
       scanning usb for storage devices... 3 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
2edab57221 drivers: usb: Add DWC3 Xilinx ZynqMP glue logic
By enabling BLK by default this is the next driver which needs to get
support for DM_USB. Adding generic DWC3 glue logic which only
parse nodes and read device mode. Based on it probe proper
host/peripheral DWC3 drivers for it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
d4e3a1e695 drivers: usb: dwc3: add ti dwc3 peripheral driver with driver model support
Add a TI DWC3 peripheral driver with driver model support and the
driver will be bound by the DWC3 wrapper driver based on the
dr_mode device tree entry.

Xilinx: Remove dwc3-omap changes + limit zynqmp static init

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Tom Rini
f34a4c8bd1 am43xx: Add USB device boot support to SPL
Add in code to initialize the DWC3 gadget controller so that we can do
RNDIS in SPL on these platforms.

Xilinx: Remove am43xx changes and add usb/common to Makefile compilation

Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
e8aa91bbdd drivers: usb: common: add support to get maximum speed from dt
Add support to get maximum speed from dt so that usb drivers
makes use of it for DT parsing.

Xilinx: Fix error message.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
57db3d33d4 drivers: usb: dwc3: add ti dwc3 misc driver for wrapper
Add a misc driver for DWC3 wrapper, so that based on dr_mode the
USB devices can bind to USB host or USB device drivers.

Xilinx: Remove changes related to dwc3-omap.c

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
3e55f76af6 drivers: usb: dwc3: remove devm_zalloc from linux_compact
devm_zalloc() is already defined in dm/device.h header, so
devm_zalloc can be removed from linux_compact.h beader file.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
68607fcf04 drivers: usb: gadget: ether/rndis: convert driver to adopt device driver model
Adopt usb ether gadget and rndis driver to adopt driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
fa93c4c080 drivers: usb: gadget: ether: prepare driver for driver model migration
prepare driver for driver model migration

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
636c03e2be drivers: usb: gadget: ether: use net device priv to pass usb ether priv
Use net device priv to pass usb ether priv and use it in
net device ops callback.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
495cd1bc1b drivers: usb: gadget: ether: consolidate global devices to single struct
Consolidate the net device, usb eth device and gadget device
struct to single struct and a single global variable so that the
same can be passed as priv of ethernet driver.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
aa4ace1b59 drivers: usb: gadget: ether: adopt to usb driver model
Convert usb ether gadget to adopt usb driver model

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-11 14:10:38 +01:00
Mugunthan V N
9a308989fe drivers: usb: gadget: ether: access network_started using local variable
network_started of struct eth_dev can be accessed using local
variable dev and no reason to access it with the global struct.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-01-11 14:10:38 +01:00
Michal Simek
1f9be914b4 tools: mkimage: Call fclose in error path
This patch is fixing missing fclose() calls
in error patch introduced by:
"tools: mkimage: Use fstat instead of stat to avoid malicious hacks"
(sha1: ebe0f53f48)

Reported-by: Coverity (CID: 155064, 155065)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
8ab0ab46ec ARM64: zynqmp: Simplify filesystem command disabling for mini
Move config options to Kconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
a1ad8fcd40 ARM: zynq: Move BOOTZ enabling to defconfig
Simplify config file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
801bebb0a1 ARM64: zynqmp: Remove already disabled commands in mini configuration
This patch removes these configuration parameters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
855110cdd7 ARM64: zynqmp: Simplify BOOTI disabling for mini configuration
Disable BOOTI via defconfig.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
d222400fe7 ARM64: zynqmp: Remove configs which go against each other
Simplify configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:38 +01:00
Michal Simek
ce28e84542 ARM64: zynqmp: Remove BOOTDELAY setup from board file
Simplify configuration.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:37 +01:00
Michal Simek
909f872260 ARM: zynq: Remove ZYNQ_M29EW_WB_HACK macro
This functionality should be covered by:
"mtd: cfi_flash: Write buffer size adjustment for M29EW Numonyx devices"
(sha1: 6f13889eb0)

That's why remove this macro and hack.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:37 +01:00
Michal Simek
cf8884dcb9 ARM: zynq: Remove unused cc108 config file
cc108 is handled via zynq-common.h config. The only missing
piece is different ENV_OFFSET setting for qspi boot mode
but this depends on user configuration. This board is tested via jtag
boot mode only that's why if qspi mode is required we can fix it later.
Comment was added to zynq-common.h not to be lost.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:37 +01:00
Michal Simek
e39897abdb ARM: zynq: Remove ocm configuration file
There is no reference to this file to build.
Remove this unused file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:37 +01:00
Michal Simek
19362c7856 ARM: zynq: Add RSA dependency directly to Kconfig
Simplify zynq config file.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:37 +01:00
Michal Simek
dbab260735 Merge tag 'v2016.11' into master
Prepare v2016.11

- Add missing CONFIG_ macros to Kconfig. It should be fixed in future
- Fix spl_mmc fpga code
- Add missing defconfig macros
- Remove FPGA macros because it was moved to Kconfig in mainline

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-01-11 14:10:16 +01:00
Tom Rini
a705ebc81b Prepare v2017.01
Signed-off-by: Tom Rini <trini@konsulko.com>
v2017.01
2017-01-09 11:57:05 -05:00
Ladislav Michl
8361af0d30 lib: gitignore *.elf and *.so generated by efi_loader
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-01-09 10:30:24 -05:00
Tom Rini
f32a441b4a scripts/config_whitelist.txt: Resync
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-01-08 20:16:00 -05:00
Jagan Teki
a8eac0acdc mx6ullevk: Add missing MAINTAINERS for mx6ull_14x14_evk_plugin_defconfig
Add 'Peng Fan' as MAINTAINERS of configs/mx6ull_14x14_evk_plugin_defconfig
which is missing in below commit
"imx: mx6ull_14x14_evk: add plugin defconfig"
(sha1: b90ebf49bb)

Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jagan Teki <jagan@openedev.com>
2017-01-08 10:07:10 -05:00
Andrew F. Davis
4d82c4b53e am335x: configs: Use ISW_ENTRY_ADDR to set SPL_TEXT_BASE
The SPL load address changes based on boot type in HS devices,
ISW_ENTRY_ADDR is used to set this address for AM43xx based SoCs
for similar reasons. Add this same logic for AM33xx devices.

Also make the default value for ISW_ENTRY_ADDR correct for GP
devices based on SoC, HS devices already pick the correct
value in their defconfig.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-01-08 08:31:46 -05:00
Andrew F. Davis
7410f1464e arm: mach-omap2: Fix secure file generation
When TI_SECURE_DEV_PKG is not defined we warn that the file '*_HS' was
not generated but generate an unsigned one anyway, first fix this
warning to say that it was generated but not secured.

When the user then exports TI_SECURE_DEV_PKG after getting this warning,
and tries to re-build, 'make' will detect the build artifacts as
unchanged and so assume they do not need to be re-generated. This causes
it to fail to sign the files and it will pack unsigned files into the
final image, even though TI_SECURE_DEV_PKG is now correctly defined and
working.

Fix this by using FORCE on the targets causes them to be re-run even if
the dependent files have not changed.

This then causes another issue. We currently rename the signed dtb files
to overwrite the non-signed ones. We do this so the 'mkimage' tool gives
the packaged dtb sections the correct name. If we do not rename the files
then SPL will not find them during boot.

Fix this by renaming the dtb files by appending _HS to the end of the
filename, after the ".dtb", this causes them to still be named correctly
in the FIT blob.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2017-01-08 08:31:33 -05:00
Tom Rini
0ed06c7ee4 Merge branch 'master' of git://git.denx.de/u-boot-tegra 2017-01-04 19:41:50 -05:00
Tom Rini
88c7da6275 Merge branch 'master' of git://git.denx.de/u-boot-spi 2017-01-04 19:41:23 -05:00
York Sun
4851278e30 powerpc: mpc85xx: Move macro CONFIG_SYS_PPC64 to Kconfig
Use Kconfig option SYS_PPC64 instead.

Signed-off-by: York Sun <york.sun@nxp.com>
2017-01-04 19:40:56 -05:00
York Sun
7371774ab9 powerpc: mpc85xx: Move CONFIG_SYS_FSL_QORIQ_CHASSIS* to Kconfig
Use Kconfig option to select chassis version.

Signed-off-by: York Sun <york.sun@nxp.com>
2017-01-04 19:40:55 -05:00