mtd: kconfig: Fix CFI_FLASH dependency
Subsystems (2)
PATCH 1/3 mtd: kconfig: Fix CFI_FLASH dependency
The DM version CFI flash driver is in driver/mtd/cfi_flash.c, which only gets built when FLASH_CFI_DRIVER is on. If CFI_FLASH is on but FLASH_CFI_DRIVER is not, nothing is enabled at all.
Fix this dependency by selecting FLASH_CFI_DRIVER when CFI_FLASH is enabled.
---
drivers/mtd/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/Kconfig +1 -0
@@ -42,6 +42,7 @@ config FLASH_CFI_DRIVER config CFI_FLASH bool "Enable Driver Model for CFI Flash driver" depends on DM_MTD + select FLASH_CFI_DRIVER help The Common Flash Interface specification was developed by Intel, AMD and other flash manufactures. It provides a universal method
Signature · 1 line
2.25.1
PATCH 2/3 flash.h: Remove CONFIG_SYS_FLASH_CFI from flash_info_t
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.
---
include/flash.h | 2 -- 1 file changed, 2 deletions(-)
include/flash.h +0 -2
@@ -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
Signature · 1 line
2.25.1
Re: [PATCH 2/3] flash.h: Remove CONFIG_SYS_FLASH_CFI from flash_info_t
Quoted 6 lines · Bin Meng
Those embers wrapped with
CONFIG_SYS_FLASH_CFIin structflash_info_tare unconditionally used in thecfi_flash.cdriver.Drop the #ifdefs in the definition of
flash_info_t.Signed-off-by Bin Meng <[email protected]>
Thanks,
Stefan
Quoted 19 lines
---
include/flash.h | 2 -- 1 file changed, 2 deletions(-)include/flash.h +0
-1@@ -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 */
include/flash.h typedef struct { · line 49
Quoted 7 lines
include/flash.h +0
-1@@ -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
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH 2/3] flash.h: Remove CONFIG_SYS_FLASH_CFI from flash_info_t
In reply to Bin MengQuoted 6 lines · Bin Meng
Those embers wrapped with
CONFIG_SYS_FLASH_CFIin structflash_info_tare unconditionally used in thecfi_flash.cdriver.Drop the #ifdefs in the definition of
flash_info_t.Signed-off-by Bin Meng <[email protected]>
Applied to u-boot-cfi-flash/master
Thanks,
Stefan
Quoted 19 lines
---
include/flash.h | 2 -- 1 file changed, 2 deletions(-)include/flash.h +0
-1@@ -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 */
include/flash.h typedef struct { · line 49
Quoted 7 lines
include/flash.h +0
-1@@ -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
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
PATCH 3/3 riscv: qemu: Enable MTD NOR flash support
In reply to Bin MengEnable support to the 2 NOR flashes on the QEMU RISC-V virt machine.
---
board/emulation/qemu-riscv/Kconfig | 2 ++ include/configs/qemu-riscv.h | 2 ++ 2 files changed, 4 insertions(+)
board/emulation/qemu-riscv/Kconfig +2 -0
@@ -64,5 +64,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply VIRTIO_PCI imply VIRTIO_NET imply VIRTIO_BLK + imply MTD_NOR_FLASH + imply CFI_FLASH endif
include/configs/qemu-riscv.h +2 -0
@@ -29,6 +29,8 @@#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 +#define CONFIG_SYS_MAX_FLASH_BANKS 2 +#define RISCV_MMODE_TIMERBASE 0x2000000#define RISCV_MMODE_TIMER_FREQ 1000000
Signature · 1 line
2.25.1
Re: [PATCH 3/3] riscv: qemu: Enable MTD NOR flash support
Quoted 3 lines · Bin Meng
Enable support to the 2 NOR flashes on the QEMU RISC-V virt machine.
Signed-off-by Bin Meng <[email protected]>
Thanks,
Stefan
Quoted 24 lines
---
board/emulation/qemu-riscv/Kconfig | 2 ++ include/configs/qemu-riscv.h | 2 ++ 2 files changed, 4 insertions(+)board/emulation/qemu-riscv/Kconfig +2
-0@@ -64,5 +64,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply VIRTIO_PCI imply VIRTIO_NET imply VIRTIO_BLK + imply MTD_NOR_FLASH + imply CFI_FLASH endifinclude/configs/qemu-riscv.h +0
-0
include/configs/qemu-riscv.h line 36
Quoted 8 lines
include/configs/qemu-riscv.h +2
-0@@ -29,6 +29,8 @@#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 +#define CONFIG_SYS_MAX_FLASH_BANKS 2 +#define RISCV_MMODE_TIMERBASE 0x2000000#define RISCV_MMODE_TIMER_FREQ 1000000
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Re: [PATCH 3/3] riscv: qemu: Enable MTD NOR flash support
In reply to Bin MengQuoted 3 lines · Bin Meng
Enable support to the 2 NOR flashes on the QEMU RISC-V virt machine.
Signed-off-by Bin Meng <[email protected]>
Applied to u-boot-cfi-flash/master
Thanks,
Stefan
Quoted 24 lines
---
board/emulation/qemu-riscv/Kconfig | 2 ++ include/configs/qemu-riscv.h | 2 ++ 2 files changed, 4 insertions(+)board/emulation/qemu-riscv/Kconfig +2
-0@@ -64,5 +64,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply VIRTIO_PCI imply VIRTIO_NET imply VIRTIO_BLK + imply MTD_NOR_FLASH + imply CFI_FLASH endifinclude/configs/qemu-riscv.h +0
-0
include/configs/qemu-riscv.h line 36
Quoted 8 lines
include/configs/qemu-riscv.h +2
-0@@ -29,6 +29,8 @@#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 +#define CONFIG_SYS_MAX_FLASH_BANKS 2 +#define RISCV_MMODE_TIMERBASE 0x2000000#define RISCV_MMODE_TIMER_FREQ 1000000
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 8 lines · Bin Meng
The DM version CFI flash driver is in
driver/mtd/cfi_flash.c, which only gets built whenFLASH_CFI_DRIVERis on. IfCFI_FLASHis on butFLASH_CFI_DRIVERis not, nothing is enabled at all.Fix this dependency by selecting
FLASH_CFI_DRIVERwhenCFI_FLASHis enabled.Signed-off-by Bin Meng <[email protected]>
Thanks,
Stefan
Quoted 11 lines
---
drivers/mtd/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/mtd/Kconfig +0
-0
drivers/mtd/Kconfig config FLASH_CFI_DRIVER · line 48
Quoted 7 lines
drivers/mtd/Kconfig +1
-0@@ -42,6 +42,7 @@ config FLASH_CFI_DRIVER config CFI_FLASH bool "Enable Driver Model for CFI Flash driver" depends on DM_MTD + select FLASH_CFI_DRIVER help The Common Flash Interface specification was developed by Intel, AMD and other flash manufactures. It provides a universal method
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
Quoted 8 lines · Bin Meng
The DM version CFI flash driver is in
driver/mtd/cfi_flash.c, which only gets built whenFLASH_CFI_DRIVERis on. IfCFI_FLASHis on butFLASH_CFI_DRIVERis not, nothing is enabled at all.Fix this dependency by selecting
FLASH_CFI_DRIVERwhenCFI_FLASHis enabled.Signed-off-by Bin Meng <[email protected]>
Applied to u-boot-cfi-flash/master
Thanks,
Stefan
Quoted 11 lines
---
drivers/mtd/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/mtd/Kconfig +0
-0
drivers/mtd/Kconfig config FLASH_CFI_DRIVER · line 48
Quoted 7 lines
drivers/mtd/Kconfig +1
-0@@ -42,6 +42,7 @@ config FLASH_CFI_DRIVER config CFI_FLASH bool "Enable Driver Model for CFI Flash driver" depends on DM_MTD + select FLASH_CFI_DRIVER help The Common Flash Interface specification was developed by Intel, AMD and other flash manufactures. It provides a universal method
Viele Grüße,
Stefan
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]