1. 09 12月, 2016 15 次提交
  2. 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
  3. 06 12月, 2016 16 次提交