[PATCH 2/3] mci: mci-core: set the DEVFS_IS_MCI_DEV flag
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu May 6 05:06:43 PDT 2021
Hello,
On 06.05.21 13:22, Marco Felsch wrote:
> Set the new introduced flag to be able to check if the cdev is an
> mmc/mci device.
>
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
> ---
> drivers/mci/mci-core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index 017f25d35f..c0fbcb385f 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -420,6 +420,7 @@ static void mci_part_add(struct mci *mci, uint64_t size,
> part->size = size;
> part->blk.cdev.name = name;
> part->blk.cdev.partname = partname;
> + part->blk.cdev.flags |= DEVFS_IS_MCI_DEV;
> part->blk.blockbits = SECTOR_SHIFT;
> part->blk.num_blocks = mci_calc_blk_cnt(size, part->blk.blockbits);
> part->area_type = area_type;
This is called for hardware partitions, like boot and general
purpose partitions.
For boot partitions, the later commit is wrong. I don't know what the default
file name for mmc GPP block partitions is, Jürgen?
You should probably do this only for the MMC user partition (check for
area_type == MMC_BLK_DATA_AREA_MAIN). I think DEVFS_IS_MCI_DEV
should be renamed to DEVFS_IS_MCI_MAIN_DEV to.
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list