1. 01 5月, 2020 20 次提交
    • R
      rtc: pcf2127: don't add/subtract 1 to tm_mon · b8a42e0f
      Rasmus Villemoes 提交于
      As noted in rtc_def.h, the tm_mon field in struct rtc_time is 1-12,
      unlike in struct tm where it is 0-11. Currently, running "date" prints
      the wrong
      
      Date: 2020-04-01 (Friday)    Time: 13:05:30
      
      and setting the RTC via the date command is also broken.
      Signed-off-by: NRasmus Villemoes <rasmus.villemoes@prevas.dk>
      b8a42e0f
    • P
      arm: caches: manage phys_addr_t overflow in mmu_set_region_dcache_behaviour · 54be09cd
      Patrick Delaunay 提交于
      Solved the overflow on phys_addr_t type for start + size in
      mmu_set_region_dcache_behaviour() function.
      
      This overflow is avoided by dividing start and end by 2 before addition,
      and we only expecting that start and size are even.
      
      This patch doesn't change the current function behavior if the
      parameters (start or size) are not aligned on MMU_SECTION_SIZE.
      
      For example, this overflow occurs on ARM32 with:
      start = 0xC0000000 and size = 0x40000000
      then start + size = 0x100000000 and end = 0x0.
      
      For information the function behavior change with risk of regression,
      if we just shift start and size before the addition.
      Example with 2MB section size:
        MMU_SECTION_SIZE 0x200000 and MMU_SECTION_SHIFT = 21
        with start = 0x1000000, size = 0x1000000,
        - with the proposed patch, start = 0 and end = 0x1 as previously
        - with the more simple patch:
          end = (start >> MMU_SECTION_SHIFT) + (size >> MMU_SECTION_SHIFT)
          the value of end change:
          start >> 21 = 0, size >> 21 = 0 and end = 0x0 !!!
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      54be09cd
    • P
      arm: caches: add DCACHE_DEFAULT_OPTION · 2e8d68e2
      Patrick Delaunay 提交于
      Add the new flags DCACHE_DEFAULT_OPTION to define the default
      option to use according the compilation flags
      CONFIG_SYS_ARM_CACHE_*.
      
      This new compilation flag allows to simplify dram_bank_mmu_setup()
      and can be used as third parameter (option=dcache option to select)
      of mmu_set_region_dcache_behaviour function.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      2e8d68e2
    • P
      arm: caches: protect dram_bank_mmu_setup access to bi_dram · c8ec1e3f
      Patrick Delaunay 提交于
      Add protection in dram_bank_mmu_setup() to avoid access to bd->bi_dram
      before relocation.
      
      This patch allow to use the generic weak function dram_bank_mmu_setup
      to activate the MMU and the data cache in SPL or in U-Boot before
      relocation, when bd->bi_dram is not yet initialized.
      
      In this cases, the MMU must be initialized explicitly with
      mmu_set_region_dcache_behaviour function.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      c8ec1e3f
    • P
      configs: migrate CONFIG_SYS_ARM_CACHE_* in Kconfig · f8dc7f2f
      Patrick Delaunay 提交于
      Move CONFIG_SYS_ARM_CACHE_WRITETHROUGH and
      CONFIG_SYS_ARM_CACHE_WRITEALLOC into Kconfig done by moveconfig.py.
      
      Kconfig uses a choice between the 3 values supported in U-Boot,
      including the new configuration CONFIG_SYS_ARM_CACHE_WRITEBACK
      (the default configuration).
      
      The patch also avoids to select simultaneously 2 configurations.
      Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
      f8dc7f2f
    • M
      tiny-printf: Support %i · e7882f65
      Marek Vasut 提交于
      The most basic printf("%i", value) formating string was missing,
      add it for the sake of convenience.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Stefan Roese <sr@denx.de>
      e7882f65
    • T
      Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi · b641dd3e
      Tom Rini 提交于
      - distro boot support for SPI flash
      - sifive spi flash driver
      b641dd3e
    • T
      Merge tag 'efi-2020-07-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi · 78021b63
      Tom Rini 提交于
      Pull request for UEFI sub-system for efi-2020-07-rc2
      
      This pull request contains bug fixes needed due to the merged changes for
      EFI secure boot.
      
      Patches are supplied to identify EFI system partitions.
      78021b63
    • J
      sifive: fu540: Enable spi-nor flash support · 286bcdb4
      Jagan Teki 提交于
      HiFive Unleashed A00 support is25wp256 spi-nor flash,
      So enable the same and add test result log for future
      reference.
      
      Tested on SiFive FU540 board.
      
      Thanks to Sagar for various use cases and tests.
      
      [QUAD mode in dt with spi-tx-bus-width: <4>]
       pp opcode      = 0x34 [QUAD MODE]
       read opcode  = 0x6c  [QUAD MODE]
       erase opcode = 0x21
      
      SPI-NOR:
      1. erase entire flash: Pass
      2. write entire flash: Pass
      3. read entire flash: Pass
      4. cmp 32MiB read back data: Pass
      5. MMC: Booted Linux and dtb from mmc
      
      [SPI MODE in dt with spi-tx-bus-width: <1>]
      pp opcode     = 0x12 [SPI MODE]
      read opcode  = 0xc   [SPI MODE]
      erase opcode = 0x21
      
      SPI-NOR:
      1. erase entire flash: Pass
      2. write entire flash: Pass
      3. read entire flash: Pass
      4. cmp 32MiB read back data: Pass
      5. MMC: Booted Linux and dtb from mmc
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      Tested-by: NSagar Kadam <sagar.kadam@sifive.com>
      286bcdb4
    • J
      riscv: dts: hifive-unleashed-a00: Add -u-boot.dtsi · 0edb066c
      Jagan Teki 提交于
      Add U-Boot specific dts file for hifive-unleashed-a00, this
      would help to add u-boot specific properties and other node
      changes without touching the base dts(i) files which are easy
      to sync from Linux.
      
      Added spi2 alias for qspi2 as an initial u-boot specific
      property change.
      
      spi probing in current dm model is very much rely on aliases
      numbering. Even though the qspi2 can't come under any associated
      spi nor flash it would require to specify the same to make proper
      binding happen for other spi slaves.
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      Tested-by: NSagar Kadam <sagar.kadam@sifive.com>
      0edb066c
    • J
      spi: sifive: Fix QPP transfer · 25e4d94f
      Jagan Teki 提交于
      The guessed reason is that the existing logic of filling
      tx fifo with data, rx fifo with NULL for tx transfer and
      filling rx fifo with data, tx fifo with NULL for rx transfer
      is not clear enough to support the Quad Page Program.
         
      SiFive SPI controllers have specific sets of watermark
      registers and SPI I/O directions bits in order to program
      SPI controllers clear enough to support all sets of operating
      modes.
         
      Here is the exact programing sequence that would follow on this
      patch and tested via SPI-NOR and MMC_SPI.
         
      - set the frame format proto, endian
      - set the frame format dir, set it for tx and clear it for rx
      - TX transfer:
        fill tx fifo with data.
        wait for TX watermark bit to clear.
      - RX transfer:
        fill tx fifo with 0xff.
        write nbytes to rx watermark register
        wait for rx watermark bit to clear.
        read the rx fifo data.
      
      So, this patch adopts this program sequence and fixes the existing
      I/O direction bit.
      
      Cc: Vignesh R <vigneshr@ti.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Tested-by: NSagar Kadam <sagar.kadam@sifive.com>
      25e4d94f
    • J
      spi: sifive: Fix format register proto field · 622b913e
      Jagan Teki 提交于
      SiFive SPI controller has a proto bit field in frame format
      register which would be used to configure the SPI I/O protocol
      lines used on specific transfer. 
      
      Right now the driver is configuring this proto using slave->mode,
      for all types of transctions. This makes the driver unable to
      function since the proto needs to configure dynamically for
      each and every transaction separately at runtime.
      
      Now, the controller driver supports per transfer via spi-mem
      exec_opo, so add the fmt_proto flag and fill the per transfer
      buswidth so that the controller configures the proto bit at
      runtime.
      
      This patch fixes the SPI controller works with SPI NOR flash
      on quad read with page program.
      
      Cc: Vignesh R <vigneshr@ti.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Tested-by: NSagar Kadam <sagar.kadam@sifive.com>
      622b913e
    • J
      spi: sifive: Add spi-mem exec op · b7d6e104
      Jagan Teki 提交于
      SiFive SPI controller is responsible to handle the
      slave devices like mmc spi and spi nor flash.
      
      The controller is designed such a way that it would
      handle the slave transactions based on the I/O protocol
      numbers, example if spi nor slave send quad write opcode
      it has to send alone with I/O protocol number of 4 and
      if it try to send data it has to send I/O protocol number
      along with 4 line data.
      
      But the current spi-xfer code from spi-mem is combining
      the opcode and address in a single transaction, so the
      SPI controller will be unable to identify the I/O protocol
      number of opcode vs address.
      
      So, add the spi-mem exec_op with spi-xfer of opcode, address
      and data as a separate transaction. This doesn't remove
      the .xfer of dm_spi_ops since mmc spi will make use of it.
      
      Note: This code might have moved to the spi-mem core area
      once we have done the dedicated tests on other controllers
      and have real reason to move.
      
      Cc: Vignesh R <vigneshr@ti.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Tested-by: NSagar Kadam <sagar.kadam@sifive.com>
      b7d6e104
    • K
      mtd: spi-nor-ids: Add Spansion s25fs512s flash entry · 685465fb
      Kuldeep Singh 提交于
      Spansion "s25fs512s" flash is incorrectly decoded as "s25fl512s" on
      various platforms as former is not present. Add the entry.
      
      Linux already has both the flashes present. A snippet below:
      { "s25fl512s",  INFO6(0x010220, 0x4d0080, 256 * 1024, 256...},
      { "s25fs512s",  INFO6(0x010220, 0x4d0081, 256 * 1024, 256...},
      Signed-off-by: NKuldeep Singh <kuldeep.singh@nxp.com>
      Reviewed-by: NJagan Teki <jagan@amarulasolutions.com>
      685465fb
    • J
      watchdog: kconfig: Enable designware for rk3399 · 0a08a614
      Jagan Teki 提交于
      Enable designware watchdog driver for rk3399 if WDT defined.
      
      Cc: Marek Vasut <marex@denx.de>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NKever Yang <kever.yang@rock-chips.com>
      0a08a614
    • J
      mtd: spi-nor-ids: Enable 4B_OPCODES for is25wp256 · a976238d
      Jagan Teki 提交于
      IS25WP256 flash chips do support 4byte address opcodes,
      so enable support for it.
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NSagar Kadam <sagar.kadam@sifive.com>
      a976238d
    • J
      mtd: spi-nor: Enable QE bit for ISSI flash · 5bf3f3dd
      Jagan Teki 提交于
      Enable QE bit for ISSI flash chips.
      
      QE enablement logic is similar to what Macronix
      has, so reuse the existing code itself.
      
      Cc: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      5bf3f3dd
    • J
      spi: sifive: Tidy up dm_spi_slave_platdata variable · e67cd814
      Jagan Teki 提交于
      Usually variable name slave is used for spi_slave structure
      and slave_plat for the dm_spi_slave_platdata.
      
      Let's follow this meaningful notation by replacing slave
      with slave_plat for dm_spi_slave_platdata structure.
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
      e67cd814
    • J
      rk3399: Enable SF distro bootcmd · f263b860
      Jagan Teki 提交于
      Enable SPI flash(SF) distro boot command in rk3399.
      
      This distro boot will read the boot script at specific
      location at the flash and start sourcing the same.
      
      Included the SF device at the last of the target devices
      list since all the rest of the devices on the list have
      more possibility to boot the distribution due to the
      size of the SPI flash is concern.
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NKever Yang <kever.yang@rock-chips.com>
      f263b860
    • T
      Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86 · 9f0a6df3
      Tom Rini 提交于
      - DM ACPI support (Part A)
      - Improve support for chain-loading x86 U-Boot
      9f0a6df3
  2. 30 4月, 2020 20 次提交