mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 1/3] driver: add flag to check if cdev is an mci device
@ 2021-05-10 10:25 Marco Felsch
  2021-05-10 10:25 ` [PATCH v3 2/3] mci: mci-core: set the DEVFS_IS_MCI_MAIN_PART_DEV flag Marco Felsch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marco Felsch @ 2021-05-10 10:25 UTC (permalink / raw)
  To: barebox

We need this during mount() to check if the cdev is an mmc/mci main|user
hardware partition device. Later on we add the feature to pass
"root=/dev/mmcblkXpN" as kernel command line.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
v3:
- no changes

v2:
- dropped the !!
- renamed the flag due to v1 comments
- renamed the function to

 include/driver.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/driver.h b/include/driver.h
index 0d43b36148..d84fe35d50 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -496,6 +496,7 @@ int cdev_erase(struct cdev *cdev, loff_t count, loff_t offset);
 #define DEVFS_PARTITION_READONLY	(1U << 1)
 #define DEVFS_IS_CHARACTER_DEV		(1U << 3)
 #define DEVFS_PARTITION_FROM_TABLE	(1U << 4)
+#define DEVFS_IS_MCI_MAIN_PART_DEV	(1U << 5)
 
 struct cdev *devfs_add_partition(const char *devname, loff_t offset,
 		loff_t size, unsigned int flags, const char *name);
@@ -509,6 +510,11 @@ static inline void cdev_create_default_automount(struct cdev *cdev)
 }
 #endif
 
+static inline bool cdev_is_mci_main_part_dev(struct cdev *cdev)
+{
+	return cdev->flags & DEVFS_IS_MCI_MAIN_PART_DEV;
+}
+
 #define DEVFS_PARTITION_APPEND		0
 
 /**
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-12  5:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 10:25 [PATCH v3 1/3] driver: add flag to check if cdev is an mci device Marco Felsch
2021-05-10 10:25 ` [PATCH v3 2/3] mci: mci-core: set the DEVFS_IS_MCI_MAIN_PART_DEV flag Marco Felsch
2021-05-10 10:25 ` [PATCH v3 3/3] fs: add linux_rootarg 'root=mmcblkXpN' support Marco Felsch
2021-05-12  5:25 ` [PATCH v3 1/3] driver: add flag to check if cdev is an mci device Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox