summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-mc/bus
Commit message (Collapse)AuthorAgeFilesLines
* bus: fsl-mc: change mc_command in fsl_mc_commandIoana Ciornei2018-03-231-6/+6
| | | | | | | | The "struct mc_command" is a very generic name for a global kernel structure. Change its name in "struct fsl_mc_command". Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Move DPCON out of stagingBogdan Purcareata2018-03-143-276/+0
| | | | | | | | | | | | | | | | | | | Move the source files out of staging into their final locations: - dpcon.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpcon-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpcon.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPCON stands for Data Path Concentrator - an interface between DPIO (Data Path IO) and its users (e.g. dpaa2-eth). You can read more about DPIO in Documentation/networking/dpaa2/overview.rst Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Move DPBP out of stagingBogdan Purcareata2018-03-143-232/+1
| | | | | | | | | | | | | | | | | | Move the source files out of staging into their final locations: - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next to the other internally used APIs - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public API Update references in the dpaa2-eth staging driver. DPBP stands for Data Path Buffer Pool - you can read more about the object in Documentation/networking/dpaa2/overview.rst Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: Fix incorrect maskingIoana Radulescu2018-03-081-1/+1
| | | | | | | | | In qbman_swp_alt_fq_state(), we need to mask the fqid value before converting it to little endian, otherwise we write a wrong value to hardware when running in big endian mode. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: Use __leXX types where neededIoana Radulescu2018-03-082-20/+20
| | | | | | | | Structures that are mapped to hardware registers should explicitly specify the expected endianness for fields larger than 1 byte. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: remove unused functionAnders Roxell2018-03-061-5/+0
| | | | | | | | | | | | gcc warns that function 'qbman_pull_desc_set_token' is not used. drivers/staging/fsl-mc/bus/dpio/qbman-portal.c:525:13: warning: ‘qbman_pull_desc_set_token’ defined but not used [-Wunused-function] In the current code we remove that function. Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Cleanup dpbp and dpcon APIBogdan Purcareata2018-03-012-77/+0
| | | | | | | | Some functions and associated structures are not used by current code, so remove them. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be staticFengguang Wu2018-03-011-1/+1
| | | | | | Fixes: 1628e2e4dc76 ("staging: fsl-mc/dpio: allow the driver to compile multi-arch") Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: allow the driver to compile multi-archIoana Radulescu2018-03-011-1/+1
| | | | | | | | | | | | | | Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64), thus allowing this driver to compile on all architectures supported by the fsl-mc bus driver. This was compile tested on: - powerpc (corenet_basic_defconfig, ppc64_defconfig) - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF) - arm64 (defconfig) Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: dpio: remove foolish -Werror Makefile addtionGreg Kroah-Hartman2018-03-011-2/+0
| | | | | | | | | | | | With the zillion different compilers out there, never use -Werror, otherwise your code will end up breaking the build for odd reasons. Like now, if this driver is enabled, it breaks the build due to a function that could be marked static. So it's obvious no one is even paying attention to this driver :( Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: Fix incorrect castsIoana Radulescu2018-03-012-4/+4
| | | | | | | | | | | The DPIO driver incorrectly assumes virtual addresses are always 64b long, which causes compiler errors when building for a 32b platform. Fix this by using explicit casts to uintptr_t where necessary. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Move irqchip code out of stagingBogdan Purcareata2018-02-222-102/+1
| | | | | | | | | | | | | | | | | | | | | | | Now that the fsl-mc bus core infrastructure is out of staging, the remaining irqchip glue code used (irq-gic-v3-its-fsl-mc-msi.c) goes to drivers/irqchip. Create new Kconfig option for irqchip code that depends on FSL_MC_BUS and ARM_GIC_V3_ITS. This ensures irqchip code only gets built on ARM64 platforms. We can now remove #ifdef GENERIC_MSI_DOMAIN_OPS as it was only needed for x86. Signed-off-by: Stuart Yoder <stuyoder@gmail.com> [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> [add Kconfig dependency on ARM_GIC_V3_ITS] Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Move core bus out of stagingBogdan Purcareata2018-02-2217-4387/+9
| | | | | | | | | | | | | | | | | | | | | | Move the source files out of staging into their final locations: -mc.h include file in drivers/staging/fsl-mc/include go to include/linux/fsl -source files in drivers/staging/fsl-mc/bus go to drivers/bus/fsl-mc -overview.rst, providing an overview of DPAA2, goes to Documentation/networking/dpaa2/overview.rst Update or delete other remaining staging files -- Makefile, Kconfig, TODO. Update dpaa2_eth and dpio staging drivers. Add integration bits for the documentation build system. Signed-off-by: Stuart Yoder <stuyoder@gmail.com> [rebased, add dpaa2_eth and dpio #include updates] Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> [rebased, split irqchip to separate patch] Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Add SPDX license identifiersBogdan Purcareata2018-01-2224-425/+26
| | | | | | | | | | | The fsl-mc bus and dpio driver files use a combination of GPL-2.0 and GPL-2.0+ OR BSD-3-Clause licenses. Add SPDX tags and delete the full license text, keeping the existing license for each file. Add GPL-2.0 for Kconfig / Makefile, where not present. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: make function its_fsl_mc_msi_init staticColin Ian King2018-01-171-1/+1
| | | | | | | | | | | The function its_fsl_mc_msi_init is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'its_fsl_mc_msi_init' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Update include headerIoana Radulescu2018-01-161-1/+1
| | | | | | | | | | With the declarations of its_fsl_mc_msi_init/cleanup() now removed from fsl-mc-private.h, irq-gic-v3-its-fsl-mc-msi.c only needs a couple of definitions from mc.h, so include that header directly. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Remove unnecessary dependencyIoana Radulescu2018-01-164-16/+2
| | | | | | | | | | | | | | | | The function that enables fsl-mc msi interrupts doesn't need to be explicitly called from the fsl-mc bus driver initialization routine. Mark it to be independently called at system init; this is in line with how things are handled by other GICv3 irqchip users. Due to this change we now have an unused cleanup function, so remove it. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Remove dead codeIoana Radulescu2018-01-162-21/+0
| | | | | | | | Remove one unused function from irq-gic-v3-its-fsl-mc-msi.c Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Consolidate bus core header filesBogdan Purcareata2018-01-1612-570/+371
| | | | | | | | | | The DPAA2 objects involved (DPMNG, DPMCP, DPRC) are used by the fsl-mc bus infrastructure only, so group the APIs and structs into fsl-mc-private.h. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Cleanup dprc and dpmcp header filesBogdan Purcareata2018-01-166-591/+0
| | | | | | | | | A lot of API and associated structures are not used by current code, so remove them. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Reviewed-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: Add dpaa2_io_service_select() APIIoana Radulescu2018-01-081-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | All DPIO service API functions receive a dpaa2_io service pointer as parameter (NULL meaning any service will do) which indicates the hardware resource to be used to execute the specified command. There isn't however any available API for obtaining such a service reference that could be used further, effectively forcing the users to always request a random service for DPIO operations. (The DPIO driver holds internally an array mapping services to cpus, and affine services can be indirectly requested by a couple of API functions: dpaa2_io_service_register and dpaa2_io_service_rearm use the cpu id provided by the user to select the corresponding service) This patch adds a function for selecting a DPIO service based on the specified cpu id. If the user provides a "don't care" value for the cpu, we revert to the default behavior and return the next DPIO, taken in a round-robin fashion from a list of available services. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Acked-by: Roy Pledge <roy.pledge@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: do not print error in case of defer probe errorNipun Gupta2017-12-131-1/+2
| | | | | | | | | | Devices on MC bus can be deferred because of dependencies on other modules (such as IOMMU). Those are not the actual errors; as probing is again done by the kernel at later stages. So this patch avoids the error print in such case. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: Allocate IRQ's before scanning DPRC objectsNipun Gupta2017-12-131-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following is the current scenario when the devices are probed: FSL_MC Bus probe ---> dprc probe ---> dprc devices scan ---> probe devices in DPRC container ---> allocate IRQ's In case the devices being probed in the DPRC container need the IRQ's; probing of that device will fail. In current scenario the devices which need IRQ's such as DPIO gets deferred because they aren't registered when first time the probing of these devices is done in the dprc scan. So they are probed once IRQ's have been allocated. In case where DPRC probing itself gets deferred, which does in case IOMMU is enabled; all the devices in DPRC container gets probed before IRQ's are allocated. This causes devices using IRQ's (such as DPIO) to fail. So having IRQ's allocated before any of the devices in the DPRC container are probed is more legitimate. After this patch following is the flow of execution: FSL_MC Bus probe ---> dprc probe ---> dprc devices scan ---> allocate IRQ's ---> probe of devices in DPRC container. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Reviewed-by: Bharat Bhushan <bharat.bhushan@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc-bus: fix build warningGreg Kroah-Hartman2017-11-271-0/+1
| | | | | | | | | error could be unitialized when it is used as a return value in fsl_mc_device_add(). So fix up the warning by properly setting it. Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: use device_type instead of strcmp()Laurentiu Tudor2017-11-273-16/+16
| | | | | | | | Replace strcmp() based device type checks with the standard device model type. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: add support for device typeLaurentiu Tudor2017-11-271-0/+67
| | | | | | | | | The MC bus has different types of devices and this is supported by device model. This patch adds initial support for device types (defines them, adds helpers and sets the device type). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: remove debug WARN_ONs doubling error checksLaurentiu Tudor2017-11-277-77/+73
| | | | | | | | | A lot of error checks are doubled by debug WARN_ONs. Given that the driver was thoroughly debugged and is in a stable state, it's time to drop them. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: remove some superfluous WARN_ONsLaurentiu Tudor2017-11-276-53/+0
| | | | | | | | | These WARN_ONs shouldn't trigger unless something went very wrong. Since the driver is in a stable state let's remove these debug WARN_ONs. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: change to use EXPORT_SYMBOL_GPL()Laurentiu Tudor2017-11-271-10/+10
| | | | | | | No need to use EXPORT_SYMBOL() so switch to the GPL variant. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: consistently use EXPORT_SYMBOL_GPL()Laurentiu Tudor2017-11-274-24/+24
| | | | | | | | The bus driver is mixing EXPORT_SYMBOL()/EXPORT_SYMBOL_GPL() usage. Change it to consistently use EXPORT_SYMBOL_GPL(). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: remove couple of unused functionsLaurentiu Tudor2017-11-271-58/+0
| | | | | | | | These couple of functions are not yet used so lets remove them for now and add them back when/if needed. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: drop EXPORT_SYMBOL() for a few functionsLaurentiu Tudor2017-11-271-3/+0
| | | | | | | | These functions are only used within this driver so no need for EXPORT_SYMBOL(). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: remove incomplete refcount implementationLaurentiu Tudor2017-11-271-4/+0
| | | | | | | | | | There's an unfinished implementation of reference counting for dpaa2_io structure using atomics. Since it's unused lets remove it for now and, if needed at a later time, make use of krefs instead of rolling our own refcounting. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc: drop unused dpcon APIsLaurentiu Tudor2017-11-272-75/+0
| | | | | | | | Couple of API functions are not used so lets drop them together with the associated structures and defines. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: fsl-mc/dpio: Fix incorrect comparisonIoana Radulescu2017-10-031-2/+2
| | | | | | | | | | | | | 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>
* Staging: fsl-mc: remove unnecessary parenthesisKeerthi Reddy2017-09-291-1/+1
| | | | | | | Remove unnecessary parenthesis Signed-off-by: Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.13-rc7 into staging-nextGreg Kroah-Hartman2017-08-281-3/+3
|\ | | | | | | | | | | We want the staging and iio fixes in here to handle the merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "staging: fsl-mc: be consistent when checking strcmp() return"Colin Ian King2017-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: be consistent when checking strcmp() returnsLaurentiu Tudor2017-08-231-1/+1
| | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: add explicit dependencies for compile-tested archesLaurentiu Tudor2017-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: fix resource_size.cocci warningsCihangir Akturk2017-08-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc/dpio: Skip endianness conversion in portal configBogdan Purcareata2017-07-301-12/+12
| | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: fix resource_size.cocci warningsJulia Lawall2017-07-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: allow the driver compile multi-archLaurentiu Tudor2017-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: make the driver compile on 32-bitLaurentiu Tudor2017-07-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: don't use raw device io functionsLaurentiu Tudor2017-07-301-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: fix formating of phys_addr_t on 32 bitsLaurentiu Tudor2017-07-302-10/+10
| | | | | | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: fix compilation with non-generic msi domain opsLaurentiu Tudor2017-07-302-0/+6
| | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: drop useless gic v3 related #includeLaurentiu Tudor2017-07-302-2/+0
| | | | | | | | | | | | | | | | | | 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>
* | staging: fsl-mc: use generic memory barriersLaurentiu Tudor2017-07-301-4/+2
| | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud