SHARE
TWEET

Untitled

a guest Sep 4th, 2019 1,338 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
  2. index 277f48f1cc1c..06106c9320bb 100644
  3. --- a/drivers/mfd/intel-lpss.c
  4. +++ b/drivers/mfd/intel-lpss.c
  5. @@ -395,7 +395,7 @@ int intel_lpss_probe(struct device *dev,
  6.     if (!lpss)
  7.         return -ENOMEM;
  8.  
  9. -   lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET,
  10. +   lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET,
  11.                   LPSS_PRIV_SIZE);
  12.     if (!lpss->priv)
  13.         return -ENOMEM;
  14. diff --git a/include/linux/io.h b/include/linux/io.h
  15. index accac822336a..a59834bc0a11 100644
  16. --- a/include/linux/io.h
  17. +++ b/include/linux/io.h
  18. @@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr)
  19.  
  20.  void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
  21.                resource_size_t size);
  22. +void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
  23. +                  resource_size_t size);
  24.  void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset,
  25.                    resource_size_t size);
  26.  void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset,
  27. diff --git a/lib/devres.c b/lib/devres.c
  28. index 6a0e9bd6524a..ca4a18f71798 100644
  29. --- a/lib/devres.c
  30. +++ b/lib/devres.c
  31. @@ -9,6 +9,7 @@
  32.  enum devm_ioremap_type {
  33.     DEVM_IOREMAP = 0,
  34.     DEVM_IOREMAP_NC,
  35. +   DEVM_IOREMAP_UC,
  36.     DEVM_IOREMAP_WC,
  37.  };
  38.  
  39. @@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset,
  40.     case DEVM_IOREMAP_NC:
  41.         addr = ioremap_nocache(offset, size);
  42.         break;
  43. +   case DEVM_IOREMAP_UC:
  44. +       addr = ioremap_uc(offset, size);
  45. +       break;
  46.     case DEVM_IOREMAP_WC:
  47.         addr = ioremap_wc(offset, size);
  48.         break;
  49. @@ -68,6 +72,22 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset,
  50.  }
  51.  EXPORT_SYMBOL(devm_ioremap);
  52.  
  53. +/**
  54. + * devm_ioremap_uc - Managed ioremap_uc()
  55. + * @dev: Generic device to remap IO address for
  56. + * @offset: Resource address to map
  57. + * @size: Size of map
  58. + *
  59. + * Managed ioremap_uc().  Map is automatically unmapped on driver detach.
  60. + */
  61. +void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset,
  62. +                 resource_size_t size)
  63. +{
  64. +   return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC);
  65. +}
  66. +EXPORT_SYMBOL(devm_ioremap_uc);
  67. +
  68. +
  69.  /**
  70.   * devm_ioremap_nocache - Managed ioremap_nocache()
  71.   * @dev: Generic device to remap IO address for
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top