aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-09-10 16:39:19 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:17 -0500
commit276229d2a98975d0cca9637d1dfee6a9876b54c5 (patch)
treea7133b2ceeb4ad50c6d07a541ab74c10a1238fe5 /arch/mips
parent50128fe8164ba2c9e36bc5156eabdfd69225b7d2 (diff)
MIPS: lantiq: add support for xrx200 firmware depending on soc type
VR9 needs different firmware files for the various phy/soc revisions. Some boards are ship with older and newer SoC revisions. To be able to boot a single image on all versions we need to define both firmware files inside the devicetree. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/8045/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/lantiq/xway/xrx200_phy_fw.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/mips/lantiq/xway/xrx200_phy_fw.c b/arch/mips/lantiq/xway/xrx200_phy_fw.c
index d4d9d31f152e..7c1e54c6a36c 100644
--- a/arch/mips/lantiq/xway/xrx200_phy_fw.c
+++ b/arch/mips/lantiq/xway/xrx200_phy_fw.c
@@ -24,7 +24,28 @@ static dma_addr_t xway_gphy_load(struct platform_device *pdev)
24 void *fw_addr; 24 void *fw_addr;
25 size_t size; 25 size_t size;
26 26
27 if (of_property_read_string(pdev->dev.of_node, "firmware", &fw_name)) { 27 if (of_get_property(pdev->dev.of_node, "firmware1", NULL) ||
28 of_get_property(pdev->dev.of_node, "firmware2", NULL)) {
29 switch (ltq_soc_type()) {
30 case SOC_TYPE_VR9:
31 if (of_property_read_string(pdev->dev.of_node,
32 "firmware1", &fw_name)) {
33 dev_err(&pdev->dev,
34 "failed to load firmware filename\n");
35 return 0;
36 }
37 break;
38 case SOC_TYPE_VR9_2:
39 if (of_property_read_string(pdev->dev.of_node,
40 "firmware2", &fw_name)) {
41 dev_err(&pdev->dev,
42 "failed to load firmware filename\n");
43 return 0;
44 }
45 break;
46 }
47 } else if (of_property_read_string(pdev->dev.of_node,
48 "firmware", &fw_name)) {
28 dev_err(&pdev->dev, "failed to load firmware filename\n"); 49 dev_err(&pdev->dev, "failed to load firmware filename\n");
29 return 0; 50 return 0;
30 } 51 }