1. 08 12月, 2016 9 次提交
    • M
      net: xilinx: Use mdio_register_seq() to support multiple instances · b63cb3ab
      Michal Simek 提交于
      axi_emac, emaclite and gem have the same issue with registering
      multiple instances with mdio busses. mdio bus name has to be uniq but
      drivers are setting up only one name for all.
      Use mdio_register_seq() and pass dev->seq number to allow multiple
      mdio instances registration.
      Reported-by: NPhani Kiran Kara <phanikiran.kara@gmail.com>
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Series-to: u-boot
      Series-cc: Phani Kiran Kara <phanikiran.kara@gmail.com>
      b63cb3ab
    • M
      common: miiphyutil: Add helper function for mdio bus name · f1a88cf6
      Michal Simek 提交于
      The most of ethernet drivers are using this mdio registration sequence.
      strcpy(priv->bus->name, "emac");
      mdio_register(priv->bus);
      Where driver can be used only with one MDIO bus because only unique
      name should be used.
      
      Other drivers are using unique device name for MDIO registration to
      support multiple instances.
      snprintf(priv->bus->name, sizeof(bus->name), "%s", name);
      
      With DM dev->seq is used more even in logs
      (like random MAC address generation:
      printf("\nWarning: %s (eth%d) using random MAC address - %pM\n",
             dev->name, dev->seq, pdata->enetaddr);
      )
      where eth%d prefix is used.
      
      Simplify driver code to register mdio device with dev->seq number
      to simplify mdio registration and reduce code duplication across
      all drivers. With DM_SEQ_ALIAS enabled dev->seq reflects alias setting.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      ---
      For example:
      
      Board: Xilinx Zynq
      Net:   ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id
      
      Warning: ethernet@e000b000 (eth0) using random MAC address -
      7a:fc:90:53:6a:41
      eth0: ethernet@e000b000ZYNQ GEM: e000c000, phyaddr ffffffff, interface
      rgmii-id
      
      Warning: ethernet@e000c000 (eth3) using random MAC address -
      1a:ff:d7:1a:a1:b2
      , eth3: ethernet@e000c000
      ** Bad device size - mmc 0 **
      Checking if uenvcmd is set ...
      Hit any key to stop autoboot:  0
      Zynq> mdio list
      eth0:
      17 - Marvell 88E1111S <--> ethernet@e000b000
      eth3:
      17 - Marvell 88E1111S <--> ethernet@e000c000
      Zynq>
      f1a88cf6
    • M
      ARM64: zynqmp: Add updated psu_init_gpl* files · bf0f27f4
      Michal Simek 提交于
      With origin files there was an issue with serdes setting for SCSI.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      bf0f27f4
    • M
      zynqmp works · 8a5db0ab
      Michal Simek 提交于
      8a5db0ab
    • N
      ARM: zynq: Replace dram_init* functions with board_init_f safe ones · 64b67fb2
      Nathan Rossi 提交于
      The dram_init* functions for the zynq board are not safe for use from
      the board_init_f stage due to its use of the 'tmp' static variable.
      
      This incorrect use of a static variable was causing rare issues where
      the dram_init function would overwrite some parts the __rel_dyn section
      which caused obscure failures.
      
      Using the zynq_zybo configuration, U-Boot would generate the following
      error during image load. This was caused due to dram_init overwriting
      the relocations for the "image" variable within the do_bootm function.
      Out of coincidence the un-initialized memory has a compression type
      which is the same as the value for the relocation type R_ARM_RELATIVE.
      
         Uncompressing Invalid Image ... Unimplemented compression type 23
      
      It should be noted that this is just one way the issue could surface,
      other cases my not be observed in normal boot flow.
      
      This change removes the existing code and copies the implementation of
      the dram_init and dram_init_banksize from the
      arch/arm/mach-uniphier/dram_init.c source. This version of these
      functions does not use static variables and behaves the same (reading
      banks from fdt, and using the first bank as the ram_size).
      Signed-off-by: NNathan Rossi <nathan@nathanrossi.com>
      Fixes: 758f29d0 ("ARM: zynq: Support systems with more memory banks")
      Cc: Michal Simek <monstr@monstr.eu>
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      64b67fb2
    • M
      travis-ci: Add zynq_zc702 target support · 3fd4de88
      Michal Simek 提交于
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      
      Use embded option because of qemu
      
      Use my repo till Stephen merge it.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      3fd4de88
    • M
      tools: mkimage: Use fstat instead of stat to avoid malicious hacks · 37a2cf6f
      Michal Simek 提交于
      The patch is fixing:
      "tools: mkimage: Check if file is regular file"
      (sha1: 56c7e801)
      which contains two issues reported by Coverity
      Unchecked return value from stat and incorrect calling sequence where
      attack can happen between calling stat and fopen.
      Using pair in opposite order (fopen and fstat) is fixing this issue
      because fstat is using the same file descriptor (FILE *).
      
      Also fixing issue with:
      "tools: mkimage: Add support for initialization table for Zynq and
      ZynqMP" (sha1: 3b646080)
      where file wasn't checked that it is regular file.
      
      Reported-by: Coverity (CID: 154711, 154712)
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      Series-to: trini
      Series-cc: u-boot
      37a2cf6f
    • M
      block: Move ceva driver to DM · 8814c038
      Michal Simek 提交于
      This patch also includes ARM64 zynqmp changes:
      - Remove platform non DM initialization
      - Remove hardcoded sata base address
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Series-to: sjg, agraf@suse.de
      Series-cc: uboot
      Series-version: 4
      Series-changes: 2
      - make ceva_init_sata static
      - Move SATA_CEVA to defconfig
      - Initalized max_lun and max_id platdata
      
      Series-changes: 3
      - Extend Kconfig help description
      - sort dm.h
      - Remove SPL undefinition from board file
      - Fix Kconfig dependecies
      8814c038
    • M
      dm: Add support for scsi/sata based devices · bce4d18c
      Michal Simek 提交于
      All sata based drivers are bind and corresponding block
      device is created. Based on this find_scsi_device() is able
      to get back block device based on scsi_curr_dev pointer.
      
      intr_scsi() is commented now but it can be replaced by calling
      find_scsi_device() and scsi_scan().
      
      scsi_dev_desc[] is commented out but common/scsi.c heavily depends on
      it. That's why CONFIG_SYS_SCSI_MAX_DEVICE is hardcoded to 1 and symbol
      is reassigned to a block description allocated by uclass.
      There is only one block description by device now but it doesn't need to
      be correct when more devices are present.
      
      scsi_bind() ensures corresponding block device creation.
      uclass post_probe (scsi_post_probe()) is doing low level init.
      
      SCSI/SATA DM based drivers requires to have 64bit base address as
      the first entry in platform data structure to setup mmio_base.
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Series-changes: 2
      - Use CONFIG_DM_SCSI instead of mix of DM_SCSI and DM_SATA
        Ceva sata has never used sata commands that's why keep it in
        SCSI part only.
      - Separate scsi_scan() for DM_SCSI and do not change cmd/scsi.c
      - Extend platdata
      
      Series-changes: 3
      - Fix scsi_scan return path
      - Fix header location uclass-internal.h
      - Add scsi_max_devs under !DM_SCSI
      - Add new header device-internal because of device_probe()
      - Redesign block device creation algorithm
      - Use device_unbind in error path
      - Create block device with id and lun numbers (lun was there in v2)
      - Cleanup dev_num initialization in block device description
        with fixing parameters in blk_create_devicef
      - Create new Kconfig menu for SATA/SCSI drivers
      - Extend description for DM_SCSI
      - Fix Kconfig dependencies
      - Fix kernel doc format in scsi_platdata
      - Fix ahci_init_one - vendor variable
      
      Series-changes: 4
      - Fix Kconfig entry
      - Remove SPL ifdef around SCSI uclass
      - Clean ahci_print_info() ifdef logic
      bce4d18c
  2. 06 12月, 2016 16 次提交
  3. 05 12月, 2016 15 次提交
    • S
      sata: sata_mv: Fix misaligned cache warnings · 5102af4d
      Stefan Roese 提交于
      This patch fixes the warnings about misaligned cache on Armada XP:
      
      CACHE: Misaligned operation at range [7facb400, 7facb460]
      Signed-off-by: NStefan Roese <sr@denx.de>
      5102af4d
    • S
      arm64: mvebu: Restrict memory size to a usable maximum · 059f75d5
      Stefan Roese 提交于
      Not all memory is mapped in the MMU. So we need to restrict the memory
      size so that U-Boot does not try to access it. Also, the internal
      registers are located at 0xf000.0000 - 0xffff.ffff. Currently only 2GiB
      are mapped for system memory. This is what we pass to the U-Boot
      subsystem here.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      059f75d5
    • S
      arm64: mvebu: Add PCI support to DB-88F8040 board · 1ec5aa63
      Stefan Roese 提交于
      This patch adds PCI support to the Marvell Armada-8K devel board.
      Additionally the Intel E1000 ethernet driver is enabled so that
      network support is available on this board, even without the
      internal network interfaces being supported (yet).
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      1ec5aa63
    • S
      arm64: mvebu: Add regions for PCI spaces to the memory map · 6324fdc5
      Stefan Roese 提交于
      To use the PCIe driver, its controller memory and the PCIe regions need
      to get mapped in the MMU. Otherwise these areas can't be accessed.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      6324fdc5
    • S
      pci: mvebu: Add PCIe driver for Armada-8K · 182ba1a7
      Shadi Ammouri 提交于
      This patch adds a driver for the PCIe controller integrated in the
      Marvell Armada-8K SoC. This controller is based on the DesignWare
      IP core.
      
      The original version was written by Shadi and Yehuda. I ported this
      driver to the latest mainline U-Boot version with DM support.
      
      Tested on the Marvell DB-88F8040 Armada-8K eval board.
      Signed-off-by: NShadi Ammouri <shadi@marvell.com>
      Signed-off-by: NYehuda Yitschak <yehuday@marvell.com>
      Signed-off-by: NStefan Roese <sr@denx.de>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      182ba1a7
    • S
      drivers/phy: marvell: Add support for the slave CP COMPHY device · e8c3156e
      Stefan Roese 提交于
      With the support for the Armada 8k, a 2nd COMPHY controller now needs
      to get supported from the CP110 slave controller. This patch adds support
      for this 2nd contoller in the COMPHY driver.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      e8c3156e
    • S
      arm64: mvebu: Init COMPHY from the slave-CP on the A8k · d7dd358f
      Stefan Roese 提交于
      The Armada8k implements 2 CPs (communication processors) and the 2nd
      CP also is equipped with a COMPHY controller. This patch now loops
      over all enabled MISC devices (CP110) enabled in the DT to initialize
      all CPs.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      d7dd358f
    • S
      arm64: mvebu: armada-8040-db.dts: Add I2C and SPI aliases · af4c271c
      Stefan Roese 提交于
      Add I2C and SPI aliases to enable usage in U-Boot. Otherwise U-Boot will
      not be able to use the SPI NOR chip for environment storage and use
      "i2c dev 0" to select this I2C bus.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      af4c271c
    • S
      arm64: mvebu: armada-8040-db.dts: Add COMPHY configuration · 92fdaf0c
      Stefan Roese 提交于
      This patch adds the COMPHY device tree configuration to the DT file for
      the Marvell DB-88F8040 devel board.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      92fdaf0c
    • S
      arm64: mvebu: armada-cp110-slave.dtsi: Add COMPHY / UTMI device tree nodes · acbdc8e8
      Stefan Roese 提交于
      This patch adds the COMPHY and UTMI device tree nodes to the cp110-slave
      dtsi file for the Armada 8K.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      acbdc8e8
    • S
      arm64: mvebu: armada-cp110-master.dtsi: Rename comphy DT node names · a12c92e3
      Stefan Roese 提交于
      Since the cp110 slave also has comphy DT nodes, the names need to be
      renamed to avoid a name clash. Lets use the common naming scheme:
      "cpm_xxx" for master and "cps_xxx" for slave.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      a12c92e3
    • S
      arm64: mvebu: Add support for the DB-88F8040 Armada 8k devel board · 96816a84
      Stefan Roese 提交于
      This patch adds the necessary files to support the Marvell Armada 8k
      devel board. Most board specfic files are shared with the Armada 7k
      boards under the name "armada-8k*". So only minimal changes are
      necessary to add this basic board support (except the DT files of
      course).
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      96816a84
    • S
      arm64: mvebu: Add slave CP area to the memory map · 3fef31a3
      Stefan Roese 提交于
      To enable access to the slave CP its memory needs to be added to the
      MMU memory map.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      3fef31a3
    • S
      arm64: mvebu: armada-8k: Only configure xHCI power on DB-88F7040 board · acd3b076
      Stefan Roese 提交于
      This patch uses of_machine_is_compatible() to detect the board at runtime
      and only configured the I2C IO expander for the xHCI power / reset on
      the DB-88F7040 board. As this code will be used by other Armada-7k/8k
      ports, its necessary to use this runtime detection here.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      acd3b076
    • S
      arm64: mvebu: Add Armada-80x0 dts/dtsi files · bf2150b9
      Stefan Roese 提交于
      Add the latest version of the DT files from the Linux kernel.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Neta Zur Hershkovits <neta@marvell.com>
      Cc: Kostya Porotchkin <kostap@marvell.com>
      Cc: Omri Itach <omrii@marvell.com>
      Cc: Igal Liberman <igall@marvell.com>
      Cc: Haim Boot <hayim@marvell.com>
      Cc: Hanna Hawa <hannah@marvell.com>
      bf2150b9