mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
net: rk29_vmac: support rk30
This commit is contained in:
@@ -1044,8 +1044,16 @@ int vmac_open(struct net_device *dev)
|
||||
|
||||
//set rmii ref clock 50MHz
|
||||
mac_clk = clk_get(NULL, "mac_ref_div");
|
||||
if (IS_ERR(mac_clk))
|
||||
mac_clk = NULL;
|
||||
arm_clk = clk_get(NULL, "arm_pll");
|
||||
mac_parent = clk_get_parent(mac_clk);
|
||||
if (IS_ERR(arm_clk))
|
||||
arm_clk = NULL;
|
||||
if (mac_clk) {
|
||||
mac_parent = clk_get_parent(mac_clk);
|
||||
if (IS_ERR(mac_parent))
|
||||
mac_parent = NULL;
|
||||
}
|
||||
if (arm_clk && mac_parent && (arm_clk == mac_parent))
|
||||
wake_lock(&idlelock);
|
||||
|
||||
@@ -1184,8 +1192,16 @@ int vmac_close(struct net_device *dev)
|
||||
|
||||
//clock close
|
||||
mac_clk = clk_get(NULL, "mac_ref_div");
|
||||
mac_parent = clk_get_parent(mac_clk);
|
||||
if (IS_ERR(mac_clk))
|
||||
mac_clk = NULL;
|
||||
if (mac_clk) {
|
||||
mac_parent = clk_get_parent(mac_clk);
|
||||
if (IS_ERR(mac_parent))
|
||||
mac_parent = NULL;
|
||||
}
|
||||
arm_clk = clk_get(NULL, "arm_pll");
|
||||
if (IS_ERR(arm_clk))
|
||||
arm_clk = NULL;
|
||||
|
||||
if (arm_clk && mac_parent && (arm_clk == mac_parent))
|
||||
wake_unlock(&idlelock);
|
||||
|
||||
@@ -31,7 +31,11 @@
|
||||
#define VMAC_VERSION "1.0"
|
||||
|
||||
/* Buffer descriptors */
|
||||
#ifdef CONFIG_ARCH_RK29
|
||||
#define TX_BDT_LEN 16 /* Number of receive BD's */
|
||||
#else
|
||||
#define TX_BDT_LEN 255 /* Number of receive BD's */
|
||||
#endif
|
||||
#define RX_BDT_LEN 255 /* Number of transmit BD's */
|
||||
|
||||
/* BD poll rate, in 1024 cycles. @100Mhz: x * 1024 cy * 10ns = 1ms */
|
||||
|
||||
Reference in New Issue
Block a user