Commit Graph

267 Commits

Author SHA1 Message Date
Linus Torvalds b08fc5277a - Error path bug fix for overflow tests (Dan)
- Additional struct_size() conversions (Matthew, Kees)
 - Explicitly reported overflow fixes (Silvio, Kees)
 - Add missing kvcalloc() function (Kees)
 - Treewide conversions of allocators to use either 2-factor argument
   variant when available, or array_size() and array3_size() as needed (Kees)
 -----BEGIN PGP SIGNATURE-----
 Comment: Kees Cook <kees@outflux.net>
 
 iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAlsgVtMWHGtlZXNjb29r
 QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJhsJEACLYe2EbwLFJz7emOT1KUGK5R1b
 oVxJog0893WyMqgk9XBlA2lvTBRBYzR3tzsadfYo87L3VOBzazUv0YZaweJb65sF
 bAvxW3nY06brhKKwTRed1PrMa1iG9R63WISnNAuZAq7+79mN6YgW4G6YSAEF9lW7
 oPJoPw93YxcI8JcG+dA8BC9w7pJFKooZH4gvLUSUNl5XKr8Ru5YnWcV8F+8M4vZI
 EJtXFmdlmxAledUPxTSCIojO8m/tNOjYTreBJt9K1DXKY6UcgAdhk75TRLEsp38P
 fPvMigYQpBDnYz2pi9ourTgvZLkffK1OBZ46PPt8BgUZVf70D6CBg10vK47KO6N2
 zreloxkMTrz5XohyjfNjYFRkyyuwV2sSVrRJqF4dpyJ4NJQRjvyywxIP4Myifwlb
 ONipCM1EjvQjaEUbdcqKgvlooMdhcyxfshqJWjHzXB6BL22uPzq5jHXXugz8/ol8
 tOSM2FuJ2sBLQso+szhisxtMd11PihzIZK9BfxEG3du+/hlI+2XgN7hnmlXuA2k3
 BUW6BSDhab41HNd6pp50bDJnL0uKPWyFC6hqSNZw+GOIb46jfFcQqnCB3VZGCwj3
 LH53Be1XlUrttc/NrtkvVhm4bdxtfsp4F7nsPFNDuHvYNkalAVoC3An0BzOibtkh
 AtfvEeaPHaOyD8/h2Q==
 =zUUp
 -----END PGP SIGNATURE-----

Merge tag 'overflow-v4.18-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull more overflow updates from Kees Cook:
 "The rest of the overflow changes for v4.18-rc1.

  This includes the explicit overflow fixes from Silvio, further
  struct_size() conversions from Matthew, and a bug fix from Dan.

  But the bulk of it is the treewide conversions to use either the
  2-factor argument allocators (e.g. kmalloc(a * b, ...) into
  kmalloc_array(a, b, ...) or the array_size() macros (e.g. vmalloc(a *
  b) into vmalloc(array_size(a, b)).

  Coccinelle was fighting me on several fronts, so I've done a bunch of
  manual whitespace updates in the patches as well.

  Summary:

   - Error path bug fix for overflow tests (Dan)

   - Additional struct_size() conversions (Matthew, Kees)

   - Explicitly reported overflow fixes (Silvio, Kees)

   - Add missing kvcalloc() function (Kees)

   - Treewide conversions of allocators to use either 2-factor argument
     variant when available, or array_size() and array3_size() as needed
     (Kees)"

* tag 'overflow-v4.18-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (26 commits)
  treewide: Use array_size in f2fs_kvzalloc()
  treewide: Use array_size() in f2fs_kzalloc()
  treewide: Use array_size() in f2fs_kmalloc()
  treewide: Use array_size() in sock_kmalloc()
  treewide: Use array_size() in kvzalloc_node()
  treewide: Use array_size() in vzalloc_node()
  treewide: Use array_size() in vzalloc()
  treewide: Use array_size() in vmalloc()
  treewide: devm_kzalloc() -> devm_kcalloc()
  treewide: devm_kmalloc() -> devm_kmalloc_array()
  treewide: kvzalloc() -> kvcalloc()
  treewide: kvmalloc() -> kvmalloc_array()
  treewide: kzalloc_node() -> kcalloc_node()
  treewide: kzalloc() -> kcalloc()
  treewide: kmalloc() -> kmalloc_array()
  mm: Introduce kvcalloc()
  video: uvesafb: Fix integer overflow in allocation
  UBIFS: Fix potential integer overflow in allocation
  leds: Use struct_size() in allocation
  Convert intel uncore to struct_size
  ...
2018-06-12 18:28:00 -07:00
Kees Cook a86854d0c5 treewide: devm_kzalloc() -> devm_kcalloc()
The devm_kzalloc() function has a 2-factor argument form, devm_kcalloc().
This patch replaces cases of:

        devm_kzalloc(handle, a * b, gfp)

with:
        devm_kcalloc(handle, a * b, gfp)

as well as handling cases of:

        devm_kzalloc(handle, a * b * c, gfp)

with:

        devm_kzalloc(handle, array3_size(a, b, c), gfp)

as it's slightly less ugly than:

        devm_kcalloc(handle, array_size(a, b), c, gfp)

This does, however, attempt to ignore constant size factors like:

        devm_kzalloc(handle, 4 * 1024, gfp)

though any constants defined via macros get caught up in the conversion.

Any factors with a sizeof() of "unsigned char", "char", and "u8" were
dropped, since they're redundant.

Some manual whitespace fixes were needed in this patch, as Coccinelle
really liked to write "=devm_kcalloc..." instead of "= devm_kcalloc...".

The Coccinelle script used for this was:

// Fix redundant parens around sizeof().
@@
expression HANDLE;
type TYPE;
expression THING, E;
@@

(
  devm_kzalloc(HANDLE,
-	(sizeof(TYPE)) * E
+	sizeof(TYPE) * E
  , ...)
|
  devm_kzalloc(HANDLE,
-	(sizeof(THING)) * E
+	sizeof(THING) * E
  , ...)
)

// Drop single-byte sizes and redundant parens.
@@
expression HANDLE;
expression COUNT;
typedef u8;
typedef __u8;
@@

(
  devm_kzalloc(HANDLE,
-	sizeof(u8) * (COUNT)
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(__u8) * (COUNT)
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(char) * (COUNT)
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(unsigned char) * (COUNT)
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(u8) * COUNT
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(__u8) * COUNT
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(char) * COUNT
+	COUNT
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(unsigned char) * COUNT
+	COUNT
  , ...)
)

// 2-factor product with sizeof(type/expression) and identifier or constant.
@@
expression HANDLE;
type TYPE;
expression THING;
identifier COUNT_ID;
constant COUNT_CONST;
@@

(
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * (COUNT_ID)
+	COUNT_ID, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * COUNT_ID
+	COUNT_ID, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * (COUNT_CONST)
+	COUNT_CONST, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * COUNT_CONST
+	COUNT_CONST, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * (COUNT_ID)
+	COUNT_ID, sizeof(THING)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * COUNT_ID
+	COUNT_ID, sizeof(THING)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * (COUNT_CONST)
+	COUNT_CONST, sizeof(THING)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * COUNT_CONST
+	COUNT_CONST, sizeof(THING)
  , ...)
)

// 2-factor product, only identifiers.
@@
expression HANDLE;
identifier SIZE, COUNT;
@@

- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	SIZE * COUNT
+	COUNT, SIZE
  , ...)

// 3-factor product with 1 sizeof(type) or sizeof(expression), with
// redundant parens removed.
@@
expression HANDLE;
expression THING;
identifier STRIDE, COUNT;
type TYPE;
@@

(
  devm_kzalloc(HANDLE,
-	sizeof(TYPE) * (COUNT) * (STRIDE)
+	array3_size(COUNT, STRIDE, sizeof(TYPE))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE) * (COUNT) * STRIDE
+	array3_size(COUNT, STRIDE, sizeof(TYPE))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE) * COUNT * (STRIDE)
+	array3_size(COUNT, STRIDE, sizeof(TYPE))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE) * COUNT * STRIDE
+	array3_size(COUNT, STRIDE, sizeof(TYPE))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING) * (COUNT) * (STRIDE)
+	array3_size(COUNT, STRIDE, sizeof(THING))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING) * (COUNT) * STRIDE
+	array3_size(COUNT, STRIDE, sizeof(THING))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING) * COUNT * (STRIDE)
+	array3_size(COUNT, STRIDE, sizeof(THING))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING) * COUNT * STRIDE
+	array3_size(COUNT, STRIDE, sizeof(THING))
  , ...)
)

// 3-factor product with 2 sizeof(variable), with redundant parens removed.
@@
expression HANDLE;
expression THING1, THING2;
identifier COUNT;
type TYPE1, TYPE2;
@@

(
  devm_kzalloc(HANDLE,
-	sizeof(TYPE1) * sizeof(TYPE2) * COUNT
+	array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+	array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING1) * sizeof(THING2) * COUNT
+	array3_size(COUNT, sizeof(THING1), sizeof(THING2))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(THING1) * sizeof(THING2) * (COUNT)
+	array3_size(COUNT, sizeof(THING1), sizeof(THING2))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE1) * sizeof(THING2) * COUNT
+	array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
  , ...)
|
  devm_kzalloc(HANDLE,
-	sizeof(TYPE1) * sizeof(THING2) * (COUNT)
+	array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
  , ...)
)

// 3-factor product, only identifiers, with redundant parens removed.
@@
expression HANDLE;
identifier STRIDE, SIZE, COUNT;
@@

(
  devm_kzalloc(HANDLE,
-	(COUNT) * STRIDE * SIZE
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	COUNT * (STRIDE) * SIZE
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	COUNT * STRIDE * (SIZE)
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	(COUNT) * (STRIDE) * SIZE
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	COUNT * (STRIDE) * (SIZE)
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	(COUNT) * STRIDE * (SIZE)
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	(COUNT) * (STRIDE) * (SIZE)
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
|
  devm_kzalloc(HANDLE,
-	COUNT * STRIDE * SIZE
+	array3_size(COUNT, STRIDE, SIZE)
  , ...)
)

// Any remaining multi-factor products, first at least 3-factor products,
// when they're not all constants...
@@
expression HANDLE;
expression E1, E2, E3;
constant C1, C2, C3;
@@

(
  devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
|
  devm_kzalloc(HANDLE,
-	(E1) * E2 * E3
+	array3_size(E1, E2, E3)
  , ...)
|
  devm_kzalloc(HANDLE,
-	(E1) * (E2) * E3
+	array3_size(E1, E2, E3)
  , ...)
|
  devm_kzalloc(HANDLE,
-	(E1) * (E2) * (E3)
+	array3_size(E1, E2, E3)
  , ...)
|
  devm_kzalloc(HANDLE,
-	E1 * E2 * E3
+	array3_size(E1, E2, E3)
  , ...)
)

// And then all remaining 2 factors products when they're not all constants,
// keeping sizeof() as the second factor argument.
@@
expression HANDLE;
expression THING, E1, E2;
type TYPE;
constant C1, C2, C3;
@@

(
  devm_kzalloc(HANDLE, sizeof(THING) * C2, ...)
|
  devm_kzalloc(HANDLE, sizeof(TYPE) * C2, ...)
|
  devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
|
  devm_kzalloc(HANDLE, C1 * C2, ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * (E2)
+	E2, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(TYPE) * E2
+	E2, sizeof(TYPE)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * (E2)
+	E2, sizeof(THING)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	sizeof(THING) * E2
+	E2, sizeof(THING)
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	(E1) * E2
+	E1, E2
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	(E1) * (E2)
+	E1, E2
  , ...)
|
- devm_kzalloc
+ devm_kcalloc
  (HANDLE,
-	E1 * E2
+	E1, E2
  , ...)
)

Signed-off-by: Kees Cook <keescook@chromium.org>
2018-06-12 16:19:22 -07:00
Olof Johansson 6874f9de65 memory: tegra: Changes for v4.18-rc1
This contains some cleanup of the memory controller driver as well as
 unification work to share more code between Tegra20 and later SoC
 generations. Also included are an implementation for the hot resets
 functionality by the memory controller which is required to properly
 reset busy hardware.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlr/O5kTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoYBuD/0StspIEG9GK8xOdf93unbziinCZ2DG
 e+xae7l5VfC2VsG5MgyYCr0ugOThdHHzqqsit3uHBXe9cUlNaL6YKyAiTIT7HFNM
 a0lnE+I++p0bL0GqMa/9l9jWnheR5iKnZYratyKJjtmEd9ljDcgo4Xn0lUonf3NS
 9gmI/2qiqkry+pLRafN65H6mbK6JyQ07xZAqd322S8aVkKx10L+GwzMjj6K342zu
 KPJd5B2mpCkaAc9maFOY5zcljaRBNU5mFGJEzhdzrq6KXcfDnZxyufVX80RhP9vO
 9RQJyFVsFiBgH59YPBc72X8Nu0Cc/14jTH1rE55R4239y96cJ/LuniYtHcWqumuL
 OQgsMfslO8RJ9/XBy/0UEznx1hnDJGfT7s2SRfgCsGnKegvcSw1IASI7xA+49DIR
 ZpVLEIB3Htq5DGymQrDG99z6tccMV5PJNEOjDhrh74DSXy9S/6Hl9UAoX3455/7Y
 zP2B5yUfaCnipwWXSowzmkXRKfCrHus1o//YfyarhmRVeDNeMkdbPcxGFZL7Y+MC
 PPorRu+WdKKzcY+8xmQig+UY2K3thpYSNG1D8vZLC6Dv3r06qGAk2vy9pV2bYG86
 4FG9Ory36XK/5fnfLTvTPnbguRNI1y/hbQ7XTTJcnxCvUqNkT7bAgspPfn0gkY+1
 Uh8Jm57WooiwHQ==
 =uVPT
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.18-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

memory: tegra: Changes for v4.18-rc1

This contains some cleanup of the memory controller driver as well as
unification work to share more code between Tegra20 and later SoC
generations. Also included are an implementation for the hot resets
functionality by the memory controller which is required to properly
reset busy hardware.

* tag 'tegra-for-4.18-memory-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  dt-bindings: memory: tegra: Remove Tegra114 SATA and AFI reset definitions
  memory: tegra: Remove Tegra114 SATA and AFI reset definitions
  memory: tegra: Register SMMU after MC driver became ready
  memory: tegra: Add Tegra210 memory controller hot resets
  memory: tegra: Add Tegra124 memory controller hot resets
  memory: tegra: Add Tegra114 memory controller hot resets
  memory: tegra: Add Tegra30 memory controller hot resets
  memory: tegra: Add Tegra20 memory controller hot resets
  memory: tegra: Introduce memory client hot reset
  memory: tegra: Squash tegra20-mc into common tegra-mc driver
  memory: tegra: Remove unused headers inclusions
  memory: tegra: Apply interrupts mask per SoC
  memory: tegra: Setup interrupts mask before requesting IRQ
  memory: tegra: Do not handle spurious interrupts
  dt-bindings: memory: tegra: Add hot resets definitions

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-25 05:14:34 -07:00
Dmitry Osipenko 5fd80cf74e memory: tegra: Remove Tegra114 SATA and AFI reset definitions
Tegra114 doesn't have SATA nor PCIe, but TRM seems erroneously document
them.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-18 22:45:01 +02:00
Dmitry Osipenko 45a81df06e memory: tegra: Register SMMU after MC driver became ready
Memory Controller driver invokes SMMU driver registration and MC's
registers mapping is shared with SMMU. This mapping goes away if MC
driver probing fails after SMMU registration.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-05-18 12:31:55 +02:00
Olof Johansson 4e7383e14e This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes
for 4.18, please pull the following:
 
 - Florian removes the synthetic struct device in the DPFE driver which
   was used to attach sysfs attributes and uses the platform_device we are
   probed from instead.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJa9cwTAAoJEIfQlpxEBwcE9lcQANFIweVf91Y6+HxD/Tm+j9Zr
 xBCsBWA/YYbSGXuXCzLzMY+tOEstAThxptWMDjmL801uhpBW/2w26DhoNIYz1gpg
 cfWy0c+984HUdmtyoyoM1tnWZ++W9bzugC9ELRT/QNtKUD3dbBNpFnSB1UmI/WPU
 ibxwDHjRvpslASdVq2+FFj/OVQx4VF+J5OPSKRJjaf8yN5xaaKkyKbpf31mNLsVE
 zCnzc78Awyv6+As0hSyQaFI98ipkWIkrQfhKzXAx01ymqj8b7TaIBgRevTt3Oaj2
 gAQa4cNlvV4FyrFoTmUO63GDBXbSldSDgGhRkXCA+dHEyzFLGGER/epAnrdsxfOT
 eBPliwcvss6P8jXNAGUxX18BHrHqLllsLyWpYs16/m8hc4foytdI4KX6XmAfQY7F
 ThKzu2N9uElpDaqN33hzl7wtkVqJLnFFmQDNR38pf/txgtPpHJ3i2DVMyF9Bo4e5
 QAI1PMoEOxGNspidtLbZdKStvn2mYXP6j08yNcMfo9HCznOOjFEUJFlcB4Ne+Kdc
 fxt+Ivh3l5rSM5kYqH2F0zuUJax4dYG72CdYlJ4P2JKagpPTYqsLQSC72BePpMTu
 YIupobgxY92Kq86bHqIHDC8YWDegB7Js6JNXIk/aR6ffrAs5wH360M9SLfDsC9yS
 0xOhhMTZCSPqKflH1NGg
 =33Be
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.18/drivers' of https://github.com/Broadcom/stblinux into next/drivers

This pull request contains Broadcom ARM/ARM64/MIPS SoCs drivers changes
for 4.18, please pull the following:

- Florian removes the synthetic struct device in the DPFE driver which
  was used to attach sysfs attributes and uses the platform_device we are
  probed from instead.

* tag 'arm-soc/for-4.18/drivers' of https://github.com/Broadcom/stblinux:
  memory: brcmstb: dpfe: Remove need for dpfe_dev

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-14 13:27:02 -07:00
Olof Johansson 7a0b8610d3 OMAP-GPMC: driver updates for v4.18
* get rid of a redundant NULL check in gpmc_probe_dt_children()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJa9RqJAAoJENJaa9O+djCTGgAP/iNTVtHRSzY3hQNpkwSriYql
 DEpg+itamBMwMgdOP823J4t8qS6BdfvzmLZckDM5sKrNzXDXl0P5489H30+9Qa2X
 ZLsRTLayfavNRrLEVxqlcmSehzh6/NcQW1OfjcC6B+nfqdkp7C77+epCOzQVp7Dx
 OJWfA2GYgM9PfrWJE+4czEZZuJKlCEM8mmU8ohCO+Q0XOFCexntPjlzW2I7juVg5
 0LPSSNbSQBCpiIb+g0wDjVCONe+XtgFWzrYrJyCxex2tH20cjGJX3VyntYRdTT8n
 JbmJi4xIBL7JyqmOxkJdYfthlw1XfHzPCfijcVx9Syudxg6fNZh9tai+DI9woiLX
 RLrlcqgU0DaWf0Anur28enygxuovPIxqVgVDiZd0UDj2sgynZOT1P2BsyXMBqBSa
 TxnyhWmkMmiXgEA3EYK84S2swDSrR8msiqjP9pYSvTU215Xa8X6XrJxLMME2uyKq
 Fr21RUC3uDVPgtAxttuf4sRmyOE5gGacFEA+JtNVpGtJa8xwxpEKGssVLSo1LJ4g
 E4QBt+2Vj6VJOB7yfOJtNsoiNlkTKnfawJERCOaVhWHp6toMmNFdu4a2Pw1tACgi
 98fLtCt5YyskjqRBHGrjBBa4P/E7xAyIUJah9EiUjE1jjKaWEGeigi/AFgt0fHju
 znh6bRKHpxr2+06r/8Us
 =B4jo
 -----END PGP SIGNATURE-----

Merge tag 'gpmc-omap-for-v4.18' of https://github.com/rogerq/linux into next/drivers

OMAP-GPMC: driver updates for v4.18
* get rid of a redundant NULL check in gpmc_probe_dt_children()

* tag 'gpmc-omap-for-v4.18' of https://github.com/rogerq/linux:
  memory: omap-gpmc: Avoid redundant NULL check

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-14 01:29:15 -07:00
Olof Johansson 71fe67e0e2 ARM: SOC driver update for 4.18
- AEMIF driver update to support board files and remove
    need of mach-davinci aemif code
  - Use percpu counters for qmss datapath stats
  - License update for TI SCI
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJa8hefAAoJEHJsHOdBp5c/Z7gP/RJcEM/bUrmIj+iAf+h/Azp3
 f5KiFrBmwIcRPC4VULRL06uuRgiExWcDY6j3gheKdJzqHOKprRysdRDEkHLKnmoy
 EGUS2HKo6Bbig/G/lMy9YhmrOEqm2tsh008TwSj6V8ZHSXgdyd3R4Kbe0YM5bbVp
 TMUMTuGN6EP1RMAMk4zh9jGxCSDgfzI6FZd2Yf8pxAhsIAa7ssbzGGT85p3lBP3T
 PTQ5h/aMP833gf7Ir7z5wEdqvdmfLVIxyu2bOzbP+rPUnaUGI9E2qaKPgiz8Tw5W
 sCICBv2ELauoSyLLUaJ8BOVU6pI07Cm0DisdUmhuHex3EOm+U1Leg3XX5pyJ/Sh7
 sGeLfFpMYWflinp6owq3J/z4sOQCq6pHugfS+6H3k6+uBX1S4RVkhcLda/Z0zz7p
 LAGpFkSSHP1vFtQLU7phSu7m+v4KqtnUEDZelCLroJIkncpwotYaAjisIOxOif0j
 WgNCHMNdTF/oxGCWBxqk5GH3bvZg53uUK9iy+WjgfKLOe+2RKEM+MbPpmVBWJxag
 ZV9vwRpgmi/5I/cUNt7sTJ8ine66I5N68ps4K6e8I8JNHqBqpcZFQwnZ+x+Ib0l9
 vv3unT92f/7q2XtIGkxkDNgqnsLF/b6sxqmy8jnNme/FIOWPX4iq2TGSnZ151FQ1
 nH3qGLDyn3UAEdBXMnkb
 =uqd7
 -----END PGP SIGNATURE-----

Merge tag 'soc_drivers_for_4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers

ARM: SOC driver update for 4.18

 - AEMIF driver update to support board files and remove
   need of mach-davinci aemif code
 - Use percpu counters for qmss datapath stats
 - License update for TI SCI

* tag 'soc_drivers_for_4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  firmware: ti_sci: Switch to SPDX Licensing
  soc: ti: knav_qmss: Use percpu instead atomic for stats counter
  memory: aemif: add support for board files
  memory: aemif: don't rely on kbuild for driver's name

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-05-14 01:27:47 -07:00
Florian Fainelli b1d0973e9a memory: brcmstb: dpfe: Remove need for dpfe_dev
We can hook sysfs objects to the parent platform device that we are
created from, no need to have a synthetic dpfe_dev just for that. This
incidentally removes the need for having an index, since we are
guaranteed to have an unique path in the sysfs hiearchy.

Acked-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-05-09 12:15:26 -07:00
Thierry Reding 273d760060 memory: tegra: Add Tegra210 memory controller hot resets
Define the table of memory controller hot resets for Tegra210.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko 1b19b0561d memory: tegra: Add Tegra124 memory controller hot resets
Define the table of memory controller hot resets for Tegra124.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko 3788c4ed4a memory: tegra: Add Tegra114 memory controller hot resets
Define the table of memory controller hot resets for Tegra114.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko ec4e1f0d66 memory: tegra: Add Tegra30 memory controller hot resets
Define the table of memory controller hot resets for Tegra30.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko cb557757e1 memory: tegra: Add Tegra20 memory controller hot resets
Define the table of memory controller hot resets for Tegra20 and add
specific to Tegra20 hot reset operations.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko 20e92462cd memory: tegra: Introduce memory client hot reset
In order to reset busy HW properly, memory controller needs to be
involved, otherwise it is possible to get corrupted memory or hang machine
if HW was reset during DMA. Introduce memory client 'hot reset' that will
be used for resetting of busy HW.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:12:21 +02:00
Dmitry Osipenko a8d502fd33 memory: tegra: Squash tegra20-mc into common tegra-mc driver
Tegra30+ has some minor differences in registers / bits layout compared
to Tegra20. Let's squash Tegra20 driver into the common tegra-mc driver
in a preparation for the upcoming MC hot reset controls implementation,
avoiding code duplication.

Note that this currently doesn't report the value of MC_GART_ERROR_REQ
because it is located within the GART register area and cannot be safely
accessed from the MC driver (this happens to work only by accident). The
proper solution is to integrate the GART driver with the MC driver, much
like is done for the Tegra SMMU, but that is an invasive change and will
be part of a separate patch series.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-30 10:10:00 +02:00
Dmitry Osipenko 85dce8918f memory: tegra: Remove unused headers inclusions
Tegra210 contains some unused leftover headers, remove them for
consistency.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-27 11:23:52 +02:00
Dmitry Osipenko 1c74d5c0de memory: tegra: Apply interrupts mask per SoC
Currently we are enabling handling of interrupts specific to Tegra124+
which happen to overlap with previous generations. Let's specify
interrupts mask per SoC generation for consistency and in a preparation
of squashing of Tegra20 driver into the common one that will enable
handling of GART faults which may be undesirable by newer generations.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-27 11:23:04 +02:00
Dmitry Osipenko db4a9c1935 memory: tegra: Setup interrupts mask before requesting IRQ
This avoids unwanted interrupt during MC driver probe.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-27 11:22:19 +02:00
Dmitry Osipenko bf3fbdfbec memory: tegra: Do not handle spurious interrupts
The ISR reads interrupts-enable mask, but doesn't utilize it. Apply the
mask to the interrupt status and don't handle interrupts that MC driver
haven't asked for. Kernel would disable spurious MC IRQ and report the
error. This would happen only in a case of a very severe bug.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-27 11:21:52 +02:00
Roger Quadros d507178f2e memory: omap-gpmc: Avoid redundant NULL check
child->name cannot be NULL as we're already checking for it
in gpmc_probe_dt_children()

Signed-off-by: Roger Quadros <rogerq@ti.com>
2018-04-24 10:30:52 +03:00
Bartosz Golaszewski 8af70cd2ca memory: aemif: add support for board files
Currently aemif is supported in two places separately. By the platform
driver in drivers/memory and by a hand crafted driver in mach-davinci.

We want to drop the latter but also keep the legacy mode. Add support
for board files to the aemif driver.

The new structure in platform data currently only contains the chip
select number, since currently existing users don't require anything
else, but it can be extended in the future.

While extending the platform data struct, add kernel docs describing
its members.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2018-04-20 10:14:27 -07:00
Bartosz Golaszewski f12cb8e274 memory: aemif: don't rely on kbuild for driver's name
We want to use aemif from board files. Use a static name in the
driver's code.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2018-04-20 10:14:27 -07:00
Dave Gerlach 5692fceebe ARM: OMAP2+: Fix build when using split object directories
The sleep33xx and sleep43xx files should not depend on a header file
generated in drivers/memory. Remove this dependency and instead allow
both drivers/memory and arch/arm/mach-omap2 to generate all macros
needed in headers local to their own paths.

This fixes an issue where the build fail will when using O= to set a
split object directory and arch/arm/mach-omap2 is built before
drivers/memory with the following error:

.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open
drivers/memory/emif-asm-offsets.s for writing: No such file or directory
compilation terminated.

Fixes: 41d9d44d72 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-04-18 10:07:13 -07:00
Arnd Bergmann 49774d86fd Samsung soc drivers changes for v4.17
1. Add SPDX license identifiers.
 2. Populate children syscon nodes in PMU driver to properly model HW in
    DeviceTree.
 -----BEGIN PGP SIGNATURE-----
 
 iQItBAABCAAXBQJansqTEBxrcnprQGtlcm5lbC5vcmcACgkQwTdm5oaLg9f6kQ//
 Wjkcsmj/mqaVaE6QphO0ZMXHXKZKQwY3jRkr8ofQWhAYNKuF9Jq/vLK8G9YDAAs7
 yxK+R7wXXACq2p/a5w7FWdZhQ1F7WZFxF2/cdXjhLH9zEUlkcv05cSQaj7M3pCjQ
 CU3ps6nvdtVIDwAgZT/4lSDQdIzZdkhhOdTK1iVR2PK8fLHNB88gPr+aSXLwkN18
 SLULwONNTSfgNH4BniXqypGdvqo/yWFa3CChw80CBKV0I6ubYfvGhIg0hlVCoA+7
 KibF8CCbHZiblExeDIQWTDNko4e6piNkLyHoQdTvTQ00f4fWxPmIIdzKn0q0JuPP
 BK9VKEO4lX8vXXEH6RYGNnwxYb0C+Jz56ffuyRnSv9XiU2khjWOPx60u4Osx5hMX
 UtMvpj/Ty8WKd7XWJcU/BdXH7j3gz9Q5lX/ZSRh2YEROzE+G2PMzMC7eNW3+NSGx
 3lIuScPHWkYVeg1TCtwwg4Dy/lSKfNTVFbqfzKRUtKvQygLsCTVmUdtRM8BG6mYf
 xybCwZOAUf6a9u5ZeItzINZT03R46vuGjKi6jZYwA3Loe/LDf5CLUeN/+yW2kIDY
 h8WpwSel97h2d6j4fqHVLKK45PFjh37DisRIWN6J4gdPhS7Jd0bIkmxQIoP+bccn
 DPWDJ65N7ubZuoUjuZcC4DuyZHOnJjXUqZbPJy2MzEQ=
 =N7M0
 -----END PGP SIGNATURE-----

Merge tag 'samsung-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/drivers

Pull "Samsung soc drivers changes for v4.17" from Krzysztof Kozłowski:

1. Add SPDX license identifiers.
2. Populate children syscon nodes in PMU driver to properly model HW in
   DeviceTree.

* tag 'samsung-drivers-4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  soc: samsung: pmu: Populate children syscon nodes
  soc: samsung: Add SPDX license identifiers to headers
  memory: samsung: Add SPDX license identifiers
2018-03-07 16:52:19 +01:00
Arnd Bergmann aa8f21a8a9 SOC driver changes for v4.17
- Remove deundant dev_err from probe in ti-emif-srma driver
  - Make use of seq_putc in emif reg show
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaneFCAAoJEHJsHOdBp5c/TKMP/37X0haESP5iB1oFnYz1w3ZK
 PeVr8ik7gKX/Y6o/mnid4CdFqWBTWFG+TJ5gU1cLdPdrLYl80HLzZuJ1XLLthzue
 Sr5w84PlrX1w8JIfAr6QceVho3hlLKh9hGqfDva044no4KWiC+E/jqVwM/FPuSvy
 ZZ7RNjwiTzQZvXDid3xLbavsO1FJMsV/pEjvHU/F3AYI3vWIKhcRpHvkYhJxfb4q
 RKjywuagSP1DhwFr8ZC51Jq/533FaVcqm3I2VNSxLk2x+MX+tzVWzqYut1m4hfM1
 TCap1GBZ9xzmXxpgvGS5G26KQvdFYhDjA/zf1sjPxqRGWT4V1ksKnZ6kVIdhMhVj
 2t5Xn4K4W6oLcA2AAXx9gr771OX9jY6GMJQoRCNTvc9jAXgOvug74A/2L8M1+/R1
 TAM39ojmvvU5UunahL/8QJ1HW4g11Iyno0eEc40waKMvjc/Oh1MkNOJbXUCRULUp
 rwvid5gqa3HazwlMu12VvhjSUlB2pGg0tU3c7Ciu6gE6hqO9fo8Bkq5bN+CTmlFZ
 H/jUdO/F7ml9Y2arrmKwev4IXaL4PkUne5nDM4Rk0zkXitXmnc3TMEpsZ/Gr/NMs
 gYXvHjKFd0RxpKnhEzp3zRh8RfQhccV6sSL+C7GFSJIpPKF+ID2y/g45mslUGUu7
 md0X4F3KS+UxwlDkHFm9
 =J0Q3
 -----END PGP SIGNATURE-----

Merge tag 'soc_drivers_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers

Pull "SOC driver changes for v4.17" from Santosh Shilimkar:

 - Remove redundant dev_err from probe in ti-emif-srma driver
 - Make use of seq_putc in emif reg show

* tag 'soc_drivers_for_4.17' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  memory: ti-emif-sram: remove redundant dev_err call in ti_emif_probe()
  memory-EMIF: Use seq_putc() in emif_regdump_show()
2018-03-07 16:49:12 +01:00
Wei Yongjun a817e5d82a memory: ti-emif-sram: remove redundant dev_err call in ti_emif_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2018-03-05 16:21:31 -08:00
SF Markus Elfring d363a88b31 memory-EMIF: Use seq_putc() in emif_regdump_show()
A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2018-03-05 16:21:26 -08:00
Markus Mayer fee5f1ef6c memory: brcmstb: dpfe: support new way of passing data from the DCPU
The DCPU can now send message data in two ways:
  - via the data RAM, as before (this is now message type 0)
  - via the message RAM (this is message type 1)

In order to support both methods, we check the message type of the
response (bits 31:28) and then treat the offset (bits 27:0)
accordingly.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-02-23 10:56:59 -08:00
Markus Mayer 9f2c4d95e0 memory: brcmstb: dpfe: fix type declaration of variable "ret"
In some functions, variable "ret" should be ssize_t, so we fix it.

Fixes: 2f330caff5 ("memory: brcmstb: Add driver for DPFE")
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-02-23 10:56:31 -08:00
Markus Mayer 69d7d95452 memory: brcmstb: dpfe: properly mask vendor error bits
We were printing the entire 32 bit register rather than just the lower
8 bits. Anything above bit 7 is reserved and may be any random value.

Fixes: 2f330caff5 ("memory: brcmstb: Add driver for DPFE")
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2018-02-23 10:56:07 -08:00
Krzysztof Kozlowski f12bb91624 memory: samsung: Add SPDX license identifiers
Replace GPL license statements with SPDX GPL-2.0 license identifiers.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2018-02-12 19:55:34 +01:00
Linus Torvalds fe53d1443a ARM: SoC driver updates for 4.16
A number of new drivers get added this time, along with many low-priority
 bugfixes. The most interesting changes by subsystem are:
 
 bus drivers:
   - Updates to the Broadcom bus interface driver to support newer SoC types
   - The TI OMAP sysc driver now supports updated DT bindings
 
 memory controllers:
   - A new driver for Tegra186 gets added
   - A new driver for the ti-emif sram, to allow relocating
     suspend/resume handlers there
 
 SoC specific:
   - A new driver for Qualcomm QMI, the interface to the modem on MSM SoCs
   - A new driver for power domains on the actions S700 SoC
   - A driver for the Xilinx Zynq VCU logicoreIP
 
 reset controllers:
   - A new driver for Amlogic Meson-AGX
   - various bug fixes
 
 tee subsystem:
   - A new user interface got added to enable asynchronous communication
     with the TEE supplicant.
   - A new method of using user space memory for communication with
     the TEE is added
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJac0fQAAoJEGCrR//JCVIntjEQALc6kflEGJc/FPundbx9V3F/
 b+3+EX/uMnBnKsgZprz9ACPhx5eBH9QWja3A1zmIarb5c+q7zbBZDwhzUb8J8Yg8
 xEb0im7Wx/GcKjUYZVKYBxtz9KjkXDzhrq8IAvPg6ShNcIy/8hq7ZO3iOkGsTDcy
 /PyioWKC5g0dhJgtp91X1kgog5tuTaWOg39uUOqyEzwVu1vYVa4w+eeCzjEd6I//
 68R/zDQ52+hWw6WZGoYOsNYzuriOflnJRnNpwuGhMhLNULBJfWnd4hkqGm4E+hFa
 5dzW6vVAdIqjemFqPzCBT2WB4UG871aZX8DJ9HgnfX+g970nlsm1JY8Ck9MJNJum
 aDkqZG41ArUYzDFWu8vJ2SKsue5lEZp6TEO2mLEVYrdOjOgedj0Zxqmq2DYeigxd
 +ccOVgKJ9SsYw9ft1LkQ5BHCgOh3C7y9Kcg7oBnaEI5OTVvtf5PwEkT2cwbvgxYl
 EVKLhlJ0Af+QXOW8E5JbNQETpYw52DMm6UKHiYn/JCGxB/8J0bgJzImDJI4Dtu2h
 zqJITKJeTepqbfA5pmNfKa+20RhmsktdRCw2NN/QynY7EEtGjHAUVnlpZT2mrDco
 0m62b7Erek/776vJN5ECzE5e6XCs2N0MDE6Anp121C5zEmig/SMBrUosMzP7Jnis
 IDVC/QWkb3u85wK20Vc1
 =yz0k
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver updates from Arnd Bergmann:
 "A number of new drivers get added this time, along with many
  low-priority bugfixes. The most interesting changes by subsystem are:

  bus drivers:
   - Updates to the Broadcom bus interface driver to support newer SoC
     types
   - The TI OMAP sysc driver now supports updated DT bindings

  memory controllers:
   - A new driver for Tegra186 gets added
   - A new driver for the ti-emif sram, to allow relocating
     suspend/resume handlers there

  SoC specific:
   - A new driver for Qualcomm QMI, the interface to the modem on MSM
     SoCs
   - A new driver for power domains on the actions S700 SoC
   - A driver for the Xilinx Zynq VCU logicoreIP

  reset controllers:
   - A new driver for Amlogic Meson-AGX
   - various bug fixes

  tee subsystem:
   - A new user interface got added to enable asynchronous communication
     with the TEE supplicant.
   - A new method of using user space memory for communication with the
     TEE is added"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (84 commits)
  of: platform: fix OF node refcount leak
  soc: fsl: guts: Add a NULL check for devm_kasprintf()
  bus: ti-sysc: Fix smartreflex sysc mask
  psci: add CPU_IDLE dependency
  soc: xilinx: Fix Kconfig alignment
  soc: xilinx: xlnx_vcu: Use bitwise & rather than logical && on clkoutdiv
  soc: xilinx: xlnx_vcu: Depends on HAS_IOMEM for xlnx_vcu
  soc: bcm: brcmstb: Be multi-platform compatible
  soc: brcmstb: biuctrl: exit without warning on non brcmstb platforms
  Revert "soc: brcmstb: Only register SoC device on STB platforms"
  bus: omap: add MODULE_LICENSE tags
  soc: brcmstb: Only register SoC device on STB platforms
  tee: shm: Potential NULL dereference calling tee_shm_register()
  soc: xilinx: xlnx_vcu: Add Xilinx ZYNQMP VCU logicoreIP init driver
  dt-bindings: soc: xilinx: Add DT bindings to xlnx_vcu driver
  soc: xilinx: Create folder structure for soc specific drivers
  of: platform: populate /firmware/ node from of_platform_default_populate_init()
  soc: samsung: Add SPDX license identifiers
  soc: qcom: smp2p: Use common error handling code in qcom_smp2p_probe()
  tee: shm: don't put_page on null shm->pages
  ...
2018-02-01 16:35:31 -08:00
Ladislav Michl a758f50f10 mtd: onenand: omap2: Configure driver from DT
Move away from platform data configuration and use pure DT approach.

Use generic probe function to deal with OneNAND node and remove now useless
gpmc_probe_onenand_child function. Import sync mode timing calculation
function from mach-omap2/gpmc-onenand.c

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
2018-01-12 16:41:15 +01:00
Olof Johansson 11077e9bf7 SOC: Keystone Soc driver updates for 4.16
- TI EMIF-SRAM driver
  - TI SCI print format fix
  - Navigator strndup lenth fix
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaRE65AAoJEHJsHOdBp5c/BOQP/1tvzmfQ2nllYiAJBN35e/PO
 0qQE2rrFhPgoSx1e5+6gvuGhdekBvuqE68ejbswSYttfseOOOGpdh7s15M+sieQv
 fkZd7XJQMfBamJv+C5zZYe/qBNtfa8WFvAdSndpDYIaxSMsE5lzqbQPQga0/G2YW
 uYLc/iEFqh5uKVLl/KmVHGZ9sZ8kXZF8gGyLuzkgpqjuaJZZKygEi5agzq6EJhQK
 09BEqQiesUWLxcYLjbao3EPmLmCWzsCyTbpEHBkRYtiRgsn7iccdLjQ8VSWfvb1n
 md3/FprPA7EuLdlYwuHQxsBNsm93WAPzLnubS1UKsenUEcbE36W4bJZgwbYHuaOT
 oHGeoAdTM1VWrjQ3Lty+Nn8hhCexrn72nVAxwnyt54CEdirxdSikrYOjq5jhf50z
 xP5eQp7J/GhX9b6xUHB25PnlxmRx2jIb1MAD5wHlND/Khw0kpph7mRuTUWtmnTOB
 w+qJfPpb+WkYep/8TkplyX86XB0eFghO9wPhOjc4lMmPdpsXlrdca78I+4YI6cv3
 dvIRZwI4knwKQo6bqJ1lizCOaGHFxZLPylSLDplVatZFP6f1FuEHQ9GcxE2ErygP
 A5j+JRIJVedwW1ZJWMe3TPRAOnGrsWzuVUcBCYGURUYhGWrU6VMNGTc4nVducor+
 Ukoyta0/V6rsBZCEBuP9
 =hKyd
 -----END PGP SIGNATURE-----

Merge tag 'keystone_driver_soc_for_4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/drivers

SOC: Keystone Soc driver updates for 4.16

 - TI EMIF-SRAM driver
 - TI SCI print format fix
 - Navigator strndup lenth fix

* tag 'keystone_driver_soc_for_4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  soc: ti: fix max dup length for kstrndup
  firmware: ti_sci: Use %zu for size_t print format
  memory: ti-emif-sram: remove unused variable
  memory: ti-emif-sram: introduce relocatable suspend/resume handlers
  Documentation: dt: Update ti,emif bindings

Signed-off-by: Olof Johansson <olof@lixom.net>
2018-01-04 23:12:57 -08:00
Arnd Bergmann 62bf8ae896 memory: tegra: Changes for v4.16-rc1
The Tegra memory controller driver will now instruct the SMMU driver to
 create groups, which will make it easier for device drivers to share an
 IOMMU domain between multiple devices.
 
 Initial Tegra186 support is also added in a separate driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlo6tlMTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zoR7MEACpoyPkV5fGz3z8rdsYaVZSA+upYEHw
 CC4v5XslNCucmk57XIYTbAZRu7W5MuzP3hq+DoYM5B5EHxgt1a2YHNtjjg3eLx1T
 U+8hjoOPOYu7FBVmUf4V6Buvmws90DxtfvqcfIScJJEAPgKsT/wfGXNstc88kDnO
 c+huQxk5QZsyGBgt1sS61zlymaLpDlSoE6kScXnjM1K6XtUdZ+8zmoMdZ7Ka8DUv
 kwBoYXgUpVminWpSrfuV7f3/8BtTSJ/b2rUPz7Ren0JJTFrhIi/ckeQ5YhTa46Dn
 oqR0f6MuLRGADT+E5DfoF7otvE2Fvq0Uq/YlypIf9gtiit5mhPM7ZXb3LOwDGiCp
 0mwljW9Uov7ZpFnb8b9SlVf1b+zDeeLxtARq4qzgky5OkWZp4hXZw+Os3ebXQYW3
 d/MUfwdqgNKOccGRsRkk9OEdUiFGpGtInb0xM9OWBCHvdrXhbK9llZ3wnrE+M3SY
 BELM+94YorqVPx5JTmiM7kTozVwpkvZQG6kU2J81Y55FI1ELQF7Mk0yzFs562tG5
 2abc07xkSUCdC6zsrgNOy+AtuRH8oHccUfZRACLUhzHNCrvfr3MrEcEv8l4VRJp4
 ZLfR8UjmtTI8YllBKdSdUtFB4nN5oyoIPCNsgwzXcTnKV5SzAyA/KuDW6IWoNU1L
 6ekAxpeiHVnLKA==
 =ncAl
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.16-memory' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

Pull "memory: tegra: Changes for v4.16-rc1" from Thierry Reding:

The Tegra memory controller driver will now instruct the SMMU driver to
create groups, which will make it easier for device drivers to share an
IOMMU domain between multiple devices.

Initial Tegra186 support is also added in a separate driver.

* tag 'tegra-for-4.16-memory' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  iommu/tegra-smmu: Fix return value check in tegra_smmu_group_get()
  iommu/tegra: Allow devices to be grouped
  memory: tegra: Create SMMU display groups
  memory: tegra: Add Tegra186 support
  dt-bindings: memory: Add Tegra186 support
  dt-bindings: misc: Add Tegra186 MISC registers bindings
2017-12-21 18:05:04 +01:00
Thierry Reding 2a8102dfe0 memory: tegra: Create SMMU display groups
Create SMMU display groups for Tegra30, Tegra114, Tegra124 and Tegra210.
This allows the display controllers on these devices to share the same
IOMMU domain using the standard IOMMU group mechanism.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-12-15 10:12:32 +01:00
Thierry Reding 02b0cc52c0 memory: tegra: Add Tegra186 support
The memory controller found on Tegra186 is different in some respects to
its predecessors. Most notably it no longer implements an SMMU, but does
assign ARM SMMU stream IDs for each memory client instead.

Provide a driver that programs these registers so that memory clients
can translate addresses via the ARM SMMU.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-12-13 12:58:21 +01:00
Arnd Bergmann 84a1695a6f memory: ti-emif-sram: remove unused variable
The newly introduced driver causes a harmless warning for a variable
that was evidently never used:

drivers/memory/ti-emif-pm.c: In function 'ti_emif_remove':
drivers/memory/ti-emif-pm.c:303:17: error: unused variable 'dev' [-Werror=unused-variable]

Fixes: 8428e5ad75 ("memory: ti-emif-sram: introduce relocatable suspend/resume handlers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2017-12-06 09:50:20 -08:00
Dave Gerlach 8428e5ad75 memory: ti-emif-sram: introduce relocatable suspend/resume handlers
Certain SoCs like Texas Instruments AM335x and AM437x require parts
of the EMIF PM code to run late in the suspend sequence from SRAM,
such as saving and restoring the EMIF context and placing the memory
into self-refresh.

One requirement for these SoCs to suspend and enter its lowest power
mode, called DeepSleep0, is that the PER power domain must be shut off.
Because the EMIF (DDR Controller) resides within this power domain, it
will lose context during a suspend operation, so we must save it so we
can restore once we resume. However, we cannot execute this code from
external memory, as it is not available at this point, so the code must
be executed late in the suspend path from SRAM.

This patch introduces a ti-emif-sram driver that includes several
functions written in ARM ASM that are relocatable so the PM SRAM
code can use them. It also allocates a region of writable SRAM to
be used by the code running in the executable region of SRAM to save
and restore the EMIF context. It can export a table containing the
absolute addresses of the available PM functions so that other SRAM
code can branch to them. This code is required for suspend/resume on
AM335x and AM437x to work.

In addition to this, to be able to share data structures between C and
the ti-emif-sram-pm assembly code, we can automatically generate all of
the C struct member offsets and sizes as macros by processing
emif-asm-offsets.c into assembly code and then extracting the relevant
data as is done for the generated platform asm-offsets.h files.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
2017-12-02 19:27:17 -08:00
Ladislav Michl c18a7ac339 memory: omap-gpmc: Make 'bank-width' property optional
Error out only if both 'bank-width' and 'gpmc,device-width' are missing.
As 'bank-width' is mostly used for NOR devices and all other devices must
use 'gpmc,device-width' update the error message accordingly.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
2017-12-01 15:37:49 +02:00
Linus Torvalds cf9b0772f2 ARM: SoC driver updates for v4.15
This branch contains platform-related driver updates for ARM and ARM64,
 these are the areas that bring the changes:
 
 New drivers:
  - Driver support for Renesas R-Car V3M (R8A77970)
  - Power management support for Amlogic GX
  - A new driver for the Tegra BPMP thermal sensor
  - A new bus driver for Technologic Systems NBUS
 
 Changes for subsystems that prefer to merge through arm-soc:
  - The usual updates for reset controller drivers from Philipp Zabel,
    with five added drivers for SoCs in the arc, meson, socfpa, uniphier
    and mediatek families.
  - Updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla,
    Heiner Kallweit and Lorenzo Pieralisi.
 
 Changes specific to some ARM-based SoC
  - The Freescale/NXP DPAA QBMan drivers from PowerPC can now work
    on ARM as well.
  - Several changes for power management on Broadcom SoCs
  - Various improvements on Qualcomm, Broadcom, Amlogic, Atmel, Mediatek
  - Minor Cleanups for Samsung, TI OMAP SoCs
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJaDggbAAoJEGCrR//JCVInIeQQAN1MDyO1UaWiFYnbkVOgzFcj
 dqbFOc41DBE/90JoBWE8kR/rjyF83OqztiaYpx9viu2qMMBZVcOwxhCUthWK59c/
 IujYdw4zGevLscF+jdrLbXgk97nfaWebsHyTAF307WAdZVJxiVGGzQEcgm71d6Zp
 CXjLiUii4winHUMK9FLRY2st0HKAevXhuvZJVV432+sTg3p7fGVilYeGOL5G62WO
 zQfCisqzC5q677kGGyUlPRGlHWMPkllsTTnfXcmV/FUiGyVa3lUWY5sEu+wCl96O
 U1ffPENeNj/A/4fa1dbErtbiNnC2z/+jf+Dg7Cn8w/dPk4Suf0ppjP8RqIGyxmDl
 Wm/UxbwDClxaeF4GSaYh2yKgGRJMH5N87bJnZRINE5ccGiol8Ww/34bFG0xNnfyh
 jSAFAc318AFG62WD4lvqWc7LSpzOYxp/MNqIFXKN692St/MJLkx8/q0nTwY1qPY0
 3SELz9II3hz+3MfDRqtRi7hZpkgHgQ+UG7S5+Xhmqrl309GOEldCjPVJhhXxWoxK
 ZPtZOuyYvGhIC+YAnHaN6lUjADIdNJZHwbuXFImx85oKHVofoxHbcni5vk8Uu7z1
 sQNYOtdDGaPG/2u9RJdJlPg/jIgLKxxt/Xm9TYVawpZ5hFANhBTtIq5ExCRAil68
 j9sMOrpZ1DzCQyR7zN2v
 =qDhq
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver updates from Arnd Bergmann:
 "This branch contains platform-related driver updates for ARM and
  ARM64, these are the areas that bring the changes:

  New drivers:

   - driver support for Renesas R-Car V3M (R8A77970)

   - power management support for Amlogic GX

   - a new driver for the Tegra BPMP thermal sensor

   - a new bus driver for Technologic Systems NBUS

  Changes for subsystems that prefer to merge through arm-soc:

   - the usual updates for reset controller drivers from Philipp Zabel,
     with five added drivers for SoCs in the arc, meson, socfpa,
     uniphier and mediatek families

   - updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla,
     Heiner Kallweit and Lorenzo Pieralisi

  Changes specific to some ARM-based SoC

   - the Freescale/NXP DPAA QBMan drivers from PowerPC can now work on
     ARM as well

   - several changes for power management on Broadcom SoCs

   - various improvements on Qualcomm, Broadcom, Amlogic, Atmel,
     Mediatek

   - minor Cleanups for Samsung, TI OMAP SoCs"

[ NOTE! This doesn't work without the previous ARM SoC device-tree pull,
  because the R8A77970 driver is missing a header file that came from
  that pull.

  The fact that this got merged afterwards only fixes it at this point,
  and bisection of that driver will fail if/when you walk into the
  history of that driver.           - Linus ]

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (96 commits)
  soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader
  bus: add driver for the Technologic Systems NBUS
  memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
  soc: qcom: remove unused label
  soc: amlogic: gx pm domain: add PM and OF dependencies
  drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
  dt-bindings: power: add amlogic meson power domain bindings
  soc: amlogic: add Meson GX VPU Domains driver
  soc: qcom: Remote filesystem memory driver
  dt-binding: soc: qcom: Add binding for rmtfs memory
  of: reserved_mem: Accessor for acquiring reserved_mem
  of/platform: Generalize /reserved-memory handling
  soc: mediatek: pwrap: fix fatal compiler error
  soc: mediatek: pwrap: fix compiler errors
  arm64: mediatek: cleanup message for platform selection
  soc: Allow test-building of MediaTek drivers
  soc: mediatek: place Kconfig for all SoC drivers under menu
  soc: mediatek: pwrap: add support for MT7622 SoC
  soc: mediatek: pwrap: add common way for setup CS timing extenstion
  soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap
  ..
2017-11-16 16:05:01 -08:00
Arnd Bergmann ad54c3e75d OMAP-GPMC: driver updates for v4.15, part 2
* get rid of unused function gpmc_update_nand_reg().
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZ/GqwAAoJENJaa9O+djCTnMwP/3pJrB8jKAd61grL2P60PWYo
 zWhKacCgq2NyU6QeaNpLYf4msaF2krKnvhfe4zEWpwAQugLwS6XkF0wCDyfRxKE/
 8A2rOyeCWSumD6ryFshBe1bg3xCxe0y7bOZqq6bo75Vgz5RwICZIsyre59b2RzMI
 imCck115FxmGrE0GHPlPmosjzTcEeMqiNkb0xzf+nsFiDaEIa6Y6UEd7A+x133w8
 t9uvVlwIz3i1ghiDRMOWKE+M5WM+/HVVlSlT2DxS86wpIqqExbxcsBGqKrSidooC
 8LNEDRwMIUR/v19fzFzaQ1I66pmhXR+zWEnU1H3XbGxQfT9uvQPfEYNvqi10TDgl
 YlPyfpKBTSfJSMhZZ3/XbJ9u2Sr3dAsG77tMIDW3U1g9MaGeJXjNI8c89xy41jpy
 C/31tawGlYKAn68lKSR53+aWbFAQNpE6ffPwSMdfvuY5qwAZnecE1pQc+vUxiFSQ
 J+Rauj431jVu1D8bLYvq/nb7sqQaeW81qvqtk3qDAU9fatdiyDKLQ48JzxyCnZz5
 4IX9q7hZH83dJNptPam4Ol2SMIypC0ppFmWiGamNdddDr40E3mjGeIut+iC4UHRb
 Oj5mzLL6eMiITlpSjve0FxhE0dhxyfHIiQ7Fz9iTfSUkJdyfyh1SwTPzojLuNMAs
 3RcB124dpea3gZ1QF7sd
 =qq+j
 -----END PGP SIGNATURE-----

Merge tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux into next/drivers

Pull "OMAP-GPMC: driver updates for v4.15, part 2" from Roger Quadros:

* get rid of unused function gpmc_update_nand_reg().

* tag 'gpmc-omap-for-v4.15-pt2' of https://github.com/rogerq/linux:
  memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
2017-11-07 16:31:01 +01:00
Ladislav Michl a622c64166 memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
Deprecated gpmc_update_nand_reg() is no longer used, remove.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
2017-11-03 15:06:11 +02:00
Arnd Bergmann 3330becb47 This pull request contains Broadcom ARM/ARM64/MIPS SoCs changes for 4.15
(second part), please pull the following:
 
 - Markus updates the Broadcom STB DPFE driver to avoid loading the firmware when
   unnecessary to accomodate for specific platform restrictions
 
 - Florian adds support for the Broadcom Hurricane 2 SoC iProc PLL clock needed
   to get the proper CPU clock frequency
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJZ6o4yAAoJEIfQlpxEBwcEs3MQAJ9bBFsnLu3hNFM7WNuXgVDS
 z4/BYsVUhPzwz2lLB/OMsKU8xkGd/d7DcPvziMpvgWzTXoVEboXWtN5S2ReiVYja
 Pyl0UMTmT6Jo1z+8WQkWJROUYmaLQzVHr/J3q15FItNS6gvsxntiDYUVLHtIe+g2
 3IOTDSVSptPoYYxWi3PiBsXfjb+ja/ob01K8cQh+3AcjopRTE9F7l9EXhUJWOJ9Y
 21eCyCiPVdjFKfV2etby4XcTqV1LrvJEhmpaRBsn+jitvWYdaMb4+jwUv58nf7SF
 JaSBAjSRZ29FoVpUryHk9/yBt5NBv2WyAyizMG95JXeOnd2QDTi5RltxiG20kvBf
 Q9pm8w0FvAM+RmKE/eFHXil7jJOczuSoen+vOXbvvxaBP6vSVGkrGt/aEMvUCr2a
 Z+/fogKTIehQZhfrrkw1t5vLcmTGPYidggFPxED22juPpy9weVKqMiU02n6F7LpC
 NsyCtmooXVB+KBcMX71G7ywO9y5bz3Tqmn6nYrjf6Lyz7WoDPn1FlDxlvNfUi4uy
 6rhmvwG1b4BT5ksZzu99I9uNhlVNQ1QxHetkpeHgQ/GWYGzCSYqewIdrooEhItyZ
 zibeLlUPJVIu338MYPjoUa2VSGwD2uy1b//wQW+qnA+fSDWw/v7vLW3/svo7D6Ov
 C8dNRSRXXyeZmpfejFPW
 =ecY1
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-4.15/drivers-part2' of http://github.com/Broadcom/stblinux into next/drivers

Pull "Broadcom drivers changes for 4.15 (part 2)" from Florian Fainelli:

This pull request contains Broadcom ARM/ARM64/MIPS SoCs changes for 4.15
(second part), please pull the following:

- Markus updates the Broadcom STB DPFE driver to avoid loading the firmware when
  unnecessary to accomodate for specific platform restrictions

- Florian adds support for the Broadcom Hurricane 2 SoC iProc PLL clock needed
  to get the proper CPU clock frequency

* tag 'arm-soc/for-4.15/drivers-part2' of http://github.com/Broadcom/stblinux:
  clk: bcm: Add Broadcom Hurricane 2 clock support
  memory: brcmstb: dpfe: skip downloading firmware when possible
  memory: brcmstb: dpfe: introduce is_dcpu_enabled()
2017-11-02 16:21:03 +01:00
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Arnd Bergmann d5bd8507cf OMAP-GPMC: driver updates for v4.15
* get rid of unused field in platform data structure.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZ5e7QAAoJENJaa9O+djCTzQoQALVUigXfVEgCsQQCItSyKHIg
 st8MZgrwiyz+IjXpg5zhVSL8gYEB2WAEObXxdIGyJPuHURjJpHcgxDpU/TNKU9WK
 Nf3enS+Hgk7SS+vuOHzyVAPsm7X/mc5cUgXdZXeaHc1+Y/pL9l5A6JJcru+oak8v
 ikqHBxd4eBEq7DKFkpD/SP/j1o3P6fEzex6ZkX8WW/zboUNtzUIuoSd6kOwaJChc
 SMuXbiipFOL1eZnJoaT5id0yCc8l6TYSSVhc42QoqD8F57mpuIZeVzymJtpe0UQi
 boWNCTLKRoGADTATzXOJ/pDO6Q0d72XakL1iPeqG1/IhaoQVo5PDhpNfJncNu1H+
 IbP0vq/BR3IlBjmc9i80DNqbC1toUDrlm5zHCK5YrgnDe2g8fqMT+KkIe99kPogI
 sav61x1mELwUFPfyJ6nzLWmBoTxc5POIgCkumT16+0Cho4xE760Sa9GjjvTqZGr8
 7G1hSXYdVqsFt2/JG5BMTGWmF5rsqBzJbVdCwKlI3F9IKbw+cebDe37lwOBqeVu8
 Cx8Sl+rsjkPFnBHclaKVWItC+MYoM+nhQolhcuQA1dGpdDzqdJ77UfsGEFBmUQh0
 PDV32yLEkxL+YbogJ2DT6eiTA+SLn8XQIY9w6FIqjzQa7IyjHR7n7tEBaEJkHbBh
 kU+lCW+AamzV5KWlLehM
 =ii3q
 -----END PGP SIGNATURE-----

Merge tag 'gpmc-omap-for-v4.15' of https://github.com/rogerq/linux into next/drivers

Pull "OMAP-GPMC: driver updates for v4.15" from Roger Quadros:
* get rid of unused field in platform data structure.

* tag 'gpmc-omap-for-v4.15' of https://github.com/rogerq/linux:
  memory: omap-gpmc: Drop gpmc_status
2017-10-20 22:36:23 +02:00
Ladislav Michl 0d96a4f6a0 memory: omap-gpmc: Drop gpmc_status
This field is no longer used, drop it.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Roger Quadros <rogerq@ti.com>
2017-10-17 14:46:37 +03:00
Markus Mayer a56d339e8c memory: brcmstb: dpfe: skip downloading firmware when possible
We want to skip downloading the DPFE firmware from Linux if it was
already downloaded by the boot loader.

The driver now checks if the DCPU is already running and, if so,
whether it can process commands. If the DCPU processes commands
successfully, the driver skips the firmware download step.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-10-06 16:19:14 -07:00
Markus Mayer d56e746f4b memory: brcmstb: dpfe: introduce is_dcpu_enabled()
In order to check whether or not the DCPU is running, we introduce
a function called is_dcpu_enabled().

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-10-06 16:18:46 -07:00