Selaa lähdekoodia

Merge https://source.denx.de/u-boot/custodians/u-boot-cfi-flash

- Some CFI flash related fixups (Kconfig & header) (Bin)
- Enable CFI flash support on the QEMU RISC-V virt machine. (Bin)
Tom Rini 2 vuotta sitten
vanhempi
commit
a25277122d
4 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 2 0
      board/emulation/qemu-riscv/Kconfig
  2. 1 0
      drivers/mtd/Kconfig
  3. 2 0
      include/configs/qemu-riscv.h
  4. 0 2
      include/flash.h

+ 2 - 0
board/emulation/qemu-riscv/Kconfig

@@ -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

+ 1 - 0
drivers/mtd/Kconfig

@@ -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

+ 2 - 0
include/configs/qemu-riscv.h

@@ -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
 

+ 0 - 2
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