Author: blogic
Date: 2014-09-01 15:21:23 +0200 (Mon, 01 Sep 2014)
New Revision: 42361

Added:
   
branches/barrier_breaker/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
Log:
lantiq: add support for xrx200 firmware depending on soc type

Signed-off-by: ?\195?\129lvaro Fern?\195?\161ndez Rojas <[email protected]>

Backport of r42182

Added: 
branches/barrier_breaker/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
===================================================================
--- 
branches/barrier_breaker/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
                           (rev 0)
+++ 
branches/barrier_breaker/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
   2014-09-01 13:21:23 UTC (rev 42361)
@@ -0,0 +1,27 @@
+--- a/arch/mips/lantiq/xway/xrx200_phy_fw.c
++++ b/arch/mips/lantiq/xway/xrx200_phy_fw.c
+@@ -24,7 +24,23 @@ static dma_addr_t xway_gphy_load(struct
+       void *fw_addr;
+       size_t size;
+ 
+-      if (of_property_read_string(pdev->dev.of_node, "firmware", &fw_name)) {
++      if (of_get_property(pdev->dev.of_node, "firmware1", NULL) || 
of_get_property(pdev->dev.of_node, "firmware2", NULL)) {
++              switch(ltq_soc_type()) {
++                      case SOC_TYPE_VR9:
++                              if (of_property_read_string(pdev->dev.of_node, 
"firmware1", &fw_name)) {
++                                      dev_err(&pdev->dev, "failed to load 
firmware filename\n");
++                                      return 0;
++                              }
++                              break;
++                      case SOC_TYPE_VR9_2:
++                              if (of_property_read_string(pdev->dev.of_node, 
"firmware2", &fw_name)) {
++                                      dev_err(&pdev->dev, "failed to load 
firmware filename\n");
++                                      return 0;
++                              }
++                              break;
++              }
++      }
++      else if (of_property_read_string(pdev->dev.of_node, "firmware", 
&fw_name)) {
+               dev_err(&pdev->dev, "failed to load firmware filename\n");
+               return 0;
+       }
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to