1. 09 2月, 2017 1 次提交
    • L
      mtd: physmap_of: add a hook for Gemini flash probing · 56ff337e
      Linus Walleij 提交于
      In order to support device tree probing of Gemini NOR flash
      chips, a certain register in the syscon needs to be poked
      to enable parallel flash mode.
      
      Such things used to happen in "necessarily different" board
      file code, and this indeed was also done for the Gemini, so
      the MTD driver could treat it as any memory-mapped NOR flash,
      but this is not the way in the future: board files need to
      go, and hardware concerns distributed down to the applicable
      drivers.
      
      This adds a hook in the same way that the Versatile did: if
      the Kconfig symbol is not selected the net total of supporting
      Gemini should be zero bytes of added code. To live up to this
      promise, also the return value error print from the Versatile
      extra probe call get to be removed in this patch, all printing
      need to happen in the add-ons.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NMarek Vasut <marek.vasut@gmail.com>
      Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
      56ff337e
  2. 10 7月, 2016 1 次提交
  3. 04 4月, 2016 1 次提交
    • L
      mtd: physmap_of: add a hook for Versatile write protection · b0afd44b
      Linus Walleij 提交于
      In order to support device tree probing of Versatile NOR flash
      chips, there must be a way to add the VPP (write protection)
      enable/disable callback. The register in question is in the
      system controllers of these machines. Apart from this quirk,
      the ARM flash chips are standard CFI flash chips from various
      vendors.
      
      Additionally, the Integrator/AP require you to set up the external
      bus interface (EBI) to allow writes to the chip select where the
      flash memory is connected.
      
      Solve this by looking for the arm,versatile-flash compatible
      string in the flash device tree node. In the driver,
      add a special hook to check for the various Versatile syscons and
      register a callback for .set_vpp() if this compatible is present.
      
      Provide a special Kconfig entry for the addon hook so it will
      not be compiled in if the Versatile boards are not supported.
      Stubs in the header file make sure the impact will be zero on
      other platforms. (Compilers optimze this out.)
      
      With this patch, a large slew of ARM board file code can be
      removed.
      
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      b0afd44b
  4. 12 11月, 2015 2 次提交
  5. 14 10月, 2015 1 次提交
  6. 19 8月, 2015 1 次提交
  7. 07 5月, 2015 1 次提交
  8. 10 1月, 2015 1 次提交
  9. 13 12月, 2014 1 次提交
  10. 20 10月, 2014 1 次提交
  11. 23 9月, 2014 2 次提交
  12. 11 3月, 2014 1 次提交
  13. 05 4月, 2013 1 次提交
  14. 13 2月, 2013 1 次提交
  15. 04 2月, 2013 1 次提交
    • S
      mtd: cfi_cmdset_0002: Support Persistent Protection Bits (PPB) locking · 1648eaaa
      Stefan Roese 提交于
      Currently cfi_cmdset_0002.c does not support PPB locking of sectors. This
      patch adds support for this locking/unlocking mechanism. It is needed on
      some platforms, since newer U-Boot versions do support this PPB locking
      and protect for example their environment sector(s) this way.
      
      This PPB locking/unlocking will be enabled for all devices supported by
      cfi_cmdset_0002 reporting 8 in the CFI word 0x49 (Sector Protect/Unprotect
      scheme).
      
      Please note that PPB locking does support sector-by-sector locking. But
      the whole chip can only be unlocked together. So unlocking one sector
      will automatically unlock all sectors of this device. Because of this
      chip limitation, the PPB unlocking function saves the current locking
      status of all sectors before unlocking the whole device. After unlocking
      the saved locking status is re-configured. This way only the addressed
      sectors will be unlocked.
      
      To selectively enable this advanced sector protection mechanism, the
      device-tree property "use-advanced-sector-protection" has been created.
      To enable support for this locking this property needs to be present in the
      flash DT node. E.g.:
      
      nor_flash@0,0 {
      	compatible = "amd,s29gl256n", "cfi-flash";
      	bank-width = <2>;
      	use-advanced-sector-protection;
      	...
      
      Tested with Spansion S29GL512S10THI and Micron JS28F512M29EWx flash
      devices.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Tested-by: NHolger Brunck <holger.brunck@keymile.com>
      Signed-off-by: NArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      1648eaaa
  16. 19 1月, 2013 1 次提交
  17. 04 1月, 2013 1 次提交
    • G
      Drivers: mtd: remove __dev* attributes. · d8929942
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, and __devexit
      from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d8929942
  18. 10 12月, 2012 1 次提交
  19. 22 11月, 2012 1 次提交
  20. 16 11月, 2012 1 次提交
  21. 29 9月, 2012 1 次提交
  22. 10 1月, 2012 1 次提交
  23. 11 9月, 2011 3 次提交
  24. 25 5月, 2011 1 次提交
  25. 19 5月, 2011 1 次提交
    • G
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely 提交于
      Commit b826291c, "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b1608d69
  26. 11 3月, 2011 1 次提交
  27. 01 3月, 2011 1 次提交
  28. 04 12月, 2010 1 次提交
  29. 25 10月, 2010 2 次提交
  30. 29 9月, 2010 1 次提交
  31. 18 8月, 2010 1 次提交
  32. 06 8月, 2010 1 次提交
  33. 03 6月, 2010 1 次提交
    • J
      drivers/mtd/maps: introduce missing kfree · 00b275db
      Julia Lawall 提交于
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      00b275db
  34. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  35. 19 5月, 2010 1 次提交