Re: [PATCH v4 2/2] mci: implement command to switch a mmc device to enhanced mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Thu, Sep 12, 2019 at 08:16:17AM +0200, Sascha Hauer wrote:
> On Mon, Sep 09, 2019 at 10:34:51PM +0200, Uwe Kleine-König wrote:
> > +	ret = mci_send_ext_csd(mci, ext_csd);
> > +	if (ret) {
> > +		printf("Failure to read EXT_CSD register\n");
> > +		free(ext_csd);
> > +		return ERR_PTR(-EIO);
> > +	}
> > +
> > +	return ext_csd;
> > +}
> > +
> > +/* enh_area -m [-c] /dev/mmcX */
> 
> -m is not implemented
> 
> > +static int do_mmc_enh_area(int argc, char *argv[])
> > +{
> > +	const char *devpath;
> > +	struct mci *mci;
> > +	u8 *ext_csd;
> > +	int set_completed = 0;
> > +	int opt;
> > +	int ret;
> > +
> > +	while ((opt = getopt(argc, argv, "c")) > 0) {
> > +		switch (opt) {
> > +		case 'c':
> > +			set_completed = 1;
> > +			break;
> > +		}
> > +	}
> > +
> > +	/*
> > +	 * -m is currently mandatory to allow more flexible enhanced area
> > +	 * specifications in the future.
> > +	 */
> 
> -m?

-m was an intermediate step. You suggested to use -m instead of
"setmax", but while implementing I noticed that with options there is no
need for a keyword or option.

Can you please squash this into my patch?:

diff --git a/commands/mmc.c b/commands/mmc.c
index b51522fce2a6..c696e7b8817b 100644
--- a/commands/mmc.c
+++ b/commands/mmc.c
@@ -80,7 +80,7 @@ static u8 *mci_get_ext_csd(struct mci *mci)
 	return ext_csd;
 }
 
-/* enh_area -m [-c] /dev/mmcX */
+/* enh_area [-c] /dev/mmcX */
 static int do_mmc_enh_area(int argc, char *argv[])
 {
 	const char *devpath;
@@ -98,10 +98,6 @@ static int do_mmc_enh_area(int argc, char *argv[])
 		}
 	}
 
-	/*
-	 * -m is currently mandatory to allow more flexible enhanced area
-	 * specifications in the future.
-	 */
 	if (argc - optind != 1) {
 		printf("Usage: mmc enh_area [-c] /dev/mmcX\n");
 		return COMMAND_ERROR_USAGE;

or should I resend?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux