aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-mc
AgeCommit message (Collapse)Author
2018-02-25staging: fsl-mc: fix build testing on x86Arnd Bergmann
commit 02b7b2844c2ffd3b614ec2b9293e8c7f041d60da upstream. Selecting GENERIC_MSI_IRQ_DOMAIN on x86 causes a compile-time error in some configurations: drivers/base/platform-msi.c:37:19: error: field 'arg' has incomplete type On the other architectures, we are fine, but here we should have an additional dependency on X86_LOCAL_APIC so we can get the PCI_MSI_IRQ_DOMAIN symbol. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: fsl-mc/dpio: Fix incorrect comparisonIoana Radulescu
For some dpio functions, a cpu id parameter value of -1 is valid and means "any". But when trying to validate this param value against an upper limit, in this case num_possible_cpus(), we risk obtaining the wrong result due to an implicit cast. Avoid an incorrect check result by explicitly comparing the cpu id with the "any" value before verifying the upper bound. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-29Staging: fsl-mc: remove unnecessary parenthesisKeerthi Reddy
Remove unnecessary parenthesis Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-28Merge 4.13-rc7 into staging-nextGreg Kroah-Hartman
We want the staging and iio fixes in here to handle the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-23staging: fsl-mc: be consistent when checking strcmp() returnsLaurentiu Tudor
Throughout the driver we use == 0 / != 0 to check strcmp() returns except this place, so fix it. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-16Revert "staging: fsl-mc: be consistent when checking strcmp() return"Colin Ian King
The previous fix removed the equal to zero comparisons by the strcmps and now the function always returns true. Revert this change to restore the original correctly functioning code. Detected by CoverityScan, CID#1452267 ("Constant expression result") This reverts commit b93ad9a067e1515af42da7d56bc61f1a25075f94. Fixes: b93ad9a067e1 ("staging: fsl-mc: be consistent when checking strcmp() return") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14staging: fsl-mc: add explicit dependencies for compile-tested archesLaurentiu Tudor
The driver makes use of GENERIC_MSI_IRQ_DOMAIN which requires arch support so, on architectures that don't have it, the kernel will fail to build. Add explicit dependency on architectures that were compile-tested, thus fixing compilation for the ones that don't implement GENERIC_MSI_IRQ_DOMAIN. Fixes: 03274850279c ("staging: fsl-mc: allow the driver compile multi-arch") Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-14staging: fsl-mc: fix resource_size.cocci warningsCihangir Akturk
Use resource_size() function on resource objects instead of explicit computation. This patch fixes the following coccinelle warning: drivers/staging/fsl-mc/bus/dprc-driver.c:620:35-38: ERROR: Missing resource_size with mc_dev -> regions Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: include irqreturn.h as neededArnd Bergmann
The recent reshuffling of header files left one type definition missing in some configurations: In file included from drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h:39:0, from drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c:34: drivers/staging/fsl-dpaa2/ethernet/../../fsl-mc/include/dpaa2-io.h:86:1: error: unknown type name 'irqreturn_t'; did you mean 'irq_count'? irqreturn_t dpaa2_io_irq(struct dpaa2_io *obj); I have not bisected this to the exact patch that introduced the problem, but the solution is obvious, we just need to include the header that contains the type. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc/dpio: Skip endianness conversion in portal configBogdan Purcareata
Writing to the register using writel does the CPU to LE conversion down the line, so it's not required here. Doing it breaks portal configuration on big endian kernels. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: fix resource_size.cocci warningsJulia Lawall
Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Fixes: a037b7ec2eb7 ("staging: fsl-mc: allow the driver compile multi-arch") CC: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: allow the driver compile multi-archLaurentiu Tudor
Add an alternate dependency on COMPILE_TEST, thus leaving this driver compile on other architectures. Also, other drivers depending on the bus are updated to depend on ARCH_LAYERSCAPE until they'll also be made multi-arch. This was compiled tested on: - booke powerpc (corenet{32,64}_smp_defconfig) - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) - arm64 (defconfig) Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: make the driver compile on 32-bitLaurentiu Tudor
Since there's no real constrain in MC to do only atomic 64-bit we can enable this driver on 32-bit platforms too. Include linux/io-64-nonatomic-hi-lo.h to make quad device io apis used in the driver available on 32-bit platforms. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: don't use raw device io functionsLaurentiu Tudor
As raw device io functions are not portable and don't handle byte-order (triggering suspicion that endianness isn't handled well) switch to using the standard api. Since MC expects LE byte-order and the upper layers already take care of that, we need to trick the device io api by doing a LE -> CPU conversion just before calling it. This way, the CPU -> LE conversion done in the api puts the data back in the right byte-order. Obviously, for reads the extra step is mirrored: there's a CPU -> LE conversion following the API call. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: fix formating of phys_addr_t on 32 bitsLaurentiu Tudor
Use correct format specifier for phys_addr_t variables (%pa) instead of %llx. This fixes these warnings on 32 bit targets: "format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'phys_addr_t' [-Wformat=]" Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: fix compilation with non-generic msi domain opsLaurentiu Tudor
The bus driver relies on generic msi domain ops. Fix compilation for architectures that don't provide it (e.g. x86_64). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: drop useless gic v3 related #includeLaurentiu Tudor
Nothing from linux/irqchip/arm-gic-v3.h is used, so the #include can be safely dropped. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: use generic memory barriersLaurentiu Tudor
No need to use arch-specific memory barriers; switch to using generic ones. The rmb()s were useless so drop them. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-30staging: fsl-mc: Convert to using %pOF instead of full_nameRob Herring
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Stuart Yoder <stuyoder@gmail.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-03Merge tag 'staging-4.13-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO updates from Greg KH: "Here's the large set of staging and iio driver patches for 4.13-rc1. After over 500 patches, we removed about 200 more lines of code than we added, not great, but we added some new IIO drivers for unsupported hardware, so it's an overall win. Also here are lots of small fixes, and some tty core api additions (with the tty maintainer's ack) for the speakup drivers, those are finally getting some much needed cleanups and are looking much better now than before. Full details in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (529 commits) staging: lustre: replace kmalloc with kmalloc_array Staging: ion: fix code style warning from NULL comparisons staging: fsl-mc: make dprc.h header private staging: fsl-mc: move mc-cmd.h contents in the public header staging: fsl-mc: move mc-sys.h contents in the public header staging: fsl-mc: fix a few implicit includes staging: fsl-mc: remove dpmng API files staging: fsl-mc: move rest of mc-bus.h to private header staging: fsl-mc: move couple of definitions to public header staging: fsl-mc: move irq domain creation prototype to public header staging: fsl-mc: turn several exported functions static staging: fsl-mc: delete prototype of unimplemented function staging: fsl-mc: delete duplicated function prototypes staging: fsl-mc: decouple the mc-bus public headers from dprc.h staging: fsl-mc: drop useless #includes staging: fsl-mc: be consistent when checking strcmp() return staging: fsl-mc: move comparison before strcmp() call staging: speakup: make function ser_to_dev static staging: ks7010: fix spelling mistake: "errror" -> "error" staging: rtl8192e: fix spelling mistake: "respose" -> "response" ...
2017-06-29staging: fsl-mc: make dprc.h header privateLaurentiu Tudor
dprc.h is only used in the mc bus driver so move it together with the sources thus making it private. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move mc-cmd.h contents in the public headerLaurentiu Tudor
mc-cmd.h contains some low level functions used to encode and decode commands to the MC. They are used by the drivers so move them to the public headers and get rid of the mc-cmd.h header. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move mc-sys.h contents in the public headerLaurentiu Tudor
mc-sys.h contains the API to send commands to the MC and is used by drivers. Move it to the public headers and get rid of the mc-sys.h header. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: fix a few implicit includesLaurentiu Tudor
Few files using byte order macros but did not explicitly included the required kernel header, so add it. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: remove dpmng API filesLaurentiu Tudor
dpmng.h & dpmng.c files expose an API of just one function which is only used by the bus driver. Move that single API in the bus source as static and remove the two files. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move rest of mc-bus.h to private headerLaurentiu Tudor
All the mc-bus.h contents is only used privately in the bus driver so move everything to the private header and get rid of the mc-bus.h header file. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move couple of definitions to public headerLaurentiu Tudor
Define dev_is_fsl_mc() and the bus type definition (fsl_mc_bus_type) are used externally so move them to the public header. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move irq domain creation prototype to public headerLaurentiu Tudor
fsl_mc_msi_create_irq_domain() will is used from the irqchip glue code so it needs to be in the public headers. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: turn several exported functions staticLaurentiu Tudor
They are never used outside the source they are implemented in and very likely never will, so it's safe to make them static. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: delete prototype of unimplemented functionLaurentiu Tudor
The function fsl_mc_bus_exists() has a prototype but is never implemented so delete it from the header file. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: delete duplicated function prototypesLaurentiu Tudor
These functions already have their prototypes in fsl-mc-private.h header file so delete them from mc-bus.h. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: decouple the mc-bus public headers from dprc.hLaurentiu Tudor
In its current form, the public headers of the mc-bus depend only on a structure "dprc_obj_desc" defined in dprc.h. Move it to the bus public header together with its associated defines and, in order to keep the naming prefixes consistent rename it to "fsl_mc_obj_desc". This will allow making dprc.h private in future patches. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: drop useless #includesLaurentiu Tudor
These couple of header files are not needed in the source so remove them. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: be consistent when checking strcmp() returnLaurentiu Tudor
Stick to one way of checking the return code of strcmp(): use '!'. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29staging: fsl-mc: move comparison before strcmp() callLaurentiu Tudor
Move comparison before the strcmp() in this if statement, and slightly increase efficiency by not making the strcmp() each time the if gets evaluated but only when the comparison is true. This was suggested in a review comment. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: drop useless #includes"Greg Kroah-Hartman
This reverts commit bb4a64b79f3b9973316e775f6c2910a98b6a562a. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: decouple the mc-bus public headers from dprc.h"Greg Kroah-Hartman
This reverts commit c6ce019edb0c9c09b8150011d4f66181952631e9. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: delete duplicated function prototypes"Greg Kroah-Hartman
This reverts commit 48d3cfb3189a88e1670f609f8bd7d55839d531cf. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: delete prototype of unimplemented function"Greg Kroah-Hartman
This reverts commit be6faff74cda2ac1838c0f85dca3c3ce4975fa73. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: turn several exported functions static"Greg Kroah-Hartman
This reverts commit 10a8593a76c7719e110e334f84a6ef2068dd4c0f. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: move irq domain creation prototype to public header"Greg Kroah-Hartman
This reverts commit b32cdde14edec1c75a2190a39e810bf41fa29a7a. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: move couple of definitions to public header"Greg Kroah-Hartman
This reverts commit 7eba570ece326ea0da2da72f1d4142100c145827. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: move rest of mc-bus.h to private header"Greg Kroah-Hartman
This reverts commit af4376710cc5188c42eb473676f6c9d2a16692c4. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: remove dpmng API files"Greg Kroah-Hartman
This reverts commit b065307fe0ad7859f01ce8560e6bdc590324561a. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: fix a few implicit includes"Greg Kroah-Hartman
This reverts commit 5776aad3fe1bb87f3e4816cde8735647597da336. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: move mc-sys.h contents in the public header"Greg Kroah-Hartman
This reverts commit 7d6e221d73904aedcbd46ce2db6a545be55d2296. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: move mc-cmd.h contents in the public header"Greg Kroah-Hartman
This reverts commit 9b1aa45539fb8389deb79e4a939bfc05ee45aeb5. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-26Revert "staging: fsl-mc: make dprc.h header private"Greg Kroah-Hartman
This reverts commit 1877e4ba2d0890244284eea101681b6f990aa2be. The whole series is broken, so back it all out. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23staging: fsl-mc: make dprc.h header privateLaurentiu Tudor
dprc.h is only used in the mc bus driver so move it together with the sources thus making it private. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23staging: fsl-mc: move mc-cmd.h contents in the public headerLaurentiu Tudor
mc-cmd.h contains some low level functions used to encode and decode commands to the MC. They are used by the drivers so move them to the public headers and get rid of the mc-cmd.h header. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>