[LS1046] smc_call cannot get the correct result

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[LS1046] smc_call cannot get the correct result

1,154件の閲覧回数
linxx
Contributor I
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(&regs);
    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;
}
0 件の賞賛
返信
0 返答(返信)