Skip to content

Add missing aliases for FSMC#334

Open
Archerist wants to merge 2 commits intozephyrproject-rtos:mainfrom
Archerist:main
Open

Add missing aliases for FSMC#334
Archerist wants to merge 2 commits intozephyrproject-rtos:mainfrom
Archerist:main

Conversation

@Archerist
Copy link

Zephyr MEMC drivers use these macros and they are missing in the LL_FSMC header, so i added them here.

cc @mathieuchopstm

Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

Please also update the following to depend on CONFIG_USE_STM32_LL_FMC:

zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FSMC drivers/src/stm32f4xx_ll_fsmc.c)

Comment on lines +59 to +61
*Add missing aliases for FSMC
Impacted files:
drivers/include/stm32f4xx_ll_fsmc.h
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small reword + add internal report reference:

Suggested change
*Add missing aliases for FSMC
Impacted files:
drivers/include/stm32f4xx_ll_fsmc.h
*Add missing FSMC -> FMC compatibility aliases
Impacted files:
drivers/include/stm32f4xx_ll_fsmc.h
ST Internal Reference: 223859

Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

Also in

- name: FMC
match: "^FMC_(?:NL|NADV|CLK|NBL[0-3]|A\\d+|D\\d+|NE[1-4]|NOE|NWE|NWAIT|NCE|INT|SDCLK|SDNWE|SDCKE[0-1]|SDNE[0-1]|SDNRAS|SDNCAS|ALE|CLE)$"
bias: pull-up
slew-rate: very-high-speed

- - name: FMC
-   match: "^FMC_(?:NL|NADV|CLK|NBL[0-3]|A\\d+|D\\d+|NE[1-4]|NOE|NWE|NWAIT|NCE|INT|SDCLK|SDNWE|SDCKE[0-1]|SDNE[0-1]|SDNRAS|SDNCAS|ALE|CLE)$"
+ - name: FMC / FSMC
+   match: "^FS?MC_(?:NL|NADV|CLK|NBL[0-3]|A\\d+|D\\d+|NE[1-4]|NOE|NWE|NWAIT|NCE|INT|SDCLK|SDNWE|SDCKE[0-1]|SDNE[0-1]|SDNRAS|SDNCAS|ALE|CLE)$"
   bias: pull-up
   slew-rate: very-high-speed

then run genpinctrl.py and commit the changes in a separate commit

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Thanks for sharing this.

Aside from @mathieuchopstm's comment, please:

  • rework commit messages (see Zephyr repo guidelines for this)
  • remove commit on pinctrl. Let's do it in a later commit

Add missing aliases from the ll_fsmc.h for Zephyr's memc driver.
Signed-off-by: Yunus Çemberci <yunuscemberci@gmail.com>
For new aliases to work ll_fsmc.c needs to be included as well

Signed-off-by: Yunus Çemberci <44519052+Archerist@users.noreply.github.com>
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FMC drivers/src/stm32f4xx_ll_fmc.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FMPI2C drivers/src/stm32f4xx_ll_fmpi2c.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FSMC drivers/src/stm32f4xx_ll_fsmc.c)
zephyr_library_sources_ifdef(CONFIG_USE_STM32_LL_FMC drivers/src/stm32f4xx_ll_fsmc.c)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpicking: move this just above FMPI2C to keep alphabetical order.

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.

4 participants