dm: systemace: Drop the get_dev() function

This function is implemented by the legacy block functions now. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
master
Simon Glass 8 years ago
parent 4e7189d4d8
commit f6d000edbe
  1. 2
      disk/part.c
  2. 14
      drivers/block/systemace.c
  3. 2
      include/part.h
  4. 7
      include/systemace.h

@ -41,7 +41,7 @@ const struct block_drvr block_drvr[] = {
}, },
#endif #endif
#if defined(CONFIG_SYSTEMACE) #if defined(CONFIG_SYSTEMACE)
{ .name = "ace", .get_dev = systemace_get_dev, }, { .name = "ace", },
#endif #endif
#if defined(CONFIG_SANDBOX) #if defined(CONFIG_SANDBOX)
{ .name = "host", .get_dev = host_get_dev, }, { .name = "host", .get_dev = host_get_dev, },

@ -104,8 +104,7 @@ static void release_cf_lock(void)
ace_writew((val & 0xffff), 0x18); ace_writew((val & 0xffff), 0x18);
} }
#ifdef CONFIG_PARTITIONS static int systemace_get_dev(int dev, struct blk_desc **descp)
struct blk_desc *systemace_get_dev(int dev)
{ {
/* The first time through this, the systemace_dev object is /* The first time through this, the systemace_dev object is
not yet initialized. In that case, fill it in. */ not yet initialized. In that case, fill it in. */
@ -127,14 +126,7 @@ struct blk_desc *systemace_get_dev(int dev)
part_init(&systemace_dev); part_init(&systemace_dev);
} }
*descp = &systemace_dev;
return &systemace_dev;
}
#endif
static int systemace_get_devp(int dev, struct blk_desc **descp)
{
*descp = systemace_get_dev(dev);
return 0; return 0;
} }
@ -269,5 +261,5 @@ U_BOOT_LEGACY_BLK(systemace) = {
.if_typename = "ace", .if_typename = "ace",
.if_type = IF_TYPE_SYSTEMACE, .if_type = IF_TYPE_SYSTEMACE,
.max_devs = 1, .max_devs = 1,
.get_dev = systemace_get_devp, .get_dev = systemace_get_dev,
}; };

@ -91,7 +91,6 @@ struct blk_desc *blk_get_dev(const char *ifname, int dev);
* @return 0 if OK, other value for an error * @return 0 if OK, other value for an error
*/ */
int mmc_select_hwpart(int dev_num, int hwpart); int mmc_select_hwpart(int dev_num, int hwpart);
struct blk_desc *systemace_get_dev(int dev);
struct blk_desc *mg_disk_get_dev(int dev); struct blk_desc *mg_disk_get_dev(int dev);
struct blk_desc *host_get_dev(int dev); struct blk_desc *host_get_dev(int dev);
int host_get_dev_err(int dev, struct blk_desc **blk_devp); int host_get_dev_err(int dev, struct blk_desc **blk_devp);
@ -171,7 +170,6 @@ extern const struct block_drvr block_drvr[];
static inline struct blk_desc *blk_get_dev(const char *ifname, int dev) static inline struct blk_desc *blk_get_dev(const char *ifname, int dev)
{ return NULL; } { return NULL; }
static inline int mmc_select_hwpart(int dev_num, int hwpart) { return -1; } static inline int mmc_select_hwpart(int dev_num, int hwpart) { return -1; }
static inline struct blk_desc *systemace_get_dev(int dev) { return NULL; }
static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; } static inline struct blk_desc *mg_disk_get_dev(int dev) { return NULL; }
static inline struct blk_desc *host_get_dev(int dev) { return NULL; } static inline struct blk_desc *host_get_dev(int dev) { return NULL; }

@ -7,11 +7,4 @@
* SPDX-License-Identifier: GPL-2.0+ * SPDX-License-Identifier: GPL-2.0+
*/ */
#ifdef CONFIG_SYSTEMACE
# include <part.h>
struct blk_desc *systemace_get_dev(int dev);
#endif /* CONFIG_SYSTEMACE */
#endif /* __SYSTEMACE_H */ #endif /* __SYSTEMACE_H */

Loading…
Cancel
Save