From ddb3ac3c716f56cead695444e65a7ba7b0946555 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 9 Apr 2017 18:38:21 -0600 Subject: x86: Convert MMC to driver model Convert the pci_mmc driver over to driver model and migrate all x86 boards that use it. Signed-off-by: Simon Glass Reviewed-by: Bin Meng Tested-by: Bin Meng --- include/mmc.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include') diff --git a/include/mmc.h b/include/mmc.h index fad12d608c..8346b0e19e 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -585,18 +585,6 @@ int cpu_mmc_init(bd_t *bis); int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr); int mmc_get_env_dev(void); -struct pci_device_id; - -/** - * pci_mmc_init() - set up PCI MMC devices - * - * This finds all the matching PCI IDs and sets them up as MMC devices. - * - * @name: Name to use for devices - * @mmc_supported: PCI IDs to search for, terminated by {0, 0} - */ -int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported); - /* Set block count limit because of 16 bit register limit on some hardware*/ #ifndef CONFIG_SYS_MMC_MAX_BLK_COUNT #define CONFIG_SYS_MMC_MAX_BLK_COUNT 65535 -- cgit From 426f99fa98c3725fe0ca1eb8438d1215a2c6bd6b Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 24 Apr 2017 09:48:02 +0200 Subject: dm: core: Add DM_FLAG_OS_PREPARE flag This new flag can be added to DM device drivers, which need to do some final configuration before U-Boot exits and the OS (e.g. Linux) is started. The remove functions of those drivers will get called at this stage to do these last-stage configuration steps. Signed-off-by: Stefan Roese Reviewed-by: Simon Glass Cc: Bin Meng --- include/dm/device.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/dm/device.h b/include/dm/device.h index 079ec57003..df02e41df3 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -54,6 +54,12 @@ struct driver_info; */ #define DM_FLAG_ACTIVE_DMA (1 << 9) +/* + * Call driver remove function to do some final configuration, before + * U-Boot exits and the OS is started + */ +#define DM_FLAG_OS_PREPARE (1 << 10) + /* * One or multiple of these flags are passed to device_remove() so that * a selective device removal as specified by the remove-stage and the @@ -66,10 +72,13 @@ enum { /* Remove devices with active DMA */ DM_REMOVE_ACTIVE_DMA = DM_FLAG_ACTIVE_DMA, + /* Remove devices which need some final OS preparation steps */ + DM_REMOVE_OS_PREPARE = DM_FLAG_OS_PREPARE, + /* Add more use cases here */ /* Remove devices with any active flag */ - DM_REMOVE_ACTIVE_ALL = DM_REMOVE_ACTIVE_DMA, + DM_REMOVE_ACTIVE_ALL = DM_REMOVE_ACTIVE_DMA | DM_REMOVE_OS_PREPARE, }; /** -- cgit