[PATCH 3/6] mci: rename trans_speed field to csd_max_dtr

Sascha Hauer s.hauer at pengutronix.de
Fri May 31 03:14:00 EDT 2013


tran_speed is confusing since the name doesn't tell us if this
is the maximum speed, the current speed or whatever else. Rename
it to csd_max_dtr since this variable holds the maximum data transfer
rate we extracted from csd.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/mci/mci-core.c | 4 ++--
 include/mci.h          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 895108f..d7b8fc9 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -779,8 +779,8 @@ static void mci_extract_max_tran_speed_from_csd(struct mci *mci)
 		return;
 	}
 
-	mci->tran_speed = time * unit;
-	dev_dbg(&mci->dev, "Transfer speed: %u\n", mci->tran_speed);
+	mci->csd_max_dtr = time * unit;
+	dev_dbg(&mci->dev, "Transfer speed: %u\n", mci->csd_max_dtr);
 }
 
 /**
diff --git a/include/mci.h b/include/mci.h
index 1eb967d..2b87691 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -340,7 +340,7 @@ struct mci {
 	unsigned csd[4];	/**< card's "card specific data register" */
 	unsigned cid[4];	/**< card's "card identification register" */
 	unsigned short rca;	/* FIXME */
-	unsigned tran_speed;	/**< not yet used */
+	unsigned csd_max_dtr;	/**< max data transfer rate as decoded from csd */
 	/** currently used data block length for read accesses */
 	unsigned read_bl_len;
 	/** currently used data block length for write accesses */
-- 
1.8.2.rc2




More information about the barebox mailing list