acassis commented on PR #18817: URL: https://github.com/apache/nuttx/pull/18817#issuecomment-4343845314
> I know that commenting on a PR is probably not the right place for this; this PR is all fine by me. > > But a little bit related to this PR - it would be nice, if there was some common place in NuttX source tree for SoC specific files/drivers which are not specific for a specific CPU architecture. For i.MX93/95 more or less every driver and header file is almost a copy of each other in "arm64" and "arm". Only because the SoC just happens to have both Cortex-A and Cortex-M cores, but all the memory maps and peripherals are the same. > > Of course, this is the way how we must do it now, when such place doesn't exist. Yes, happens to many stm32xx chips as well. But I think it remounts from the decision that Greg took in the past, where duplication is better than having small differences that end-up creating many #ifdefs inside the drivers. If you see the arch/arm/src/stm32/ you will notice it. Most of the drivers are shared between F1, F2, F3 and F4 and it makes the driver more complex to read and maintain. But for iMX93 and iMX95 maybe the driver are 100% compatible. Maybe in this case we could have arch/arm64/src/common/imx. In fact, Espressif guys already did it, see: arch/risc-v/src/common/espressif/ for reference. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
