--- zzzz-none-000/linux-4.4.271/include/linux/mtd/spi-nor.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/linux/mtd/spi-nor.h 2023-04-19 10:22:30.000000000 +0000 @@ -12,6 +12,7 @@ #include #include +#include /* * Manufacturer IDs @@ -117,8 +118,6 @@ SNOR_F_USE_FSR = BIT(0), }; -struct mtd_info; - /** * struct spi_nor - Structure for defining a the SPI NOR layer * @mtd: point to a mtd_info structure @@ -185,6 +184,17 @@ void *priv; }; +static inline void spi_nor_set_flash_node(struct spi_nor *nor, + struct device_node *np) +{ + nor->flash_node = np; +} + +static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor) +{ + return nor->flash_node; +} + /** * spi_nor_scan() - scan the SPI NOR * @nor: the spi_nor structure @@ -201,4 +211,5 @@ */ int spi_nor_scan(struct spi_nor *nor, const char *name, enum read_mode mode); +int spi_nor_wait_till_ready(struct spi_nor *nor); #endif