The void * dev_addr = sd->dd->mmio;
is restricted to the scope of the function power_mode_sleep (struct SysDesc *sd)
Hence the error.
Also, you are passing (u32*)dev_addr
as a parameter to power_mode_sleep
. Whereas, it expects a parameter of type struct SysDesc *