Hi Folks,
I have an oddity here. Bare metal system. SATA registers return NULL at all addresses. Should I be able to read the SATA registers (before any OS running, just early stages of booting)?
Is there anything that HAS to be initialised before the registers return anything? ATM I cannot see anything that has to be set, but registers always return NULL. Booting Linux confirms the HW is running. .. I need to control it BEFORE linux.
Any thoughts appreciated. MUST be doing something silly here..
Thanks
John
Solved! Go to Solution.
Hi Chip
Thanks for the code. I couldnt use it directly, but it did help me clarify the clock requirements for the SATA unit.
For what it is worth, If the SATA o/p of ENET_pll isnt enabled, and IOMUXC_GPR13 is not set correctly, Then the SATA registers will read as 0
Thanks
John
Hi John
I would recommend to check register
CCM CCM_CCGR5 (bits 5–4 sata clock (sata_clk_enable) ).
Also one can try attached baremetal example, based on SDK
Best regards
chip
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Chip
Answer appreciated, helpful in confirming what I've done, but not the
answer.
my issue:
At very start of raw code, just loaded by sd card loader:
Yes clocks are turned on in CCGR5. (whole reg is 0xffffffff)
Then I try reading 0x022000f8 (e.g.) before any mmu is on, i.e. physical
address and I get 0x0, as with all other sata regs.
This seems illogical, I would have expected to see something other than
0 in (at least) the version register at 0x22000f8
Am I being stupid, or do I need to set something else to at least have
some sata registers to interact with?
Thanks
John
Stop press! Just announced -
Free Standard Broadband for 6 months, unlimited data, and no minimum
contract
For full details of see http://www.JustAskJB.co.uk
<http://www.justaskjb.co.uk>
Intrigued? Call me
John Ballance C.Eng MIET - jwb@rosery.net - 07976 295923
Hi John
I think you can try SDK SATA example
with jtag (step by step) and check.
Best regards
chip
Hi Chip
Thanks for the code. I couldnt use it directly, but it did help me clarify the clock requirements for the SATA unit.
For what it is worth, If the SATA o/p of ENET_pll isnt enabled, and IOMUXC_GPR13 is not set correctly, Then the SATA registers will read as 0
Thanks
John