drivers: flash: replace DT_FLASH_DEV_NAME with DT macro
Replace DT_FLASH_DEV_NAME with DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL. We now set zephyr,flash-controller in the chosen node of the device tree to the flash controller device. NOTE: For a SoCs with on die flash, this points to the controller and not the 'soc-nv-flash' node. Typically the controller is the parent of the 'soc-nv-flash' node). Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
008f9c08a2
commit
7a15afc1d4
68 changed files with 237 additions and 71 deletions
|
@ -36,12 +36,25 @@
|
|||
* a label property, that property's value. Undefined otherwise.
|
||||
*/
|
||||
#define DT_CHOSEN_ZEPHYR_ENTROPY_LABEL ""
|
||||
|
||||
/**
|
||||
* @def DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL
|
||||
*
|
||||
* @brief If there is a chosen node zephyr,flash-controller property which has
|
||||
* a label property, that property's value. Undefined otherwise.
|
||||
*/
|
||||
#define DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL ""
|
||||
#endif /* DT_DOXYGEN */
|
||||
|
||||
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_entropy), label)
|
||||
#define DT_CHOSEN_ZEPHYR_ENTROPY_LABEL DT_LABEL(DT_CHOSEN(zephyr_entropy))
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_flash_controller), label)
|
||||
#define DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL \
|
||||
DT_LABEL(DT_CHOSEN(zephyr_flash_controller))
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue