summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-04-29Revert "Make the diu driver work without board level initialization"Wang Dongsheng
This reverts commit cf42c0223c36e5fc2bc99ac01a7dec2ba5ccfec6. This patch is a old methods, and platform operation shouldn't in driver code. The patch has been replaced by the new patch. And for binding also not need to modify. Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Change-Id: I5abf5c05400082b18822bcdd03117b7698ec859c Reviewed-on: http://git.am.freescale.net:8181/11644 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-29powerpc/diu: adjust DIU initialization entryWang Dongsheng
Move fsl_diu_init into diu probe function, because it should be initialized when system get diu device tree node, not always do initialization. Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com> Change-Id: I7666ed0dfe73b65ad98cfba9edea322ceaae4edc Reviewed-on: http://git.am.freescale.net:8181/11532 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-29fmd: Change defintion to reduce memory allocationMandy Lavi
Change-Id: I2e77a6b8038008e66495ccf4e0f66460a19fe148 Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11568 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-29fmd: remove resource allocation algorithmMandy Lavi
After the removal of the resource allocation algorithm fmd will use the default configuration of resource allocation which should cover all common cases. Special un-common cases should use the chosen-node mechanism to program the resources differently Change-Id: I5943bc70f790bc3cc331a9cde6569fad6a882c8f Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11567 Reviewed-by: Nir Erez <nir.erez@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-28fsl_dce: add stateful performance testJeffrey Ladouceur
Add test that demonstrates fsl dce stateful performance metrics. This is similar to the stateless test except that multiple chunks are sent on a stream instead on one big chunk. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: I222981506f013febf6ae1f95ba610507c8dd0a49 Reviewed-on: http://git.am.freescale.net:8181/11630 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-28dce: common test code updateJeffrey Ladouceur
Add api to display multi buffer scatter gather data. Distinguish between allocated dce data and amount of data copied to it. Add attribute to gzip request structure to enable adding them to a list. Add request structure to invalidate a stream context record. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Conflicts: drivers/staging/fsl_dce/tests/common/test_frame_helpers.c Change-Id: I59fa85503f4de953c2b48042942d3670f9e41a17 Reviewed-on: http://git.am.freescale.net:8181/11628 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-28fsl_dce: A apis to dce stream objectJeffrey Ladouceur
Add an API to get the length of the internal objects fifo. Add invalidate stream context record api. Missing flags parameter to process API. Add checking for REV1 limitations. Set default object fifo depth to 256. Add private header file. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: I0149ab9309ad41d920c21192cb9f0aa3bfb9256a Reviewed-on: http://git.am.freescale.net:8181/11626 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-28net/phy: tune get_phy_c45_ids to support more c45 phyShengzhou Liu
As some C45 10G PHYs(e.g. Cortina CS4315/CS4340 PHY) have zero Devices In package, current driver can't get correct devices_in_package value by non-zero Devices In package. so let's probe more with zero Devices In package to support more C45 PHYs which have zero Devices In package. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Change-Id: I468aa36c18a6cae538a09a7da3347e7584e1a07e Reviewed-on: http://git.am.freescale.net:8181/11387 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Shaohui Xie <Shaohui.Xie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-26crypto: caam - Fix key inlining in AEAD shared descriptorsVakul Garg
The variable 'keys_fit_inline' is initialised correctly to avoid using its stale value while creating shared descriptor for decryption and given-iv-encryption. Signed-off-by: Vakul Garg <vakul@freescale.com> Change-Id: I4e1482a7c9ea21b02523f90fc9ed68a61817c0be Reviewed-on: http://git.am.freescale.net:8181/11546 Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25Properly align USDPAA DMA memoryRoy Pledge
DMA memory must be aligned to the page boundary when mapped into the processes virtual address space Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: Ibc6320991d8e5317b8724fc2cfdc23ce47faaaf4 Reviewed-on: http://git.am.freescale.net:8181/11409 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25Fix issue where shared mapping was only partialy mappedRoy Pledge
USDPAA DMA memory mappings can consist of multiple segments to avoid power of 4 restrictions imposed by TLB1 hardware. The total size of the mapping must be tracked so that a shared mapping will cover all pages when it is mapped by another process Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: I9f55f3f876e0ca8fc8aa7eb81ec461414eebea27 Reviewed-on: http://git.am.freescale.net:8181/11408 Reviewed-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25Allow a shared DMA maps to be mapped into a process many timesRoy Pledge
Add reference counting to the USDPAA DMA mapping logic so that dma_mem_create() can be called multiple times on the same shared region by a process. Signed-off-by: Roy Pledge <Roy.Pledge@freescale.com> Change-Id: I7419fd60b3f823764d367018d08f4e620ae09899 Reviewed-on: http://git.am.freescale.net:8181/11407 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25dpa_offload: Remove shared interface from T2080RDB DTS fileMarian Chereji
Removed the shared interface from the t2080rdb-usdpaa-shared-interfaces DTS file to align Ethernet interfaces with the other dpaa offloading applications on T2080RDB. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ic24a39a8524ffd4485c91feb4760877a440ff803 Reviewed-on: http://git.am.freescale.net:8181/11528 Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25vfio: Fix dummy-iommu compilationBharat Bhushan
We are getting compilation error because commit id "9a110858ed2e494b8be683c6959113f73685eb1f" converts compund_trans_head() to compound_head() and similar change required in drivers/vfio/vfio_iommu_dummy.c. Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Change-Id: Ie9686ce7ac34b0eb2609b8d9458493815c94e65b Reviewed-on: http://git.am.freescale.net:8181/11276 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varun Sethi <Varun.Sethi@freescale.com> Reviewed-by: Mihai Claudiu Caraman <mihai.caraman@freescale.com> Reviewed-by: Stuart Yoder <stuart.yoder@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-25crypto: caam/qi - remove hardcoded offsets in tls10 encap descriptorTudor Ambarus
The Shared Descriptor's relative offsets vary depending on the keys length. Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Change-Id: I75ccafa582ec2c20ea2745599ed650adf649ad33 Reviewed-on: http://git.am.freescale.net:8181/11471 Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> Reviewed-by: Mircea Pop <mircea.pop@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-04-25crypto: caam - remove hardcoded offsets in tls10 encap descriptorTudor Ambarus
The Shared Descriptor's relative offsets vary depending on the keys length. Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Change-Id: Iaf72d57ceb2c048057ca33a2bb5c9a02ca4680db Reviewed-on: http://git.am.freescale.net:8181/11470 Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Cristian Stoica <cristian.stoica@freescale.com> Reviewed-by: Mircea Pop <mircea.pop@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-04-24fmd: fix pause frame handler for txMarian Rotariu
"Command Config" register for mEMAC gets corrupted being wrongfully initialized with "TX FIFO Sections" register values. Signed-off-by: Marian Rotariu <marian.rotariu@freescale.com> Change-Id: Ifa6c0fe497e45e9864acd3ed9dbae2aa1af45a50 Reviewed-on: http://git.am.freescale.net:8181/11405 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Vakul Garg <vakul@freescale.com> Reviewed-by: Mircea Pop <mircea.pop@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> (cherry picked from commit db26a2e672299a318b2b941ad28fddba8c38a747) Reviewed-on: http://git.am.freescale.net:8181/11472 Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-04-24dpaa_eth: Cleaning up port suspend/resume error pathsCristian Sovaiala
Add goto labels and relevant error messages when RX/TX port suspend/resume or set WoL fail. Returning a != 0 value from suspend callback we trigger a rollback of the suspend sequence. In resume callback, in case RX port resume fails we suspend the TX port and keep WoL disabled. Change-Id: I330249c06525785d7045c627dcf218d031028857 Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11367 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> (cherry picked from commit 56956b78e098c2ae9166bfe93efaaac97758c0cf) Reviewed-on: http://git.am.freescale.net:8181/11437 Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-04-22bonding: make LAG codes to fit different kernelJianhua Xie
Linux kernel API bond_for_each_slave of bonding.h has different params along with different kernel version as below table: Older version: bond_for_each_slave(bond, pos, int cnt), 3.11.0-rc1(dec1e90e8): bond_for_each_slave(bond, pos), 3.12.0-rc1(9caff1e7b): bond_for_each_slave(bond, slave, list_head *iter) This patch is making LAG codes to fit different kernel version. Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: Ifd365cd232aba67a437b156568d88c6e16c44c1a Reviewed-on: http://git.am.freescale.net:8181/11293 Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Scott Wood <scottwood@freescale.com>
2014-04-18fsl_pme: remove incorrect usage of flag to request_irqJeffrey Ladouceur
The hardware doesn't support affinity on individual error interrupts. Therefore it's not possible to remove correctly remove the warning "Cannot set affinity for irq" since this is a reflection of reality. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: Ide2a507c60dc1e6b4be1c5f0aba352a37071ae80 Reviewed-on: http://git.am.freescale.net:8181/#/c/11126/ Reviewed-on: http://git.am.freescale.net:8181/11213 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Scott Wood <scottwood@freescale.com>
2014-04-18fsl_pme: Reduce time taking to enter and exit deepsleepJeffrey Ladouceur
Reduce the number of requests sent the the PME device by bulking many requests into a contiguous frame. Added unmapping of memory. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: Ic15560be5bd7bb3d965a88e5eab0553552f262b5 Reviewed-on: http://git.am.freescale.net:8181/10927 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11212 Reviewed-by: Scott Wood <scottwood@freescale.com>
2014-04-18fsl_pme: disable interrupts in suspendJeffrey Ladouceur
In order to enter deepsleep the pme device must clear all pending interrupts. Setting the interrupt inhibit register accomplishes this. On wakeup this register is restored by the original backed up value. Signed-off-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Change-Id: Id50cbc5376b24de885260cff817e7ce5e304c306 Reviewed-on: http://git.am.freescale.net:8181/10821 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Geoff Thorpe <Geoff.Thorpe@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com> (cherry picked from commit 18de78a95ba92cc561844285eea9534ac061b7f9) Reviewed-on: http://git.am.freescale.net:8181/11211 Reviewed-by: Scott Wood <scottwood@freescale.com>
2014-04-18Merge branch 'master-tmp' into sdk-v1.6.xScott Wood
master-tmp is the master branch as of 8b60f5ea90c49344692a70f62cd4aa349de38b48 with the following commits reverted due to excessive conflicts: commit b35a69559c46e066e6f24bb02d5a6090483786e3 Author: Scott Wood <scottwood@freescale.com> Date: Fri Apr 18 15:27:52 2014 -0500 Revert "net: add sysfs helpers for netdev_adjacent logic" This reverts commit 0be682ca768d671c91cfd1379759efcb3b29102a. commit 1c0dc06e47e11bf758f3e84ea90c2178a31dbf0f Author: Scott Wood <scottwood@freescale.com> Date: Fri Apr 18 15:27:47 2014 -0500 Revert "net: rename sysfs symlinks on device name change" This reverts commit 45ce45c69750b93b8262aa66792185bd49150293. Conflicts: drivers/iommu/fsl_pamu.c drivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_sysfs.c drivers/net/bonding/bonding.h drivers/net/ethernet/freescale/gianfar.c Signed-off-by: Scott Wood <scottwood@freescale.com> Conflicts: drivers/iommu/fsl_pamu.c drivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_sysfs.c drivers/net/bonding/bonding.h drivers/net/ethernet/freescale/gianfar.c
2014-04-18Merge remote-tracking branch 'origin/sdk-kernel-3.12' into sdk-v1.6.xScott Wood
2014-04-18iommu/fsl: Work around erratum A-007907Scott Wood
Erratum A-007907 can cause a core hang under certain circumstances. Part of the workaround involves not stashing to L1 Cache. On affected chips, stash to L2 when L1 is requested. Signed-off-by: Scott Wood <scottwood@freescale.com> Change-Id: Ie8b16bf84831aae2b97897e4da91f91e8bdd9868 Reviewed-on: http://git.am.freescale.net:8181/11208 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
2014-04-18fman: don't redefine NO_IRQScott Wood
This triggered a warning on the v3.12 merge. Redefining standard kernel symbols is *wrong*. Don't do it. FWIW, NO_IRQ is deprecated and should not be used at all. Use zero. I tried removing this redefinition entirely, but that caused a build failure. I tried adding an #include of the relevant Linux header from drivers/net/ethernet/freescale/fman/src/inc/types_linux.h which AFAICT is the place for Linux dependencies, but it still wasn't getting included so I gave up and defined it to the same exact thing as Linux. Note that while this warning did not appear on v3.13-rc3 (presumably due to headers being included in different order), there are lots of warnings about "fm_port_suspend missing" both before and after moving to 3.12. Please fix these. Warnings should be treated as errors, not ignored. Signed-off-by: Scott Wood <scottwood@freescale.com> Change-Id: I18e8d71ed8a9494547cb0a2b7dca475deb26c030 Reviewed-on: http://git.am.freescale.net:8181/10770 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Kim Phillips <Kim.Phillips@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
2014-04-18UIO/DMA: Add dma uio private mmap functionLiu Gang
UIO mmap cannot map an unaligned page address, and the PowerPC DMA register space has an unaligned page base address. So the mmap for DMA register address should be supported via a private function. Signed-off-by: Liu Gang <gang.liu@freescale.com> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Change-Id: Ic5672dd4f86031fab34830d47e231fb1c46b2070 Reviewed-on: http://git.am.freescale.net:8181/11081 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18dpa_offload: Fix compat support for SA per DSCPAurelian Zanoschi
In case of 64bit platforms SA per DSCP feature needs some structure data members in order to correctly copy parameters from user-space to kernel-space. Also values for the three feature parameters need to be correctly copied from one space to another. Change-Id: I2d31813431b87be6e61651597acf7ad56ae60148 Signed-off-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/11104 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Marian-Cornel Chereji <marian.chereji@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18dpa_offload: Fix usdpaa DTS file corruption for T2080RDBMarian Chereji
There is a closed bracket ('}') missing in the usdpaa DTS file which is causing a dtc compiler error. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: Ibafca15bfb9e7c03bfda9d9ef05d43bdd233a66c Reviewed-on: http://git.am.freescale.net:8181/11102 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-by: Radu-Andrei Bulie <Radu.Bulie@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18USB : Gadget : fsl: Fix the fault issue on rmmodSuresh Gupta
completion in udc_controller->done should be assign with proper value before complete called. The complete called in fsl_udc_release which intern called from usb_del_gadget_udc, so moving assignment before calling usb_del_gadget_udc Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com> Change-Id: I40867db4c11464d7d47e1fd55ed852b38c7d0e47 Reviewed-on: http://git.am.freescale.net:8181/10911 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nikhil Badola <nikhil.badola@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18fsl/usb: Add Deep Sleep support for USB drvNikhil Badola
Saves and Restores USB register context when the system goes to deep sleep and resumes from it. This is required only when USB controller and phys are OFF during Deep Sleep Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Change-Id: I5af0b680a9c3b4dd014c8266f5e8b00ca56264df Reviewed-on: http://git.am.freescale.net:8181/10994 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Varun Sethi <Varun.Sethi@freescale.com> Reviewed-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18crypto: caam/qi - make tls10 descriptors compatible with Era3 and Era2Tudor Ambarus
Replace instructions that are not supported in Era3 and Era2. Change-Id: I7c4c9417a66921537875b507185f60826b477c6e Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10818 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Tested-by: Jose Rivera <German.Rivera@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18crypto: caam - make tls10 descriptors compatible with Era3 and Era2Tudor Ambarus
Replace instructions that are not supported in Era3 and Era2. Change-Id: I6e22625a23acfc300bb55dc56a444568cdf04fc5 Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10817 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18crypto: caam - fix key typo in gcm descriptorsTudor Ambarus
There is only one key for the aes gcm algorithm. Change-Id: I1f53edf41319083aa34ac9b948bc35c3d7886dde Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10816 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18crypto: caam/qi - fix condition for the jump over keys commandTudor Ambarus
Only one DECO can access a given shared CHA, so waiting for CHAs to be done is not necessary when jumping the keys. SELF condition has no sense for the SERIAL sharing since the jobs are executed in the same DECO. Change-Id: I83935bcaa5a30c6d78f6cd5234d4bc80b5292b00 Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10815 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18crypto: caam - fix condition for the jump over key(s) commandTudor Ambarus
Only one DECO can access a given shared CHA, so waiting for CHAs to be done is not necessary when jumping the keys. SELF condition has no sense for the SERIAL sharing since the jobs are executed in the same DECO. Change-Id: I5501a9646a55913ca8a2f98dc246bf6ff2f08df0 Signed-off-by: Tudor Ambarus <tudor.ambarus@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10814 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-18vfio: Use compound_head() to fix compilation errorBharat Bhushan
We are getting compilation error because commit id "9a110858ed2e494b8be683c6959113f73685eb1f" converts compund_trans_head() to compound_head() and similar change required in drivers/vfio/vfio_iommu_fsl_pamu.c. Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Change-Id: Ifdb5f2b1f62bbc58d64883f04e6764e40c356f4e Reviewed-on: http://git.am.freescale.net:8181/11032 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Mihai Claudiu Caraman <mihai.caraman@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-15bonding: make pcd basefqid aligned in FSL LAGJianhua Xie
Distribution may result in less than hashDistributionNumOfFqids queues if baseFqid unaligned. Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: I3bb9dd597d305759a81a0319957d92c096294c4c Reviewed-on: http://git.am.freescale.net:8181/10949 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11dpa_classifier: Allow adding of header manipulation on miss table relationshipMarian Chereji
The dpa_classifier did not allow the user application to attach header manipulation chains on the miss table relationship action. This is, however supported in FMD, hence now the dpa_classifier will also allow this feature to be used. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I0174a4a3d9c708b4209cb2f8fa2fe3f724bb2081 Reviewed-on: http://git.am.freescale.net:8181/10644 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Nicolae-Sebastian Grigore <sebastian.grigore@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11dpa_offload: Add application DTS files for T2080RDB platformMarian Chereji
Added DTS files to support the dpa_offloading applications on the T2080RDB platform. Signed-off-by: Marian Chereji <marian.chereji@freescale.com> Change-Id: I02a59c557b354b710d24e9c8b97147fb55482307 Reviewed-on: http://git.am.freescale.net:8181/10919 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Aurelian Zanoschi <Aurelian.Zanoschi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11crypto: caam - fix UIO JR dependencyAlex Porosanu
Exporting JR via the UIO mechanism in user-space should depend on the JR back-end mechanism being available. Otherwise the user could build the JR UIO exporting part of the CAAM driver without having the necessary JR export code in place. This patch adds the correct dependencies to the CAAM driver kernel configuration file. Change-Id: Idab845bcb73ceff4196685446ea5c3d266df1e6d Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10820 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Horia Ioan Geanta Neag <horia.geanta@freescale.com> Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11bonding: kernel space PCD for xmit distributionJianhua Xie
The kernel space PCD part provides hash based outgoing traffic distribution. The sources can be L2 MAC/L3 SRC and DST IP addr/ L4 SRC and DST port information. Current version only support L2 information hash which is the default transmit policy in the Linux bonding driver. Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: Ifd85630ab0eebd77713574f6cf51fb92203a1c06 Reviewed-on: http://git.am.freescale.net:8181/10414 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Florinel Iordache <Florin.Iordache@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11bonding: LAG with outgoing traffic distribution based on h/wJianhua Xie
Linux bonding driver provides a method for aggregating multiple network interface controllers (NICs) into a single logical bonded interface of two or more so called (NIC) slaves. Slave selection for outgoing traffic is done according to the transmit hash policy, which may be changed from the default simple XOR policy via the xmit_hash_policy option. This selection algorithm in Linux bonding driver is based on software. The QorIQ Data Path Acceleration Architecture (DPAA) is a comprehensive architecture which integrates all aspects of packet processing in the SoC, addressing issues and requirements resulting from the multicore nature of QorIQ SoCs. The DPAA includes Cores, Network and packet I/O, Hardware offload accelerators. Hardware offload accelerators include FMan/BMan/QMan and etc. Offline port is one of FMan elements, which supports (Parse, Classify, Distribute) PCD function on frames extracted frame descriptor (FD). Offline port also can inspect traffic, split it into FQs on ingress, and send traffic from the FQs to the interface on egress by the PCD function. These patches are enhancing Linux kernel LAG (Link Aggregation) with Freescale DPAA value added. The main idea is to utilize offline ports with PCD function to help to distribute outgoing traffics, including outgoing slaves device searching and selection. In another world, patches are using CRC-64 based hashing of Keygen/scheme and the parser result of outgoing frames header information to distribute outgoing frames. Beside of above, after integration this HW based LAG with Freescale CEETMQos, these two features can support hardware based Qos for bundles links rather than individual links. These patches mainly include 2 parts: 'glue logic' and 'kernel space PCD'. The glue logic first probes all available offline ports information via reading dts, including tx fqid/default fqid/errors fqid, pcd fqs, other private data pointer of offline ports for future reusing. The glue logic also creates frames from skb and then sends these frames to offline port directly, this offline port will continue to distribution frames from the PCD FQs to the slave interface on egress by the PCD function, rather than select slave device by CPU, neither make slave device driver create frame from skb, nor make slave devices driver send frames. These patches are supporting the mapping among offline ports and available bundles at run-time. PCD based outgoing traffic distribution can be enabled or disabled at run-time by sysfs interface in patches. To do: 1. PCD policy L23/L34 have not been veryfied. 2. offline port buffer pool/buffer layout will be enhanced. 3. software based L4 csum for now, offline port based L4 csum need be fixed. To test this HW based LAG after booting up Linux: cd /sys/class/net/bond0/bonding/ echo 4 >mode cat offline_ports echo fman0-oh@1 > oh_needed_for_hw_distribution cat oh_needed_for_hw_distribution cat oh_en echo 1 >oh_en cat oh_en echo +fm1-gb0 >slaves echo +fm1-gb1 >slaves ifconfig bond0 192.168.10.2/24 up ping 192.168.10.1 -c 5 Signed-off-by: Jianhua Xie <jianhua.xie@freescale.com> Change-Id: I3a6664bfcc9ec9ca3f86a5e36381220c5fcb07cf Reviewed-on: http://git.am.freescale.net:8181/10413 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jiafei Pan <Jiafei.Pan@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11fsldma: bug fix for dma suspendHongbo Zhang
During the suspend process, DMA channels are suspended one by one, if one channel cannot be suspended, all the former channels which have been suspended should be restored, i.e. mark the pm_state as running, and release the spin locks aquired. This patch adds the "pm_state = RUNNING" which was omitted in the original suspend patch. Signed-off-by: Hongbo Zhang <hongbo.zhang@freescale.com> Change-Id: I924af3384d58d03f6321cb02c28a702367ea6bc1 Reviewed-on: http://git.am.freescale.net:8181/10871 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11gianfar: Add WAKE_ARP wol supportClaudiu Manoil
Add wake-on-lan by ARP request packets. This feature is based on the "wake-on-filer" support. A filer rule was added to match the incoming ARP request packets directed to the first primary IP address of the receiving interface. Upon successful match during system suspend state a FGPI interupt is triggered to wakeup the system. Cc: Li Yang <leoli@freescale.com> Cc: Zhao Chenhui <chenhui.zhao@freescale.com> Change-Id: Ic00630a19a15d011ef0ee1eada660391f96018f4 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10732 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11gianfar: Add WAKE_UCAST wol supportClaudiu Manoil
Add wake-on-lan by L2 unicast packets. This feature is based on the "wake-on-filer" support. A filer rule was added to match the incoming UCAST packets during system suspend state and to trigger the FGPI interupt to wakeup the system. Cc: Li Yang <leoli@freescale.com> Cc: Zhao Chenhui <chenhui.zhao@freescale.com> Change-Id: I04d4b4a9501ea2d8f75b3e0794c220ac95b0d679 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10731 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11gianfar: Add framework for "wake-on-filer"Claudiu Manoil
This framework enables eTSEC's filer and the FGPI Rx interrupt (Filer General Purpose Interrupt) as a wakeup source event. Upon entering suspend state, the eTSEC filer can be programmed with various match rules for the Rx packets. For example, the rules could be matching incoming unicast or arp packets. If a packet matches one of the rules, it will be enqueued in the Rx ring and a FGPI interrupt will be generated by the filer to wakeup the system. The packet types not matching the rules will be dropped. The rules need to be added as filer scripts inside gfar_filer_config_wol() to implement different WOL capabilities. The "fsl,wake-on-filer" DT binding limits this capability to certain platforms only. Cc: Li Yang <leoli@freescale.com> Cc: Zhao Chenhui <chenhui.zhao@freescale.com> Change-Id: Ida38d2210975a8523e4da4fc4667de4380c2b9d4 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10730 Reviewed-by: Yang Li <LeoLi@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11gianfar: Enable all wol ports as wakeup event sourcesClaudiu Manoil
Not all the eTSECs have an active clock by default when the devices enter suspend state (i.e. sleep power state). This property is however configurable, and all the eTSECs with wake-on-lan capabilities can be enabled as wakeup event sources. Use the PMC API to enable all the eTSEC ports, which are capable of wake-on-lan, as wakeup event sources. Cc: Li Yang <leoli@freescale.com> Cc: Zhao Chenhui <chenhui.zhao@freescale.com> Change-Id: I7bd3db14173ddbe3cdd64bcffeb6c72adfcbf2c7 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10729 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Yang Li <LeoLi@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11gianfar: Fix suspend/resume for wol magic packetClaudiu Manoil
Don't detach the interfaces that are already down. Use correct sequence to stop Tx traffic and to prevent Tx timeout, including napi disabling. Use netif_tx_lock() to prevent races while stopping Tx, replacing the driver specific lock_tx_qs() which is not correct for this purpose. Use gfar_halt() to correctly stop the traffic at controller level (i.e. graceful stop the DMA). Fix the invalid device references for the wakeup routines, from the invalid &dev->dev references to the correct &ofdev->dev (or priv->dev) references. Remove buggy device_set_wakeup_enable() from the open() routine. Only the ethtool is allowed to enable/disable the wol capabilities. Remove superfluous priv->bflock lock, as it's not justified. Use IRQF_NO_SUSPEND to be able to wake up the system by magic packet generated interrupts. Change-Id: If9b4a878aa3ee6df8867bab9ca19d96b731e9fa9 Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/10728 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Jeffrey Ladouceur <Jeffrey.Ladouceur@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
2014-04-11fmd: Unmask normal Fman interrupt when entering sleep modeCristian Sovaiala
Magic Packet raises normal Fman interrupt so unmask it when the system enters sleep/deep sleep mode such that the system can be woken up. Signed-off-by: Cristian Sovaiala <cristian.sovaiala@freescale.com> Change-Id: I6325493dad3d0ea54a34575d6a24229fd351fbde Reviewed-on: http://git.am.freescale.net:8181/10888 Reviewed-by: Mandy Lavi <Mandy.Lavi@freescale.com> Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> (cherry picked from commit a55ee50a7e6907561f21015ba8dc6a022b46722e) Reviewed-on: http://git.am.freescale.net:8181/10924