Skip to content

Commit

Permalink
axiethernet: Correct reg property
Browse files Browse the repository at this point in the history
Correct reg property generated in axi ethernet DT node. Update this
property value to be 32 bit only for microblaze.

Signed-off-by: Suraj Gupta <[email protected]>
Acked-by: Harini Katakam <[email protected]>
  • Loading branch information
Suraj Gupta authored and Siva Addepalli committed Mar 23, 2024
1 parent 3582ea4 commit 61fd8a9
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions axi_ethernet/data/axi_ethernet.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -863,32 +863,32 @@
set size [format 0x%x [expr {${high} - ${base} + 1}]]

set proctype [get_hw_family]
if {[is_zynqmp_platform $proctype]} {
if {[regexp -nocase {0x([0-9a-f]{9})} "$base" match]} {
set temp $base
set temp [string trimleft [string trimleft $temp 0] x]
set len [string length $temp]
set rem [expr {${len} - 8}]
set high_base "0x[string range $temp $rem $len]"
set low_base "0x[string range $temp 0 [expr {${rem} - 1}]]"
set low_base [format 0x%08x $low_base]
if {[regexp -nocase {0x([0-9a-f]{9})} "$size" match]} {
set temp $size
set temp [string trimleft [string trimleft $temp 0] x]
set len [string length $temp]
set rem [expr {${len} - 8}]
set high_size "0x[string range $temp $rem $len]"
set low_size "0x[string range $temp 0 [expr {${rem} - 1}]]"
set low_size [format 0x%08x $low_size]
set reg "$low_base $high_base $low_size $high_size"
} else {
set reg "$low_base $high_base 0x0 $size"
}
} else {
set reg "0x0 $base 0x0 $size"
}
if {[regexp -nocase {0x([0-9a-f]{9})} "$base" match]} {
set temp $base
set temp [string trimleft [string trimleft $temp 0] x]
set len [string length $temp]
set rem [expr {${len} - 8}]
set high_base "0x[string range $temp $rem $len]"
set low_base "0x[string range $temp 0 [expr {${rem} - 1}]]"
set low_base [format 0x%08x $low_base]
if {[regexp -nocase {0x([0-9a-f]{9})} "$size" match]} {
set temp $size
set temp [string trimleft [string trimleft $temp 0] x]
set len [string length $temp]
set rem [expr {${len} - 8}]
set high_size "0x[string range $temp $rem $len]"
set low_size "0x[string range $temp 0 [expr {${rem} - 1}]]"
set low_size [format 0x%08x $low_size]
set reg "$low_base $high_base $low_size $high_size"
} else {
set reg "$low_base $high_base 0x0 $size"
}
} else {
set reg "$base $size"
if {[string match -nocase $proctype "microblaze"] } {
set reg "$base $size"
} else {
set reg "0x0 $base 0x0 $size"
}
}
add_prop $node "reg" $reg hexint "pl.dtsi"
set label [split $node ":"]
Expand Down

0 comments on commit 61fd8a9

Please sign in to comment.