Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340597
b: refs/heads/master
c: 78ca0b2
h: refs/heads/master
i:
  340595: 222a6ec
v: v3
  • Loading branch information
Richard Cochran authored and David S. Miller committed Nov 1, 2012
1 parent 038b07b commit 4836909
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b60393e08f9263c7b129d54eeb261e8f970175c
refs/heads/master: 78ca0b287314ad6b7b06161b3ff9b13e8a8bcce0
3 changes: 3 additions & 0 deletions trunk/Documentation/devicetree/bindings/net/cpsw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Required properties:
- mac_control : Specifies Default MAC control register content
for the specific platform
- slaves : Specifies number for slaves
- cpts_active_slave : Specifies the slave to use for time stamping
- slave_reg_ofs : Specifies slave register offset
- sliver_reg_ofs : Specifies slave sliver register offset
- phy_id : Specifies slave phy id
Expand Down Expand Up @@ -60,6 +61,7 @@ Examples:
rx_descs = <64>;
mac_control = <0x20>;
slaves = <2>;
cpts_active_slave = <0>;
cpsw_emac0: slave@0 {
slave_reg_ofs = <0x200>;
sliver_reg_ofs = <0xd80>;
Expand Down Expand Up @@ -95,6 +97,7 @@ Examples:
rx_descs = <64>;
mac_control = <0x20>;
slaves = <2>;
cpts_active_slave = <0>;
cpsw_emac0: slave@0 {
slave_reg_ofs = <0x200>;
sliver_reg_ofs = <0xd80>;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,13 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
data->slaves = prop;

if (of_property_read_u32(node, "cpts_active_slave", &prop)) {
pr_err("Missing cpts_active_slave property in the DT.\n");
ret = -EINVAL;
goto error_ret;
}
data->cpts_active_slave = prop;

data->slave_data = kzalloc(sizeof(struct cpsw_slave_data) *
data->slaves, GFP_KERNEL);
if (!data->slave_data) {
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/platform_data/cpsw.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct cpsw_platform_data {

u32 slaves; /* number of slave cpgmac ports */
struct cpsw_slave_data *slave_data;
u32 cpts_active_slave; /* time stamping slave */

u32 ale_reg_ofs; /* address lookup engine reg offset */
u32 ale_entries; /* ale table size */
Expand Down

0 comments on commit 4836909

Please sign in to comment.