From 61fd8a95390665e730404264e55519fd267820cb Mon Sep 17 00:00:00 2001 From: Suraj Gupta Date: Wed, 20 Mar 2024 21:50:49 -1200 Subject: [PATCH] axiethernet: Correct reg property 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 Acked-by: Harini Katakam --- axi_ethernet/data/axi_ethernet.tcl | 50 +++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/axi_ethernet/data/axi_ethernet.tcl b/axi_ethernet/data/axi_ethernet.tcl index 3c10e899..3176c450 100644 --- a/axi_ethernet/data/axi_ethernet.tcl +++ b/axi_ethernet/data/axi_ethernet.tcl @@ -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 ":"]