Skip to content
Snippets Groups Projects
  1. Jan 09, 2017
    • Michal Simek's avatar
      scsi: dm: Unbind all scsi based block devices before new scan · f8f41ae6
      Michal Simek authored
      
      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: default avatarKen Ma <make@marvell.com>
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      f8f41ae6
  2. Jan 04, 2017
  3. Jan 02, 2017
  4. Dec 20, 2016
    • Michal Simek's avatar
      common: Fix logic in fpga programming · 611a9428
      Michal Simek authored
      
      Stop boot process if fpga programming fails.
      Without this patch boot process continues even if fpga programming
      failed.
      
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      611a9428
    • Michal Simek's avatar
      dm: Add support for scsi/sata based devices · e8a016b5
      Michal Simek authored
      
      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: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      e8a016b5
    • Michal Simek's avatar
      common: miiphyutil: Add helper function for mdio bus name · 79e2a6a0
      Michal Simek authored
      
      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: default avatarMichal Simek <michal.simek@xilinx.com>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      79e2a6a0
  5. Dec 09, 2016
  6. Dec 08, 2016
    • Michal Simek's avatar
      common: miiphyutil: Add helper function for mdio bus name · f1a88cf6
      Michal Simek authored
      
      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: default avatarMichal 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
    • Michal Simek's avatar
      dm: Add support for scsi/sata based devices · bce4d18c
      Michal Simek authored
      
      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: default avatarMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: default avatarSimon 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
  7. Dec 05, 2016
  8. Dec 04, 2016
    • Andrew F. Davis's avatar
      common: image: Remove FIT header update from image post-processing · 44402fe7
      Andrew F. Davis authored
      
      After an image is selected out of a FIT blob for further processing we
      run an optional, platform specific, post-processing function on this
      component. This post-processing may modify the position and size of the
      image, so after post-processing we update the location and size for this
      image in the FIT header. This can cause problems as the position of
      subsequent components in the FIT blob are only referenced by relative
      position to the end of the last component. When we resize or move a
      component the following components position will be calculated
      incorrectly. To fix this, we do not update the FIT header but instead
      only update our local understanding of the image data. This also allows
      us to re-run post-processing steps if needed.
      
      Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
      Tested-by: default avatarCarlos Hernandez <ceh@ti.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      44402fe7
  9. Dec 03, 2016
  10. Dec 02, 2016
  11. Dec 01, 2016
  12. Nov 30, 2016
  13. Nov 29, 2016
Loading