-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
drivers: sam: update PLL ready time, add driver for pit64b #7103
base: master
Are you sure you want to change the base?
Conversation
core/drivers/microchip_pit.c
Outdated
#include <drivers/clk_dt.h> | ||
#include <string.h> | ||
|
||
#define MCHP_PIT64B_FREQ 5000000UL /* 5 MHz */ |
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.
prefer UM(5000000)
break; | ||
} | ||
|
||
if (!parent) |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
||
res = clk_dt_get_by_name(fdt, node, "gclk", &gclk); | ||
if (res) | ||
return res; |
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.
For consistency, I suggest to get the clock first, then to act on clocks:
res = clk_dt_get_by_name(fdt, node, "pclk", &pclk);
if (res)
return res;
- res = clk_enable(pclk);
- if (res)
- panic();
-
res = clk_dt_get_by_name(fdt, node, "gclk", &gclk);
if (res)
return res;
+ res = clk_enable(pclk);
+ if (res)
+ panic();
+
#include <assert.h> | ||
#include <drivers/clk.h> | ||
#include <drivers/clk_dt.h> | ||
#include <string.h> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
39f47aa
to
2ce7559
Compare
@etienne-lms updated according to the comments, thank you very much. |
This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
2ce7559
to
d60f253
Compare
The start-up time (simulation data) of sama7g5 PLL is 50us in condition reaching 95% of target frequency. The PLL lock status bit is not set a few times with current timeout setting. Extend the time to make sure the check is successful for any cases. Signed-off-by: Tony Han <[email protected]>
Add support for the peripheral PIT64B in sama7g54. In the driver the clocks are initialized for PIT64B. Signed-off-by: Tony Han <[email protected]>
rebsed on the master branch. |
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.
Acked-by: Etienne Carriere <[email protected]>
No description provided.