diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/blk.h | 1 | ||||
-rw-r--r-- | include/configs/am43xx_evm.h | 1 | ||||
-rw-r--r-- | include/configs/am57xx_evm.h | 1 | ||||
-rw-r--r-- | include/configs/brppt1.h | 1 | ||||
-rw-r--r-- | include/configs/cl-som-am57x.h | 2 | ||||
-rw-r--r-- | include/configs/cm_t335.h | 1 | ||||
-rw-r--r-- | include/configs/cm_t35.h | 2 | ||||
-rw-r--r-- | include/configs/cm_t3517.h | 2 | ||||
-rw-r--r-- | include/configs/devkit8000.h | 1 | ||||
-rw-r--r-- | include/configs/dra7xx_evm.h | 1 | ||||
-rw-r--r-- | include/configs/nokia_rx51.h | 1 | ||||
-rw-r--r-- | include/configs/omap3_beagle.h | 2 | ||||
-rw-r--r-- | include/configs/omap3_cairo.h | 2 | ||||
-rw-r--r-- | include/configs/rut.h | 1 | ||||
-rw-r--r-- | include/configs/siemens-am33x-common.h | 1 | ||||
-rw-r--r-- | include/configs/tao3530.h | 2 | ||||
-rw-r--r-- | include/configs/ti_armv7_omap.h | 3 | ||||
-rw-r--r-- | include/dm/uclass-id.h | 1 | ||||
-rw-r--r-- | include/flash.h | 1 | ||||
-rw-r--r-- | include/nvme.h | 82 | ||||
-rw-r--r-- | include/pci_ids.h | 1 | ||||
-rw-r--r-- | include/wdt.h | 8 |
22 files changed, 89 insertions, 29 deletions
diff --git a/include/blk.h b/include/blk.h index 1e6239ac9e8..61b56281b31 100644 --- a/include/blk.h +++ b/include/blk.h @@ -31,6 +31,7 @@ enum if_type { IF_TYPE_SATA, IF_TYPE_HOST, IF_TYPE_SYSTEMACE, + IF_TYPE_NVME, IF_TYPE_COUNT, /* Number of interface types */ }; diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index d3fbcb5c76d..b84f6e3480c 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -140,7 +140,6 @@ #endif /* SPI */ -#undef CONFIG_OMAP3_SPI #define CONFIG_TI_SPI_MMAP #define CONFIG_QSPI_SEL_GPIO 48 #define CONFIG_SF_DEFAULT_SPEED 48000000 diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 9f07bba0c89..0c70c530503 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -123,7 +123,6 @@ #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 /* SPI */ -#undef CONFIG_OMAP3_SPI #define CONFIG_TI_SPI_MMAP #define CONFIG_SF_DEFAULT_SPEED 76800000 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h index f965fc9a1d0..07a173ff14f 100644 --- a/include/configs/brppt1.h +++ b/include/configs/brppt1.h @@ -234,7 +234,6 @@ MMCARGS #if defined(CONFIG_SPI_BOOT) /* McSPI IP block */ #define CONFIG_SPI -#define CONFIG_OMAP3_SPI #define CONFIG_SF_DEFAULT_SPEED 24000000 #define CONFIG_SPL_SPI_LOAD diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h index 49db5a964cb..3aaa82ce511 100644 --- a/include/configs/cl-som-am57x.h +++ b/include/configs/cl-som-am57x.h @@ -29,8 +29,6 @@ #define CONFIG_SYS_SPD_BUS_NUM 3 /* SPI Flash support */ -#undef CONFIG_OMAP3_SPI - #define CONFIG_TI_SPI_MMAP #define CONFIG_SF_DEFAULT_SPEED 48000000 #define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3 diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h index d29859d93ab..2287d5b6e45 100644 --- a/include/configs/cm_t335.h +++ b/include/configs/cm_t335.h @@ -16,7 +16,6 @@ #include <configs/ti_am335x_common.h> #undef CONFIG_SPI -#undef CONFIG_OMAP3_SPI #undef CONFIG_BOOTCOUNT_LIMIT #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h index adef6f8b185..a94d55fa3ab 100644 --- a/include/configs/cm_t35.h +++ b/include/configs/cm_t35.h @@ -248,8 +248,6 @@ #define CONFIG_BMP_16BPP #define CONFIG_SCF0403_LCD -#define CONFIG_OMAP3_SPI - /* Defines for SPL */ #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_NAND_SIMPLE diff --git a/include/configs/cm_t3517.h b/include/configs/cm_t3517.h index 5821183fc9c..3a9fd2ac6c5 100644 --- a/include/configs/cm_t3517.h +++ b/include/configs/cm_t3517.h @@ -249,8 +249,6 @@ #define CONFIG_BMP_16BPP #define CONFIG_SCF0403_LCD -#define CONFIG_OMAP3_SPI - /* EEPROM */ #define CONFIG_ENV_EEPROM_IS_ON_I2C #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 5edf0a9bf65..2bf0983e37e 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -60,7 +60,6 @@ /* SPI */ #undef CONFIG_SPI -#undef CONFIG_OMAP3_SPI /* I2C */ diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index e124bda496b..efe63daf269 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -115,7 +115,6 @@ #define CONFIG_PHY_TI /* SPI */ -#undef CONFIG_OMAP3_SPI #define CONFIG_TI_SPI_MMAP #define CONFIG_SF_DEFAULT_SPEED 76800000 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 6d589273aa9..a072708d616 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -102,7 +102,6 @@ #define CONFIG_CMDLINE_EDITING /* add command line history */ #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ -#define CONFIG_OMAP3_SPI #define CONFIG_SYS_I2C #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index fe83e71b618..33d29b56926 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -255,8 +255,6 @@ #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET -#define CONFIG_OMAP3_SPI - /* Defines for SPL */ #define CONFIG_SPL_OMAP3_ID_NAND diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h index 729bcc74eb2..560e50081f0 100644 --- a/include/configs/omap3_cairo.h +++ b/include/configs/omap3_cairo.h @@ -176,8 +176,6 @@ #define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET #define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET -#define CONFIG_OMAP3_SPI - /* Defines for SPL */ #define CONFIG_SPL_OMAP3_ID_NAND diff --git a/include/configs/rut.h b/include/configs/rut.h index e676a5acd48..9f9bc718cd2 100644 --- a/include/configs/rut.h +++ b/include/configs/rut.h @@ -120,7 +120,6 @@ #define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE #define CONFIG_SPI -#define CONFIG_OMAP3_SPI #define BOARD_LCD_RESET 115 /* Bank 3 pin 19 */ #define CONFIG_FORMIKE diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h index 83768cd2fb0..5ed46588dd8 100644 --- a/include/configs/siemens-am33x-common.h +++ b/include/configs/siemens-am33x-common.h @@ -72,7 +72,6 @@ #define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */ #define CONFIG_SPI -#define CONFIG_OMAP3_SPI #define CONFIG_MTD_DEVICE #define CONFIG_SF_DEFAULT_SPEED (75000000) diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h index b755bb9d9e1..d47dc8bba90 100644 --- a/include/configs/tao3530.h +++ b/include/configs/tao3530.h @@ -213,8 +213,6 @@ CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) -#define CONFIG_OMAP3_SPI - /* * USB * diff --git a/include/configs/ti_armv7_omap.h b/include/configs/ti_armv7_omap.h index 6834500c172..306f503d9e9 100644 --- a/include/configs/ti_armv7_omap.h +++ b/include/configs/ti_armv7_omap.h @@ -16,9 +16,6 @@ #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 #define CONFIG_SYS_OMAP24_I2C_SLAVE 1 -/* SPI IP Block */ -#define CONFIG_OMAP3_SPI - /* * GPMC NAND block. We support 1 device and the physical address to * access CS0 at is 0x8000000. diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 2e6498b7dcd..1a501992db2 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -52,6 +52,7 @@ enum uclass_id { UCLASS_MOD_EXP, /* RSA Mod Exp device */ UCLASS_MTD, /* Memory Technology Device (MTD) device */ UCLASS_NORTHBRIDGE, /* Intel Northbridge / SDRAM controller */ + UCLASS_NVME, /* NVM Express device */ UCLASS_PANEL, /* Display panel, such as an LCD */ UCLASS_PANEL_BACKLIGHT, /* Backlight controller for panel */ UCLASS_PCH, /* x86 platform controller hub */ diff --git a/include/flash.h b/include/flash.h index 908d7cec6ca..55c5bdd4b12 100644 --- a/include/flash.h +++ b/include/flash.h @@ -467,7 +467,6 @@ extern flash_info_t *flash_get_info(ulong base); #define FLASH_S29GL128N 0x00F1 /* Spansion S29GL128N */ #define FLASH_STM32 0x00F2 /* STM32 Embedded Flash */ -#define FLASH_STM32F1 0x00F3 /* STM32F1 Embedded Flash */ #define FLASH_UNKNOWN 0xFFFF /* unknown flash type */ diff --git a/include/nvme.h b/include/nvme.h new file mode 100644 index 00000000000..8375d61e022 --- /dev/null +++ b/include/nvme.h @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2017 NXP Semiconductors + * Copyright (C) 2017 Bin Meng <bmeng.cn@gmail.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __NVME_H__ +#define __NVME_H__ + +struct nvme_dev; + +/** + * nvme_identify - identify controller or namespace capabilities and status + * + * This issues an identify command to the NVMe controller to return a data + * buffer that describes the controller or namespace capabilities and status. + * + * @dev: NVMe controller device + * @nsid: 0 for controller, namespace id for namespace to identify + * @cns: 1 for controller, 0 for namespace + * @dma_addr: dma buffer address to store the identify result + * @return: 0 on success, -ETIMEDOUT on command execution timeout, + * -EIO on command execution fails + */ +int nvme_identify(struct nvme_dev *dev, unsigned nsid, + unsigned cns, dma_addr_t dma_addr); + +/** + * nvme_get_features - retrieve the attributes of the feature specified + * + * This retrieves the attributes of the feature specified. + * + * @dev: NVMe controller device + * @fid: feature id to provide data + * @nsid: namespace id the command applies to + * @dma_addr: data structure used as part of the specified feature + * @result: command-specific result in the completion queue entry + * @return: 0 on success, -ETIMEDOUT on command execution timeout, + * -EIO on command execution fails + */ +int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid, + dma_addr_t dma_addr, u32 *result); + +/** + * nvme_set_features - specify the attributes of the feature indicated + * + * This specifies the attributes of the feature indicated. + * + * @dev: NVMe controller device + * @fid: feature id to provide data + * @dword11: command-specific input parameter + * @dma_addr: data structure used as part of the specified feature + * @result: command-specific result in the completion queue entry + * @return: 0 on success, -ETIMEDOUT on command execution timeout, + * -EIO on command execution fails + */ +int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11, + dma_addr_t dma_addr, u32 *result); + +/** + * nvme_scan_namespace - scan all namespaces attached to NVMe controllers + * + * This probes all registered NVMe uclass device drivers in the system, + * and tries to find all namespaces attached to the NVMe controllers. + * + * @return: 0 on success, -ve on error + */ +int nvme_scan_namespace(void); + +/** + * nvme_print_info - print detailed NVMe controller and namespace information + * + * This prints out detailed human readable NVMe controller and namespace + * information which is very useful for debugging. + * + * @udev: NVMe controller device + * @return: 0 on success, -EIO if NVMe identify command fails + */ +int nvme_print_info(struct udevice *udev); + +#endif /* __NVME_H__ */ diff --git a/include/pci_ids.h b/include/pci_ids.h index ab6aa58adb8..fdda679cc05 100644 --- a/include/pci_ids.h +++ b/include/pci_ids.h @@ -21,6 +21,7 @@ #define PCI_CLASS_STORAGE_SATA 0x0106 #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 #define PCI_CLASS_STORAGE_SAS 0x0107 +#define PCI_CLASS_STORAGE_EXPRESS 0x010802 #define PCI_CLASS_STORAGE_OTHER 0x0180 #define PCI_BASE_CLASS_NETWORK 0x02 diff --git a/include/wdt.h b/include/wdt.h index 0b5f05851a3..9b90fbeeb3a 100644 --- a/include/wdt.h +++ b/include/wdt.h @@ -21,12 +21,12 @@ * Start the timer * * @dev: WDT Device - * @timeout: Number of ticks before timer expires + * @timeout_ms: Number of ticks (milliseconds) before timer expires * @flags: Driver specific flags. This might be used to specify * which action needs to be executed when the timer expires * @return: 0 if OK, -ve on error */ -int wdt_start(struct udevice *dev, u64 timeout, ulong flags); +int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags); /* * Stop the timer, thus disabling the Watchdog. Use wdt_start to start it again. @@ -67,12 +67,12 @@ struct wdt_ops { * Start the timer * * @dev: WDT Device - * @timeout: Number of ticks before the timer expires + * @timeout_ms: Number of ticks (milliseconds) before the timer expires * @flags: Driver specific flags. This might be used to specify * which action needs to be executed when the timer expires * @return: 0 if OK, -ve on error */ - int (*start)(struct udevice *dev, u64 timeout, ulong flags); + int (*start)(struct udevice *dev, u64 timeout_ms, ulong flags); /* * Stop the timer * |