1. 11 11月, 2019 2 次提交
    • T
      mtd: spi-nor: Rework the disabling of block write protection · 3e0930f1
      Tudor Ambarus 提交于
      spi_nor_unlock() unlocks blocks of memory or the entire flash memory
      array, if requested. clear_sr_bp() unlocks the entire flash memory
      array at boot time. This calls for some unification, clear_sr_bp() is
      just an optimization for the case when the unlock request covers the
      entire flash size.
      
      Get rid of clear_sr_bp() and introduce spi_nor_unlock_all(), which is
      just a call to spi_nor_unlock() for the entire flash memory array.
      This fixes a bug that was present in spi_nor_spansion_clear_sr_bp().
      When the QE bit was zero, we used the Write Status (01h) command with
      one data byte, which might cleared the Status Register 2. We now always
      use the Write Status (01h) command with two data bytes when
      SNOR_F_HAS_16BIT_SR is set, to avoid clearing the Status Register 2.
      
      The SNOR_F_NO_READ_CR case is treated as well. When the flash doesn't
      support the CR Read command, we make an assumption about the value of
      the QE bit. In spi_nor_init(), call spi_nor_quad_enable() first, then
      spi_nor_unlock_all(), so that at the spi_nor_unlock_all() time we can
      be sure the QE bit has value one, because of the previous call to
      spi_nor_quad_enable().
      
      Get rid of the MFR handling and implement specific manufacturer
      default_init() fixup hooks.
      
      Note that this changes a bit the logic for the SNOR_MFR_ATMEL,
      SNOR_MFR_INTEL and SNOR_MFR_SST cases. Before this patch, the Atmel,
      Intel and SST chips did not set the locking ops, but unlocked the entire
      flash at boot time, while now they are setting the locking ops to
      stm_locking_ops. This should work, since the disable of the block
      protection at the boot time used the same Status Register bits to unlock
      the flash, as in the stm_locking_ops case.
      Suggested-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com>
      3e0930f1
    • T
      mtd: spi-nor: Fix clearing of QE bit on lock()/unlock() · 39d1e334
      Tudor Ambarus 提交于
      Make sure that when doing a lock() or an unlock() operation we don't clear
      the QE bit from Status Register 2.
      
      JESD216 revB or later offers information about the *default* Status
      Register commands to use (see BFPT DWORDS[15], bits 22:20). In this
      standard, Status Register 1 refers to the first data byte transferred on a
      Read Status (05h) or Write Status (01h) command. Status register 2 refers
      to the byte read using instruction 35h. Status register 2 is the second
      byte transferred in a Write Status (01h) command.
      
      Industry naming and definitions of these Status Registers may differ.
      The definitions are described in JESD216B, BFPT DWORDS[15], bits 22:20.
      There are cases in which writing only one byte to the Status Register 1
      has the side-effect of clearing Status Register 2 and implicitly the Quad
      Enable bit. This side-effect is hit just by the
      BFPT_DWORD15_QER_SR2_BIT1_BUGGY and BFPT_DWORD15_QER_SR2_BIT1 cases.
      Suggested-by: NBoris Brezillon <boris.brezillon@collabora.com>
      Signed-off-by: NTudor Ambarus <tudor.ambarus@microchip.com>
      Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com>
      39d1e334
  2. 07 11月, 2019 12 次提交
  3. 02 11月, 2019 4 次提交
  4. 01 11月, 2019 12 次提交
  5. 23 10月, 2019 6 次提交
  6. 21 10月, 2019 2 次提交
  7. 20 10月, 2019 2 次提交
    • L
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4fe34d61
      Linus Torvalds 提交于
      Pull x86 fixes from Thomas Gleixner:
       "A small set of x86 fixes:
      
         - Prevent a NULL pointer dereference in the X2APIC code in case of a
           CPU hotplug failure.
      
         - Prevent boot failures on HP superdome machines by invalidating the
           level2 kernel pagetable entries outside of the kernel area as
           invalid so BIOS reserved space won't be touched unintentionally.
      
           Also ensure that memory holes are rounded up to the next PMD
           boundary correctly.
      
         - Enable X2APIC support on Hyper-V to prevent boot failures.
      
         - Set the paravirt name when running on Hyper-V for consistency
      
         - Move a function under the appropriate ifdef guard to prevent build
           warnings"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard
        x86/hyperv: Set pv_info.name to "Hyper-V"
        x86/apic/x2apic: Fix a NULL pointer deref when handling a dying cpu
        x86/hyperv: Make vapic support x2apic mode
        x86/boot/64: Round memory hole size up to next PMD page
        x86/boot/64: Make level2_kernel_pgt pages invalid outside kernel area
      4fe34d61
    • L
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 81c4bc31
      Linus Torvalds 提交于
      Pull irq fixes from Thomas Gleixner:
       "A small set of irq chip driver fixes and updates:
      
         - Update the SIFIVE PLIC interrupt driver to use the fasteoi handler
           to address the shortcomings of the existing flow handling which was
           prone to lose interrupts
      
         - Use the proper limit for GIC interrupt line numbers
      
         - Add retrigger support for the recently merged Anapurna Labs Fabric
           interrupt controller to make it complete
      
         - Enable the ATMEL AIC5 interrupt controller driver on the new
           SAM9X60 SoC"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/sifive-plic: Switch to fasteoi flow
        irqchip/gic-v3: Fix GIC_LINE_NR accessor
        irqchip/atmel-aic5: Add support for sam9x60 irqchip
        irqchip/al-fic: Add support for irq retrigger
      81c4bc31