aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-09-01 13:21:23 +0000
committerJohn Crispin <blogic@openwrt.org>2014-09-01 13:21:23 +0000
commit23d136caddba110e10dab896b3fab45001a95376 (patch)
tree4683481818f0cc7c8a7071148e62f231f9998d4a
parenteb5be6dea22220e5deb2d4722ecaab3de31d3ba7 (diff)
downloadupstream-23d136caddba110e10dab896b3fab45001a95376.tar.gz
upstream-23d136caddba110e10dab896b3fab45001a95376.tar.bz2
upstream-23d136caddba110e10dab896b3fab45001a95376.zip
lantiq: add support for xrx200 firmware depending on soc type
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Backport of r42182 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@42361 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch b/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
new file mode 100644
index 0000000000..cf5e5cfba9
--- /dev/null
+++ b/target/linux/lantiq/patches-3.10/0210-lantiq-xrx200-firmware-multi-version.patch
@@ -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;
+ }