Re: [OpenWrt-Devel] [PATCH v3] ramips: Add support for Xiaomi MiWiFi Nano

2016-03-18 Thread Noble Pepper
On Thu, 2016-03-17 at 18:50 +0100, John Crispin wrote:
> 
> On 17/03/2016 17:38, Reinhard Max wrote:
> > Hi,
> > 
> > On Sun, 13 Mar 2016 at 22:22, Noble Pepper wrote:
> > 
> >> +gpio-export {
> >> +compatible = "gpio-export";
> >> +#size-cells = <0>;
> >> +
> >> +gpio11 {
> >> +/* blue led */
> >> +gpio-export,name = "gpio11";
> >> +gpio-export,direction_may_change = <1>;
> >> +gpio-export,output = <1>;
> >> +gpios = <&gpio0 11 0>;
> >> +};
> >> +
> >> +gpio37 {
> >> +/* red led */
> >> +gpio-export,name = "gpio37";
> >> +gpio-export,direction_may_change = <1>;
> >> +gpio-export,output = <1>;
> >> +gpios = <&gpio1 5 0>;
> >> +};
> >> +
> >> +gpio44 {
> >> +/* yellow led */
> >> +gpio-export,name = "gpio44";
> >> +gpio-export,direction_may_change = <1>;
> >> +gpio-export,output = <1>;
> >> +gpios = <&gpio1 12 0>;
> >> +};
> >> +};
> > 
> > shouldn't LEDs be represented as what they really are in the device tree
> > (compatible = "gpio-leds";) rather than exported GPIOs.
> > 
> > 
> > cu
> > Reinhard
> 
> 
> i missed that, please send a patch to fix the dts file i merged
> 
>   John
> 
I'll put one together, hopefully by tomorrow.

I noticed that I left he Nano image out of the default build group as
well I will correct this too. 

Thanks

> > ___
> > openwrt-devel mailing list
> > openwrt-devel@lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] oxnas: add spinlock in pinctrl driver

2016-03-18 Thread Daniel Golle
Try to address a race-condition in pinctrl-oxnas.c

Signed-off-by: Daniel Golle 
---
 .../linux/oxnas/files/drivers/pinctrl/pinctrl-oxnas.c  | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/target/linux/oxnas/files/drivers/pinctrl/pinctrl-oxnas.c 
b/target/linux/oxnas/files/drivers/pinctrl/pinctrl-oxnas.c
index aa76f40..034a730 100644
--- a/target/linux/oxnas/files/drivers/pinctrl/pinctrl-oxnas.c
+++ b/target/linux/oxnas/files/drivers/pinctrl/pinctrl-oxnas.c
@@ -26,6 +26,7 @@
 #include 
 /* Since we request GPIOs from ourself */
 #include 
+#include 
 #include 
 
 #include "core.h"
@@ -41,6 +42,7 @@ struct oxnas_gpio_chip {
void __iomem*regbase;  /* GPIOA/B virtual address */
void __iomem*ctrlbase; /* SYS/SEC_CTRL virtual address */
struct irq_domain   *domain;   /* associated irq domain */
+   spinlock_t  lock;
 };
 
 #define to_oxnas_gpio_chip(c) container_of(c, struct oxnas_gpio_chip, chip)
@@ -1145,12 +1147,17 @@ static void gpio_irq_mask(struct irq_data *d)
void __iomem*pio = oxnas_gpio->regbase;
unsignedmask = 1 << d->hwirq;
unsignedtype = irqd_get_trigger_type(d);
+   unsigned long   flags;
 
-   /* FIXME: need proper lock */
+   if (!(type & IRQ_TYPE_EDGE_BOTH))
+   return;
+
+   spin_lock_irqsave(&oxnas_gpio->lock, flags);
if (type & IRQ_TYPE_EDGE_RISING)
oxnas_register_clear_mask(pio + RE_IRQ_ENABLE, mask);
if (type & IRQ_TYPE_EDGE_FALLING)
oxnas_register_clear_mask(pio + FE_IRQ_ENABLE, mask);
+   spin_unlock_irqrestore(&oxnas_gpio->lock, flags);
 }
 
 static void gpio_irq_unmask(struct irq_data *d)
@@ -1159,12 +1166,17 @@ static void gpio_irq_unmask(struct irq_data *d)
void __iomem*pio = oxnas_gpio->regbase;
unsignedmask = 1 << d->hwirq;
unsignedtype = irqd_get_trigger_type(d);
+   unsigned long   flags;
+
+   if (!(type & IRQ_TYPE_EDGE_BOTH))
+   return;
 
-   /* FIXME: need proper lock */
+   spin_lock_irqsave(&oxnas_gpio->lock, flags);
if (type & IRQ_TYPE_EDGE_RISING)
oxnas_register_set_mask(pio + RE_IRQ_ENABLE, mask);
if (type & IRQ_TYPE_EDGE_FALLING)
oxnas_register_set_mask(pio + FE_IRQ_ENABLE, mask);
+   spin_unlock_irqrestore(&oxnas_gpio->lock, flags);
 }
 
 
@@ -1359,6 +1371,8 @@ static int oxnas_gpio_probe(struct platform_device *pdev)
 
oxnas_chip->chip = oxnas_gpio_template;
 
+   spin_lock_init(&oxnas_chip->lock);
+
chip = &oxnas_chip->chip;
chip->of_node = np;
chip->label = dev_name(&pdev->dev);
-- 
2.7.2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] cns3xxx: DMA failed to stop in 10ms immediately following 4.4 kernel bump

2016-03-18 Thread Pushpal Sidhu
Immediately following the 4.4 kernel bump for cns3xxx (9db4b26), I
started getting "ath: phy0: DMA failed to stop in 10 ms
AR_CR=0x0024 AR_DIAG_SW=0x42100020 DMADBG_7=0x62c0" with many
different mini-PCI cards, but not with mini-PCIe cards.

I noticed some DMA work, but mainly on the Ethernet driver. Was
something potentially introduced when bumping from 3.18 to 4.4? What
can we do to fix this?

- Pushpal
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] SVN server

2016-03-18 Thread Shankar Unni
On Fri, Mar 18, 2016 at 6:33 AM, John Crispin  wrote:

> the following SVN server will be online for the next 4-6 weeks. please
> start migrating away from SVN now. we will give 1 week prior notice
> before finally turning it of.
>
> --> svn://svn.mein.io/openwrt

Thank you so much. We'll get on it right away!
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer

2016-03-18 Thread Matthias Schiffer
On 03/16/2016 01:06 PM, John Crispin wrote:
> The OpenWrt developers are proud to announce the minor fix release of
> OpenWrt Chaos Calmer.
> 
>___ __
>  |   |.-.-.-.|  |  |  |..|  |_
>  |   -   ||  _  |  -__| ||  |  |  ||   _||   _|
>  |___||   __|_|__|__||||__|  ||
>   |__| W I R E L E S S   F R E E D O M
>  -
>  CHAOS CALMER (15.05.1)
>  -
>   * 1 1/2 oz GinShake with a glassful
>   * 1/4 oz Triple Sec   of broken ice and pour
>   * 3/4 oz Lime Juice   unstrained into a goblet.
>   * 1 1/2 oz Orange Juice
>   * 1 tsp. Grenadine Syrup
>  -
> 
>  -
> http://downloads.openwrt.org/chaos_calmer/15.05.1/
> 
> 
> ** Highlights since Chaos Calmer 15.05 **
> 
> * Linux kernel updated to version 3.18.23

Great work! :)

One note about the kernel version: 3.18.23 is a very unfortunate choice, as
it contains a regression causing nondeterministic boot hangs (caused by a
faulty backport), which is very easy to trigger on some hardware. This has
been fixed in 3.18.24 (see [1]).

Regards,
Matthias

[1]
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/?h=v3.18.24




signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 15.05.1 - Chaos Calmer

2016-03-18 Thread Phil Armstrong

>/* Linux kernel updated to version 3.18.23 />
Great work! :)

One note about the kernel version: 3.18.23 is a very unfortunate choice, as
it contains a regression causing nondeterministic boot hangs (caused by a
faulty backport), which is very easy to trigger on some hardware. This has
been fixed in 3.18.24 (see [1]).


15.05.1 certainly seems to have bricked my DGND3700v1. A TTL serial<->USB
adaptor is in the post to see if I can resurrect it.

cheers, Phil

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Where init scripts are linked to rc.d?

2016-03-18 Thread Weedy
On Sat, Feb 27, 2016 at 3:38 AM, Jakub JanĨo  wrote:
> On Sat, Feb 27, 2016 at 2:12 AM, alzhao  wrote:
>> Use /etc/init.d/yourscript enable
>>
>> It should be enabled by default, as I know.
> Where do you put this command? I dont want do any tweaks after image is built.

/etc/rc.local
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel