Message ID | 1248263045-12108-1-git-send-email-vipin.bhandari@ti.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
On Wednesday 22 July 2009, Vipin Bhandari wrote: > This patch corrects the support for MMCSD card detection > and read only feature for SoC DM355. > > EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that > Bit 2 and 4 should be checked for card detection. However > on the EVM, bits 1 and 3 gives this status, for MMC/SD > instance 0 and 1 respectively. The pdf also suggests that > Bit 1 and 3 should be checked for write protection. However > on the EVM bits 2 and 4 gives this status. In short: card detection works iff the writeprotect switch isn't used, since the two signals are swapped. > > This document can be downloaded from > http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf > > Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> .... but this should merge through the MFD tree. Send it to (per MAINTAINERS): MULTIFUNCTION DEVICES (MFD) P: Samuel Ortiz M: sameo@linux.intel.com T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git S: Supported F: drivers/mfd/ > --- > This patch has been tested on DM355 EVM. > > Since the previous version, format of the multi-line comment > has been corrected. > > drivers/mfd/dm355evm_msp.c | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c > index 5b6e58a..3d4a861 100644 > --- a/drivers/mfd/dm355evm_msp.c > +++ b/drivers/mfd/dm355evm_msp.c > @@ -107,8 +107,16 @@ static const u8 msp_gpios[] = { > MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1), > MSP_GPIO(4, SWITCH1), > /* switches on MMC/SD sockets */ > - MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC), /* mmc0 WP, nCD */ > - MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC), /* mmc1 WP, nCD */ > + /* > + * Note: EVMDM355_ECP_VA4.pdf suggests that Bit 2 and 4 should be > + * checked for card detection. However on the EVM bit 1 and 3 gives > + * this status, for 0 and 1 instance respectively. The pdf also > + * suggests that Bit 1 and 3 should be checked for write protection. > + * However on the EVM bit 2 and 4 gives this status,for 0 and 1 > + * instance respectively. > + */ > + MSP_GPIO(2, SDMMC), MSP_GPIO(1, SDMMC), /* mmc0 WP, nCD */ > + MSP_GPIO(4, SDMMC), MSP_GPIO(3, SDMMC), /* mmc1 WP, nCD */ > }; > > #define MSP_GPIO_REG(offset) (msp_gpios[(offset)] >> 3) > -- > 1.5.6 > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > >
David Brownell <david-b@pacbell.net> writes: > On Wednesday 22 July 2009, Vipin Bhandari wrote: >> This patch corrects the support for MMCSD card detection >> and read only feature for SoC DM355. >> >> EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that >> Bit 2 and 4 should be checked for card detection. However >> on the EVM, bits 1 and 3 gives this status, for MMC/SD >> instance 0 and 1 respectively. The pdf also suggests that >> Bit 1 and 3 should be checked for write protection. However >> on the EVM bits 2 and 4 gives this status. > > In short: card detection works iff the writeprotect switch > isn't used, since the two signals are swapped. > >> >> This document can be downloaded from >> http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf >> >> Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com> > > Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c index 5b6e58a..3d4a861 100644 --- a/drivers/mfd/dm355evm_msp.c +++ b/drivers/mfd/dm355evm_msp.c @@ -107,8 +107,16 @@ static const u8 msp_gpios[] = { MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1), MSP_GPIO(4, SWITCH1), /* switches on MMC/SD sockets */ - MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC), /* mmc0 WP, nCD */ - MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC), /* mmc1 WP, nCD */ + /* + * Note: EVMDM355_ECP_VA4.pdf suggests that Bit 2 and 4 should be + * checked for card detection. However on the EVM bit 1 and 3 gives + * this status, for 0 and 1 instance respectively. The pdf also + * suggests that Bit 1 and 3 should be checked for write protection. + * However on the EVM bit 2 and 4 gives this status,for 0 and 1 + * instance respectively. + */ + MSP_GPIO(2, SDMMC), MSP_GPIO(1, SDMMC), /* mmc0 WP, nCD */ + MSP_GPIO(4, SDMMC), MSP_GPIO(3, SDMMC), /* mmc1 WP, nCD */ }; #define MSP_GPIO_REG(offset) (msp_gpios[(offset)] >> 3)
This patch corrects the support for MMCSD card detection and read only feature for SoC DM355. EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that Bit 2 and 4 should be checked for card detection. However on the EVM, bits 1 and 3 gives this status, for MMC/SD instance 0 and 1 respectively. The pdf also suggests that Bit 1 and 3 should be checked for write protection. However on the EVM bits 2 and 4 gives this status. This document can be downloaded from http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com> --- This patch has been tested on DM355 EVM. Since the previous version, format of the multi-line comment has been corrected. drivers/mfd/dm355evm_msp.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)