Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340596
b: refs/heads/master
c: 6b60393
h: refs/heads/master
v: v3
  • Loading branch information
Richard Cochran authored and David S. Miller committed Nov 1, 2012
1 parent 222a6ec commit 038b07b
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: 87c0e764d43aca7f8bae8bfa86c50fa715e80050
refs/heads/master: 6b60393e08f9263c7b129d54eeb261e8f970175c
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 @@ -16,6 +16,7 @@ Required properties:
- ale_entries : Specifies No of entries ALE can hold
- host_port_reg_ofs : Specifies host port register offset
- hw_stats_reg_ofs : Specifies hardware statistics register offset
- cpts_reg_ofs : Specifies the offset of the CPTS registers
- bd_ram_ofs : Specifies internal desciptor RAM offset
- bd_ram_size : Specifies internal descriptor RAM size
- rx_descs : Specifies number of Rx descriptors
Expand Down Expand Up @@ -52,6 +53,7 @@ Examples:
ale_entries = <1024>;
host_port_reg_ofs = <0x108>;
hw_stats_reg_ofs = <0x900>;
cpts_reg_ofs = <0xc00>;
bd_ram_ofs = <0x2000>;
bd_ram_size = <0x2000>;
no_bd_ram = <0>;
Expand Down Expand Up @@ -86,6 +88,7 @@ Examples:
ale_entries = <1024>;
host_port_reg_ofs = <0x108>;
hw_stats_reg_ofs = <0x900>;
cpts_reg_ofs = <0xc00>;
bd_ram_ofs = <0x2000>;
bd_ram_size = <0x2000>;
no_bd_ram = <0>;
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 @@ -912,6 +912,13 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
data->hw_stats_reg_ofs = prop;

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

if (of_property_read_u32(node, "bd_ram_ofs", &prop)) {
pr_err("Missing bd_ram_ofs property in the DT.\n");
ret = -EINVAL;
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 @@ -41,6 +41,7 @@ struct cpsw_platform_data {
u32 host_port_num; /* The port number for the host port */

u32 hw_stats_reg_ofs; /* cpsw hardware statistics counters */
u32 cpts_reg_ofs; /* cpts registers */

u32 bd_ram_ofs; /* embedded buffer descriptor RAM offset*/
u32 bd_ram_size; /*buffer descriptor ram size */
Expand Down

0 comments on commit 038b07b

Please sign in to comment.