I'm confused about the smc_call, the regs[1] printed was always ffffffff when running the tfa_get_dram_size() routine cited from u-boot in flexbuild_lsdk2108,
it's also the case when regs0]=SMC_DRAM_BANK_INFO
Is there any precondition ( for CPU or SDRAM) should be mentioned when using smc_call?
phys_size_t tfa_get_dram_size(void)
{
struct pt_regs regs;
phys_size_t dram_size = 0;
regs.regs[0] = SMC_DRAM_BANK_INFO;
regs.regs[1] = -1;
smc_call(®s);
if (regs.regs[0])
return 0;
printf("regs[0]=%x regs[1]=%x\n",regs.regs[0],regs.regs[1]);
dram_size = regs.regs[1];
return dram_size;
}