generic: rtl8366: add rtl8366_smi_write_reg_noack helper
[openwrt.git] / target / linux / generic / files / drivers / net / phy / rtl8366rb.c
index c953681..d6a9ece 100644 (file)
@@ -246,8 +246,8 @@ static int rtl8366rb_reset_chip(struct rtl8366_smi *smi)
        int timeout = 10;
        u32 data;
 
-       rtl8366_smi_write_reg(smi, RTL8366RB_RESET_CTRL_REG,
-                             RTL8366RB_CHIP_CTRL_RESET_HW);
+       rtl8366_smi_write_reg_noack(smi, RTL8366RB_RESET_CTRL_REG,
+                                   RTL8366RB_CHIP_CTRL_RESET_HW);
        do {
                msleep(1);
                if (rtl8366_smi_read_reg(smi, RTL8366RB_RESET_CTRL_REG, &data))
@@ -1116,7 +1116,7 @@ static int rtl8366rb_switch_init(struct rtl8366_smi *smi)
        dev->ports = RTL8366RB_NUM_PORTS;
        dev->vlans = RTL8366RB_NUM_VIDS;
        dev->ops = &rtl8366_ops;
-       dev->devname = dev_name(smi->parent);
+       dev->alias = dev_name(smi->parent);
 
        err = register_switch(dev, NULL);
        if (err)
@@ -1247,6 +1247,9 @@ static int __devinit rtl8366rb_probe(struct platform_device *pdev)
 
        smi->gpio_sda = pdata->gpio_sda;
        smi->gpio_sck = pdata->gpio_sck;
+       smi->clk_delay = 10;
+       smi->cmd_read = 0xa9;
+       smi->cmd_write = 0xa8;
        smi->ops = &rtl8366rb_smi_ops;
        smi->cpu_port = RTL8366RB_PORT_NUM_CPU;
        smi->num_ports = RTL8366RB_NUM_PORTS;
This page took 0.033945 seconds and 4 git commands to generate.