OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 1399... Line 1399...
1399 { 1399 {
1400 struct switch_dev *dev = &smi->sw_dev; 1400 struct switch_dev *dev = &smi->sw_dev;
1401 int err; 1401 int err;
Line 1402... Line 1402...
1402   1402  
1403 dev->name = "RTL8367B"; 1403 dev->name = "RTL8367B";
1404 dev->cpu_port = smi->cpu_port; 1404 dev->cpu_port = RTL8367B_CPU_PORT_NUM;
1405 dev->ports = RTL8367B_NUM_PORTS; 1405 dev->ports = RTL8367B_NUM_PORTS;
1406 dev->vlans = RTL8367B_NUM_VIDS; 1406 dev->vlans = RTL8367B_NUM_VIDS;
1407 dev->ops = &rtl8367b_sw_ops; 1407 dev->ops = &rtl8367b_sw_ops;
Line 1525... Line 1525...
1525 { 1525 {
1526 struct rtl8366_smi *smi; 1526 struct rtl8366_smi *smi;
1527 int err; 1527 int err;
Line 1528... Line 1528...
1528   1528  
1529 smi = rtl8366_smi_probe(pdev); 1529 smi = rtl8366_smi_probe(pdev);
1530 if (IS_ERR(smi)) 1530 if (!smi)
Line 1531... Line 1531...
1531 return PTR_ERR(smi); 1531 return -ENODEV;
1532   1532  
1533 smi->clk_delay = 1500; 1533 smi->clk_delay = 1500;
1534 smi->cmd_read = 0xb9; 1534 smi->cmd_read = 0xb9;
-   1535 smi->cmd_write = 0xb8;
1535 smi->cmd_write = 0xb8; 1536 smi->ops = &rtl8367b_smi_ops;
1536 smi->ops = &rtl8367b_smi_ops; -  
1537 smi->num_ports = RTL8367B_NUM_PORTS; -  
1538 if (of_property_read_u32(pdev->dev.of_node, "cpu_port", &smi->cpu_port) -  
1539 || smi->cpu_port >= smi->num_ports) 1537 smi->cpu_port = RTL8367B_CPU_PORT_NUM;
1540 smi->cpu_port = RTL8367B_CPU_PORT_NUM; 1538 smi->num_ports = RTL8367B_NUM_PORTS;
1541 smi->num_vlan_mc = RTL8367B_NUM_VLANS; 1539 smi->num_vlan_mc = RTL8367B_NUM_VLANS;
Line 1542... Line 1540...
1542 smi->mib_counters = rtl8367b_mib_counters; 1540 smi->mib_counters = rtl8367b_mib_counters;
Line 1585... Line 1583...
1585 } 1583 }
Line 1586... Line 1584...
1586   1584  
1587 #ifdef CONFIG_OF 1585 #ifdef CONFIG_OF
1588 static const struct of_device_id rtl8367b_match[] = { 1586 static const struct of_device_id rtl8367b_match[] = {
-   1587 { .compatible = "realtek,rtl8367b" },
1589 { .compatible = "realtek,rtl8367b" }, 1588 { .compatible = "rtl8367b" },
1590 {}, 1589 {},
1591 }; 1590 };
1592 MODULE_DEVICE_TABLE(of, rtl8367b_match); 1591 MODULE_DEVICE_TABLE(of, rtl8367b_match);