Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81065
b: refs/heads/master
c: 9fb1e35
h: refs/heads/master
i:
  81063: c77bc19
v: v3
  • Loading branch information
Timur Tabi authored and Kumar Gala committed Dec 14, 2007
1 parent 153aae2 commit 66cd7fb
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 174b0da23199c4ae1ed06263dafd9a2e85e97d34
refs/heads/master: 9fb1e350e16164d56990dde036ae9c0a2fd3f634
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/boot/dts/mpc832x_mds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@
interrupts = <22>;
interrupt-parent = < &qeic >;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <19>;
tx-clock = <1a>;
rx-clock-name = "clk9";
tx-clock-name = "clk10";
phy-handle = < &phy3 >;
pio-handle = < &pio3 >;
};
Expand All @@ -244,8 +244,8 @@
interrupts = <23>;
interrupt-parent = < &qeic >;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <17>;
tx-clock = <18>;
rx-clock-name = "clk7";
tx-clock-name = "clk8";
phy-handle = < &phy4 >;
pio-handle = < &pio4 >;
};
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/boot/dts/mpc832x_rdb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@
interrupts = <21>;
interrupt-parent = <&qeic>;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <20>;
tx-clock = <13>;
rx-clock-name = "clk16";
tx-clock-name = "clk3";
phy-handle = <&phy00>;
pio-handle = <&ucc2pio>;
};
Expand All @@ -225,8 +225,8 @@
interrupts = <22>;
interrupt-parent = <&qeic>;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <19>;
tx-clock = <1a>;
rx-clock-name = "clk9";
tx-clock-name = "clk10";
phy-handle = <&phy04>;
pio-handle = <&ucc3pio>;
};
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/boot/dts/mpc836x_mds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@
interrupts = <20>;
interrupt-parent = < &qeic >;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <0>;
tx-clock = <19>;
rx-clock-name = "none";
tx-clock-name = "clk9";
phy-handle = < &phy0 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio1 >;
Expand All @@ -276,8 +276,8 @@
interrupts = <21>;
interrupt-parent = < &qeic >;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <0>;
tx-clock = <14>;
rx-clock-name = "none";
tx-clock-name = "clk4";
phy-handle = < &phy1 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio2 >;
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/boot/dts/mpc8568mds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@
interrupts = <20>;
interrupt-parent = <&qeic>;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <0>;
tx-clock = <20>;
rx-clock-name = "none";
tx-clock-name = "clk16";
pio-handle = <&pio1>;
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
Expand All @@ -344,8 +344,8 @@
interrupts = <21>;
interrupt-parent = <&qeic>;
local-mac-address = [ 00 00 00 00 00 00 ];
rx-clock = <0>;
tx-clock = <20>;
rx-clock-name = "none";
tx-clock-name = "clk16";
pio-handle = <&pio2>;
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
Expand Down
55 changes: 51 additions & 4 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3822,6 +3822,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
int err, ucc_num, max_speed = 0;
const phandle *ph;
const unsigned int *prop;
const char *sprop;
const void *mac_addr;
phy_interface_t phy_interface;
static const int enet_to_speed[] = {
Expand Down Expand Up @@ -3854,10 +3855,56 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma

ug_info->uf_info.ucc_num = ucc_num;

prop = of_get_property(np, "rx-clock", NULL);
ug_info->uf_info.rx_clock = *prop;
prop = of_get_property(np, "tx-clock", NULL);
ug_info->uf_info.tx_clock = *prop;
sprop = of_get_property(np, "rx-clock-name", NULL);
if (sprop) {
ug_info->uf_info.rx_clock = qe_clock_source(sprop);
if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
(ug_info->uf_info.rx_clock > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid rx-clock-name property\n");
return -EINVAL;
}
} else {
prop = of_get_property(np, "rx-clock", NULL);
if (!prop) {
/* If both rx-clock-name and rx-clock are missing,
we want to tell people to use rx-clock-name. */
printk(KERN_ERR
"ucc_geth: missing rx-clock-name property\n");
return -EINVAL;
}
if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid rx-clock propperty\n");
return -EINVAL;
}
ug_info->uf_info.rx_clock = *prop;
}

sprop = of_get_property(np, "tx-clock-name", NULL);
if (sprop) {
ug_info->uf_info.tx_clock = qe_clock_source(sprop);
if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
(ug_info->uf_info.tx_clock > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid tx-clock-name property\n");
return -EINVAL;
}
} else {
prop = of_get_property(np, "rx-clock", NULL);
if (!prop) {
printk(KERN_ERR
"ucc_geth: mising tx-clock-name property\n");
return -EINVAL;
}
if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid tx-clock property\n");
return -EINVAL;
}
ug_info->uf_info.tx_clock = *prop;
}

err = of_address_to_resource(np, 0, &res);
if (err)
return -EINVAL;
Expand Down

0 comments on commit 66cd7fb

Please sign in to comment.