Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TonyHan11
Copy link
Contributor

No description provided.

#include <drivers/clk_dt.h>
#include <string.h>

#define MCHP_PIT64B_FREQ 5000000UL /* 5 MHz */
Copy link
Contributor

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.


res = clk_dt_get_by_name(fdt, node, "gclk", &gclk);
if (res)
return res;
Copy link
Contributor

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.

@TonyHan11
Copy link
Contributor Author

@etienne-lms updated according to the comments, thank you very much.

Copy link

github-actions bot commented Dec 7, 2024

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.

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]>
@TonyHan11
Copy link
Contributor Author

rebsed on the master branch.

Copy link
Contributor

@etienne-lms etienne-lms left a 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]>

@github-actions github-actions bot removed the Stale label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants