aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/cns3xxx/files
Commit message (Collapse)AuthorAgeFilesLines
* cns3xxx: add missing dma mask for ethernet deviceFelix Fietkau2014-11-261-1/+6
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43399 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: switch to using the upstream dwc2 driver instead of dwc_otgFelix Fietkau2014-11-2619-22925/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43398 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: update to linux 3.14Felix Fietkau2014-11-261-2/+2
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43397 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: set base device for ethernet port netdevsFelix Fietkau2014-11-261-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43395 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix passing the device to dma mapping opsFelix Fietkau2014-11-261-17/+20
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43394 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: Adopt irq_domain support for cns3xxx gpio driverFelix Fietkau2014-10-081-7/+23
| | | | | | | | | Have gpio driver adopt irqdomain support so that there are non-overlapping allocations of irq numbers mapped to gpio's. Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42844 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix register for enabling MMC/SD pinsFelix Fietkau2014-10-071-2/+1
| | | | | | | | also fixes a GPIO related regression from the upgrade to 3.10 Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42829 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: update to linux 3.10Felix Fietkau2014-07-3113-338/+337
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41917 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: ethernet - revert: clean up tx descs only when neededFelix Fietkau2014-04-291-8/+4
| | | | | | | | | | | | | This reverts commit 0772ab938c0aedd7f4cc7127059d6ce8cf929dfa. Trying to optimize calls to eth_complete_tx in this fasion causes a regression where when sending only the tx queue can get disabled until a packet is received. This original call to eth_schedule_poll() is scheduled so it should not cause a performance issue. Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40592 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: Add GW2385 supportImre Kaloz2014-03-121-0/+30
| | | | | | | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39894 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: various dwc (OTG) driver fixupsImre Kaloz2014-03-128-95/+442
| | | | | | | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39892 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: ethernet - clean up tx descs only when neededFelix Fietkau2014-02-271-4/+8
| | | | | | | | | | | We already clean up tx descriptors in the napi eth_poll() function so it would likely be rare to run out of available descriptors in eth_xmit. Thus we can clean them up only when needed and return busy only when we still don't have enough. Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39762 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: ethernet - resolve SMP issueFelix Fietkau2014-02-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The combination of r35942 and r35952 causes an issue where eth_schedule_poll() can be called from a different CPU between the call to napi_complete() and the setting of cur_index which can break the rx ring accounting and cause ethernet latency and/or ethernet stalls. The issue can be easilly created by adding a couple of artificial delays such as: @@ -715,6 +715,7 @@ static int eth_poll(struct napi_struct *napi, int budget) if (!received) { napi_complete(napi); +udelay(1000); enable_irq(IRQ_CNS3XXX_SW_R0RXC); } @@ -727,6 +728,7 @@ static int eth_poll(struct napi_struct *napi, int budget) rx_ring->cur_index = i; wmb(); +udelay(1000); enable_rx_dma(sw); return received; This patch moves the setting of cur_index back up where it needs to be and addresses the original corner case that r35942 was trying to catch in an improved fashion by checking to see if the rx descriptor ring has become full before interrupts were re-enabled so that a poll can be scheduled again and avoid an rx stall caused by rx interrupts ceasing to fire again. Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39761 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: add pushbutton GPIO for GW2380/82/83Imre Kaloz2013-11-101-0/+3
| | | | | | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38702 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix USB ehci/ohci platform driverFelix Fietkau2013-04-101-3/+51
| | | | | | | | | | | Update ehci/ohci driver registration to conform to the new platform drivers. This fixes missing USB host support in 3.8.x Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36309 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: remove the watchdog IRQ from the resources, it breaks the driver ↵Felix Fietkau2013-04-071-5/+0
| | | | | | | | init and is useful only for testing Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36241 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: ethernet - clean the tx ring before refilling the rx ring to reduce ↵Felix Fietkau2013-03-111-4/+4
| | | | | | memory pressure git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35953 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: ethernet - clean the tx ring only in the poll function, not in the ↵Felix Fietkau2013-03-111-6/+11
| | | | | | xmit handler git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35952 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: increase number of ethernet driver rx buffersFelix Fietkau2013-03-101-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35951 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: prevent the ethernet driver from accessing uninitialized dma ↵Felix Fietkau2013-03-101-1/+2
| | | | | | descriptor entries git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35950 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: minor ethernet driver cleanupFelix Fietkau2013-03-101-35/+19
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35949 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: use kmalloc instead of kzalloc for ethernet rx buffersFelix Fietkau2013-03-101-1/+1
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35943 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix an rx irq handling corner caseFelix Fietkau2013-03-101-5/+5
| | | | | | | | | | | | | | | | When an rx interrupt comes in, rx interrupts are disabled and NAPI polling is scheduled. During the NAPI poll, the driver first processes received frames in the ring, then fills the dma descriptor slots with new buffers and calls tx complete, before finally re-enabling rx interrupts and completing NAPI (if below the budget). If the hardware rx queue overflows before the napi complete is called, the hardware will not throw any further rx interrupts and rx processing stops completely. Fix this by keeping NAPI polling scheduled until it completes a poll without receiving any packets, and also handle NAPI completion before refilling rx or completing tx. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35942 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix ethernet driver memory barrier usageFelix Fietkau2013-03-101-5/+8
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35941 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: reduce buffer allocation size to 2048 bytes, improves ethernet ↵Felix Fietkau2013-03-101-1/+1
| | | | | | performance git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35917 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: add linux 3.8 support and use it by defaultFelix Fietkau2013-03-097-24/+25
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35908 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: clean up PCI bus topologyImre Kaloz2013-01-101-2/+2
| | | | | | | | | This makes the PCI bus topology more standard for devices behind a bridge Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35078 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: add nol2x0 cmdline to disable l2x0 cacheImre Kaloz2012-12-231-2/+0
| | | | | | | | | | | | L2 cache via L2X0 cache controller available on some ARM boards can provide a performance boost in some situations but decrease performance in others. This adds a kernel cmdline to disable L2X0 for cns3xxx based boards. Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34874 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: fix dwc_otg driver compat with udc-coreFlorian Fainelli2012-12-041-83/+0
| | | | | | | | | | | function. This removes those from the dwc_otg driver and removes the patch that comments out the linkage of udc-core so that the dwc_otg driver can co-exist happily with other USB Device Controllers. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34475 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: split spi patch, follow mainline file namingImre Kaloz2012-11-121-0/+449
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34168 3c298f89-4303-0410-b956-a3cf2f4a3e73
* [cns3xxx]: split the i2c patch, merge the retry fixupImre Kaloz2012-11-121-0/+396
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34167 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: convert dwc_otg patches to filesLuka Perkov2012-11-1118-0/+22666
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34162 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: convert ethernet patches to filesLuka Perkov2012-11-113-0/+1378
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34161 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: exit from laguna late_initcall if not running on laguna boardLuka Perkov2012-11-081-0/+3
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34120 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: add PPS support for lagunaImre Kaloz2012-11-081-0/+20
| | | | | | | | | | | Many Laguna products have on-board GPS with Pulse-per-second (PPS) support. This patch adds kernel support (statically) and adds the platform data in laguna board support. Signed-off-by: Tim Harvey <tharvey@gateworks.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34115 3c298f89-4303-0410-b956-a3cf2f4a3e73
* cns3xxx: use files directoryLuka Perkov2012-11-0610-0/+1907
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34101 3c298f89-4303-0410-b956-a3cf2f4a3e73