diff mbox series

[2/3] flash.h: Remove CONFIG_SYS_FLASH_CFI from flash_info_t

Message ID 20210807050002.32723-2-bmeng.cn@gmail.com
State Accepted
Commit 74773a4f85221dceccbe92b0b3ae6daef75a141c
Delegated to: Stefan Roese
Headers show
Series [1/3] mtd: kconfig: Fix CFI_FLASH dependency | expand

Commit Message

Bin Meng Aug. 7, 2021, 5 a.m. UTC
Those embers wrapped with CONFIG_SYS_FLASH_CFI in struct flash_info_t
are unconditionally used in the cfi_flash.c driver.

Drop the #ifdefs in the definition of flash_info_t.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 include/flash.h | 2 --
 1 file changed, 2 deletions(-)

Comments

Stefan Roese Aug. 11, 2021, 8:34 a.m. UTC | #1
On 07.08.21 07:00, Bin Meng wrote:
> Those embers wrapped with CONFIG_SYS_FLASH_CFI in struct flash_info_t
> are unconditionally used in the cfi_flash.c driver.
> 
> Drop the #ifdefs in the definition of flash_info_t.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
> 
>   include/flash.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/flash.h b/include/flash.h
> index 42b18a6047..f3959f5012 100644
> --- a/include/flash.h
> +++ b/include/flash.h
> @@ -21,7 +21,6 @@ typedef struct {
>   	ulong	flash_id;		/* combined device & manufacturer code	*/
>   	ulong	start[CONFIG_SYS_MAX_FLASH_SECT];   /* virtual sector start address */
>   	uchar	protect[CONFIG_SYS_MAX_FLASH_SECT]; /* sector protection status	*/
> -#ifdef CONFIG_SYS_FLASH_CFI
>   	uchar	portwidth;		/* the width of the port		*/
>   	uchar	chipwidth;		/* the width of the chip		*/
>   	uchar	chip_lsb;		/* extra Least Significant Bit in the */
> @@ -45,7 +44,6 @@ typedef struct {
>   	ulong   addr_unlock2;		/* unlock address 2 for AMD flash roms  */
>   	uchar   sr_supported;		/* status register supported            */
>   	const char *name;		/* human-readable name	                */
> -#endif
>   #ifdef CONFIG_DM_MTD
>   	struct mtd_info *mtd;
>   #endif
> 


Viele Grüße,
Stefan
Stefan Roese Aug. 11, 2021, 10:45 a.m. UTC | #2
On 07.08.21 07:00, Bin Meng wrote:
> Those embers wrapped with CONFIG_SYS_FLASH_CFI in struct flash_info_t
> are unconditionally used in the cfi_flash.c driver.
> 
> Drop the #ifdefs in the definition of flash_info_t.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Applied to u-boot-cfi-flash/master

Thanks,
Stefan

> ---
> 
>   include/flash.h | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/include/flash.h b/include/flash.h
> index 42b18a6047..f3959f5012 100644
> --- a/include/flash.h
> +++ b/include/flash.h
> @@ -21,7 +21,6 @@ typedef struct {
>   	ulong	flash_id;		/* combined device & manufacturer code	*/
>   	ulong	start[CONFIG_SYS_MAX_FLASH_SECT];   /* virtual sector start address */
>   	uchar	protect[CONFIG_SYS_MAX_FLASH_SECT]; /* sector protection status	*/
> -#ifdef CONFIG_SYS_FLASH_CFI
>   	uchar	portwidth;		/* the width of the port		*/
>   	uchar	chipwidth;		/* the width of the chip		*/
>   	uchar	chip_lsb;		/* extra Least Significant Bit in the */
> @@ -45,7 +44,6 @@ typedef struct {
>   	ulong   addr_unlock2;		/* unlock address 2 for AMD flash roms  */
>   	uchar   sr_supported;		/* status register supported            */
>   	const char *name;		/* human-readable name	                */
> -#endif
>   #ifdef CONFIG_DM_MTD
>   	struct mtd_info *mtd;
>   #endif
> 


Viele Grüße,
Stefan
diff mbox series

Patch

diff --git a/include/flash.h b/include/flash.h
index 42b18a6047..f3959f5012 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -21,7 +21,6 @@  typedef struct {
 	ulong	flash_id;		/* combined device & manufacturer code	*/
 	ulong	start[CONFIG_SYS_MAX_FLASH_SECT];   /* virtual sector start address */
 	uchar	protect[CONFIG_SYS_MAX_FLASH_SECT]; /* sector protection status	*/
-#ifdef CONFIG_SYS_FLASH_CFI
 	uchar	portwidth;		/* the width of the port		*/
 	uchar	chipwidth;		/* the width of the chip		*/
 	uchar	chip_lsb;		/* extra Least Significant Bit in the */
@@ -45,7 +44,6 @@  typedef struct {
 	ulong   addr_unlock2;		/* unlock address 2 for AMD flash roms  */
 	uchar   sr_supported;		/* status register supported            */
 	const char *name;		/* human-readable name	                */
-#endif
 #ifdef CONFIG_DM_MTD
 	struct mtd_info *mtd;
 #endif