summaryrefslogtreecommitdiff
path: root/drivers/soc
AgeCommit message (Collapse)Author
2017-12-12soc/qbman: Disable IRQs for deferred QBMan workRoy Pledge
Work for Congestion State Notifications (CSCN) and Message Ring (MR) handling is handled via the workqueue mechanism. This requires the driver to disable those IRQs before scheduling the work and re-enabling it once the work is completed so that the interrupt doesn't continually fire. Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12fsl/soc/qbman: Enable FSL_LAYERSCAPE config on ARMMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> [Stuart: changed to use ARCH_LAYERSCAPE] Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Add missing headers on ARMClaudiu Manoil
Unlike PPC builds, ARM builds need following headers explicitly: +#include <linux/io.h> for ioread32be() +#include <linux/delay.h> for udelay() Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: different register offsets on ARMMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: add QMAN_REV32Madalin Bucur
Add revision 3.2 of the QBMan block. This is the version for LS1043A and LS1046A SoCs. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Rework ioremap() calls for ARM/PPCRoy Pledge
Rework ioremap() for PPC and ARM. The PPC devices require a non-coherent mapping while ARM will work with a non-cachable/write combine mapping. Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Fix ARM32 typoValentin Rothberg
The Kconfig symbol for 32bit ARM is 'ARM', not 'ARM32'. Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Drop L1_CACHE_BYTES compile time checkClaudiu Manoil
Not relevant and arch dependent. Overkill for PPC. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Drop set/clear_bits usageMadalin Bucur
Replace PPC specific set/clear_bits API with standard bit twiddling so driver is portalable outside PPC. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Use shared-dma-pool for QMan private memory allocationsRoy Pledge
Use the shared-memory-pool mechanism for frame queue descriptor and packed frame descriptor record area allocations. Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocationsRoy Pledge
Use the shared-memory-pool mechanism for free buffer proxy record area allocation. Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
2017-12-12soc/qman: export non-programmable FQD fields queryHoria Geantă
Export qman_query_fq_np() function and related structures. This will be needed in the caam/qi driver, where "queue empty" condition will be decided based on the frm_cnt. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-12-12soc/qman: add dedicated channel ID for CAAMHoria Geantă
Add and export the ID of the channel serviced by the CAAM (Cryptographic Acceleration and Assurance Module) DCP. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-12-12soc/qman: export volatile dequeue related structsHoria Geantă
Since qman_volatile_dequeue() is already exported, move the related structures into the public header too. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-12-12soc/fsl/qman: test: use DEFINE_SPINLOCK()Fabian Frederick
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/fsl/bman: Use resource_size instead of computationWei Yongjun
Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/fsl/qbman: Convert to hotplug state machineSebastian Andrzej Siewior
Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Scott Wood <oss@buserror.net> Cc: Claudiu Manoil <claudiu.manoil@nxp.com> Cc: rt@linutronix.de Cc: Roy Pledge <roy.pledge@nxp.com> Link: http://lkml.kernel.org/r/20161126231350.10321-21-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2017-12-12soc/fsl/qbman: Convert to hotplug state machineSebastian Andrzej Siewior
Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Scott Wood <oss@buserror.net> Cc: Claudiu Manoil <claudiu.manoil@nxp.com> Cc: rt@linutronix.de Cc: Roy Pledge <roy.pledge@nxp.com> Link: http://lkml.kernel.org/r/20161126231350.10321-20-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2017-12-12soc/qman: Handle endianness of h/w descriptorsClaudiu Manoil
The hardware descriptors have big endian (BE) format. Provide proper endianness handling for the remaining descriptor fields, to ensure they are correctly accessed by non-BE CPUs too. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Clean up CGR CSCN target update operationsClaudiu Manoil
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Change remaining contextB into context_bClaudiu Manoil
There are multiple occurences of both contextB and context_b in different h/w descriptors, referring to the same descriptor field known as "Context B". Stick with the "context_b" naming, for obvious reasons including consistency (see also context_a). Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qbman: Handle endianness of qm/bm_in/out()Claudiu Manoil
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Drop unused field from eqcr/dqrr descriptorsClaudiu Manoil
ORP ("Order Restoration Point") mechanism not supported. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Fix accesses to fqid, cleanupClaudiu Manoil
Preventively mask every access to the 'fqid' h/w field, since it is defined as a 24-bit field, for every h/w descriptor. Add generic accessors for this field to ensure correct access. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Remove unused struct qm_mcc* layoutsClaudiu Manoil
1. qm_mcc_querywq layout not used for now, so drop it; 2. queryfq, queryfq_np and alterfq are used only for accesses to the 'fqid' field, so replace these with a generic 'fq' layout. As a consequence, 'querycgr' turns into 'cgr' following the same reasoning above and for consistent naming. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Remove redundant checks from qman_create_cgr()Claudiu Manoil
opts is checked redundantly. Move local_opts declaration inside its usage scope. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: test: Don't use dummy platform device for dma mappingClaudiu Manoil
Replace dummy platform device hack with a reference to a portal's platform device, in order to dma map the test frame for this small unit test. The 2 qman symbols need to be exported because this self test is a kernel module. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Don't add a new platform device for dma mappingClaudiu Manoil
The qman portals are platform devices themselves, so they should handle dma mappings. Creating a dummy platform device in order to support dma mapping operations is not justified (and not portable). Instead, do the mapping against the first portal that has been initialised. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: test: Fix implementation of fd_cmp()Claudiu Manoil
This function must only return the truth value of whether two frame descriptors are different or not. It does NOT have to compute some obscure difference between fd fields and return it as an int, making sparse complain about type conversions in the process. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Fix direct access to fd's addr_lo, use proper accesorClaudiu Manoil
Use the proper accessor to get the FD address. Accessing the internal field "addr_lo" directly is not portable and error prone. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qbman: Fix resource leak on portal probing error pathClaudiu Manoil
In case init_pcfg() returns with error the CI region must be unmapped too. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Fix h/w resource cleanup error path handlingClaudiu Manoil
qman_query_fq*() may return other error codes apart from -ERANGE, in which cases the error handling done by the resource cleanup callers would be wrong. The patch fixes the handling of those cases, and cleans up related code inside the resource cleanup & release handlers (i.e. replace hardcoded fqid value with corresponding define). Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Replace of_get_property() with portable equivalentMadalin Bucur
Use arch portable of_property_read_u32() instead, which takes care of endianness conversions. Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/qman: Check ioremap return valueMadalin Bucur
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com> Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-12-12soc/fsl: fix spelling mistakes in critical error messagesColin Ian King
Trivial fix to spelling mistake "uncommited" to "uncommitted" in critical error messages. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Scott Wood <oss@buserror.net>
2017-10-09soc: fsl: fix the compilation issueZhang Ying-22455
Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
2017-09-28soc: fsl: set rcpm bit for FTMZhang Ying-22455
Set RCPM for FTM when using FTM as wakeup source. Because the RCPM module of each platform has different big-end and little-end mode, there need to set RCPM depending on the platform. Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
2017-09-25irqchip/qeic: move qeic driver from drivers/soc/fsl/qeZhao Qiang
move the driver from drivers/soc/fsl/qe to drivers/irqchip, merge qe_ic.h and qe_ic.c into irq-qeic.c. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25QE: remove PPCisms for QEZhao Qiang
QE was supported on PowerPC, and dependent on PPC, Now it is supported on other platforms. so remove PPCisms. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-09-25Add FSL_LS2_CONSOLEBogdan Purcareata
This patch adds Layerscape MC and AIOP console support. Squashed commits from SDK 2.0.x: - Virtual MC console for Linux - ls2-console: Improve LS2 console driver - Fixes in LS2 console driver for AIOP log messages - ls2-console: fixes for mc console access - ls2-console: updates w.r.t MC version 9.0.3 - ls2-console: updates w.r.t MC version 9.0.4 - ls2-console: updates for AIOP console - ls1088: MC console dump crashes in Linux Initial patches by: - Roy Pledge <Roy.Pledge@freescale.com> - Stuart Yoder <stuart.yoder@freescale.com> - Murali K <muralik@freescale.com> - Catalin Horghidan <catalin.horghidan@nxp.com> Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
2017-07-14Fix errata A-007728 for flextimerMeng Yi
If the FTM counter reaches the FTM_MOD value between the reading of the TOF bit and the writing of 0 to the TOF bit, the process of clearing the TOF bit does not work as expected when FTMx_CONF[NUMTOF] != 0 and the current TOF count is less than FTMx_CONF[NUMTOF]. If the above condition is met, the TOF bit remains set. If the TOF interrupt is enabled (FTMx_SC[TOIE] = 1), the TOF interrupt also remains asserted. Above is the errata discription In one word: software clearing TOF bit not works when FTMx_CONF[NUMTOF] was seted as nonzero and FTM counter reaches the FTM_MOD value. The workaround is clearing TOF bit until it works(FTM counter doesn't always reache the FTM_MOD anyway),which may cost some cycles. Signed-off-by: Meng Yi <meng.yi@nxp.com>
2017-07-14soc: fsl: add flextimer module alarm driver for LayerscapeWang Dongsheng
Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
2017-07-14soc: fsl: Add ls1046a to GUTSRoy Pledge
Add the ls1046a device to GUTS Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
2017-07-14ls1088a: guts:Enable guts driver for ls1088aAmrita Kumari
Signed-off-by: Amrita Kumari <amrita.kumari@nxp.com>
2017-07-14soc: fsl: add GUTS driver for QorIQ platformsyangbo lu
The global utilities block controls power management, I/O device enabling, power-onreset(POR) configuration monitoring, alternate function selection for multiplexed signals,and clock control. This patch adds a driver to manage and access global utilities block. Initially only reading SVR and registering soc device are supported. Other guts accesses, such as reading RCW, should eventually be moved into this driver as well. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> [remove makefile/kconfig] Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2017-07-14arm: defconfig: enable CONFIG_FTM_ALARM on 32bit systemZhang Ying-22455
Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
2017-07-14soc: fsl: add Kconfig and MakefileYangbo Lu
Add Kconfig and Makefile for below drivers: - guts - layerscape soc Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2017-07-14staging: fsl-dpaa2: Add Kconfig / Makefile entriesBogdan Purcareata
Add config / compilation entries for the following DPAA2 components: - ethernet - l2switch - mac - virtual bridge - ls2 console - rtc Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-07-14armv8: pm: add rcpm module supportYuantian Tang
The Run Control and Power Management (RCPM) module communicates with embedded cores, coherency modules, and other device platform module to provide run control and power management functionality Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
2017-01-26soc: ti: wkup_m3_ipc: Fix error return code in wkup_m3_ipc_probe()Wei Yongjun
commit 36b29eb30ee0f6c99f06bea406c23a3fd4cbb80b upstream. Fix to return a negative error code from the kthread_run() error handling case instead of 0, as done elsewhere in this function. Fixes: cdd5de500b2c ("soc: ti: Add wkup_m3_ipc driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>