Skip to content

Conversation

@benpicco
Copy link
Contributor

@benpicco benpicco commented Oct 23, 2019

This adds support for the flash peripheral found in the SAME5x/SAMD5x
line of MCUs.
The peripheral is very similar to the one found on SAMD2x with only a few register names changed.

Lock regions are different for each sam0 sub-family, so move them to DTS.

split off from #14685

@benpicco benpicco added area: Flash platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) labels Oct 23, 2019
@benpicco benpicco requested a review from galak October 23, 2019 10:53
@zephyrbot
Copy link

zephyrbot commented Oct 23, 2019

All checks passed.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@stephanosio stephanosio added this to the v2.2.0 milestone Nov 22, 2019
@stephanosio stephanosio self-requested a review December 11, 2019 13:53
@jhedberg
Copy link
Member

jhedberg commented Jan 7, 2020

Any update on this PR? It seems to lack at least codeowner reviews, so @nashif @galak @nvlsianpu please have a look.

As a general comment, it seems like there's existing issues with #if vs #ifdef usage in this driver which should be fixed. In fact, most of these can (and should) probably be updated to use if (IS_ENABLED(CONFIG...)) { to better catch compilation issues with all possible configurations.

Copy link
Contributor

@nvlsianpu nvlsianpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nip, I think using #ifdef-ry here is OK, although IS_ENABLED(CONFIG...) is more powerful it is still fine as switching macros have logic states exist or not exist.

This adds support for the flash peripheral found in the SAME5x/SAMD5x
line of MCUs.
The peripheral is very simmilar to the one found on SAMD2x with only
a few register names changed.

Signed-off-by: Benjamin Valentin <[email protected]>
The amount of lock regions differs between different sam0 MCUs.

	saml10:  2
	saml11:  4
	samd2x:	16
	saml2x: 16
	samd5x: 32

ASF does not provide a definition for this, so create a new one
in dts.

Signed-off-by: Benjamin Valentin <[email protected]>
@nashif nashif merged commit fc7f458 into zephyrproject-rtos:master Jan 14, 2020
@benpicco benpicco deleted the same54-flash branch January 14, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree area: Flash platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants