-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imx6ull: rngb driver #329
base: master
Are you sure you want to change the base?
imx6ull: rngb driver #329
Conversation
e2db24f
to
657ff8c
Compare
657ff8c
to
d093d50
Compare
d093d50
to
0a00b07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointed out some things which might be improved ;)
0a00b07
to
011cc1a
Compare
aff855f
to
6772360
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review, remarks for rngb_intr()
function.
6772360
to
2e40ab7
Compare
2e40ab7
to
86f7d40
Compare
86f7d40
to
cae9caf
Compare
cae9caf
to
f97a5a2
Compare
f97a5a2
to
8144e90
Compare
The driver starts by creating basic structures for a phonix driver. Then it sets flags for tests of rngb and seeding, sequentially. The last things is waiting for system messaga. JIRA: RTOS-317
4a0e286
to
dcf8a36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/* Run self test */ | ||
*(common_rngb.base + rng_cmd) = 0x1; | ||
mutexLock(common_rngb.lock); | ||
while (common_rngb.intr_st == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are waiting for whether the self-test has finished or failed and not for all statuses, so shouldn't it be?
while (common_rngb.intr_st == 0) { | |
while ((common_rngb.intr_st & (SELF_TEST_DONE | ERROR_OCCURRED)) == 0) { | |
/* Run seeding */ | ||
*(common_rngb.base + rng_cmd) = 0x2; | ||
mutexLock(common_rngb.lock); | ||
while (common_rngb.intr_st == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are waiting for whether the seeding has finished or failed and not for all statuses, so shouldn't it be?
while (common_rngb.intr_st == 0) { | |
while ((common_rngb.intr_st & (SEED_DONE | ERROR_OCCURRED)) == 0) { | |
} | ||
|
||
handleMsg(NULL); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System cleanup is missing, any required resources freeing - if handleMsg()
returns on msgRecv()
error, also return 0
is misleading if handleMsg()
terminates.
Add driver for rngb on imx6ull to support TRNG
Description
Motivation and Context
For imx6ull, trng wans't supported
Types of changes
How Has This Been Tested?
Checklist:
Special treatment