Skip to content

Commit

Permalink
trngpsx: use correct format specifier
Browse files Browse the repository at this point in the history
As the trngpsx address is greater than 32-bit, use correct format
specifier of %lx instead of %x while formatting the address. Usage
of %x was causing the value to get truncated to 32-bit on windows
platforms.

Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Acked-by: Appana Durga Kedareswara rao <[email protected]>
  • Loading branch information
sivadur authored and Siva Addepalli committed Mar 27, 2024
1 parent f4977a9 commit fb17800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trngpsx/data/trngpsx.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ proc trngpsx_generate {drv_handle} {
return
}
for {set instance 0} {$instance < $pki_num_insts} {incr instance} {
set instance_base_addr [format %x [expr $pki_trng_baseaddress + [expr {$instance * $pki_trng_offset}]]]
set instance_base_addr [format %lx [expr $pki_trng_baseaddress + [expr {$instance * $pki_trng_offset}]]]
set instance_node_label "psx_pki_trng${instance}"
set trng_node [create_node -l $instance_node_label -n "psx_pki_trng" -u $instance_base_addr -d "pcw.dtsi" -p "&amba"]
add_prop $trng_node "compatible" "xlnx,psx-pmc-trng-11.0" string "pcw.dtsi"
Expand Down

0 comments on commit fb17800

Please sign in to comment.