Message ID | 1337212447-8397-1-git-send-email-swarren@wwwdotorg.org |
---|---|
State | Accepted |
Commit | d1e4607901883c84a2f727c9ae2dac3cfcfd2b91 |
Headers | show |
Hi Stephen, On Wed, May 16, 2012 at 4:54 PM, Stephen Warren <swarren@wwwdotorg.org>wrote: > From: Stephen Warren <swarren@nvidia.com> > > This will be used on TrimSlice. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > arch/arm/cpu/armv7/tegra2/funcmux.c | 7 +++++++ > arch/arm/include/asm/arch-tegra2/funcmux.h | 1 + > 2 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c > b/arch/arm/cpu/armv7/tegra2/funcmux.c > index 1559869..820ba4e 100644 > --- a/arch/arm/cpu/armv7/tegra2/funcmux.c > +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c > @@ -127,6 +127,13 @@ int funcmux_select(enum periph_id id, int config) > } > break; > > + case PERIPH_ID_SDMMC1: > + if (config == FUNCMUX_SDMMC1_SDIO1_4BIT) { > + pinmux_set_func(PINGRP_SDIO1, PMUX_FUNC_SDIO1); > + pinmux_tristate_disable(PINGRP_SDIO1); > + } > else return -1 I think > + break; > + > case PERIPH_ID_SDMMC2: > if (config == FUNCMUX_SDMMC2_DTA_DTD_8BIT) { > pinmux_set_func(PINGRP_DTA, PMUX_FUNC_SDIO2); > diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h > b/arch/arm/include/asm/arch-tegra2/funcmux.h > index 19184d1..b16c496 100644 > --- a/arch/arm/include/asm/arch-tegra2/funcmux.h > +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h > @@ -44,6 +44,7 @@ enum { > FUNCMUX_I2C3_DTF = 0, > > /* SDMMC configs */ > + FUNCMUX_SDMMC1_SDIO1_4BIT = 0, > The name does not seem consistent - is it not possible to route this peripheral to different pins? > FUNCMUX_SDMMC2_DTA_DTD_8BIT = 0, > FUNCMUX_SDMMC3_SDB_4BIT = 0, > FUNCMUX_SDMMC3_SDB_SLXA_8BIT, > -- > 1.7.0.4 > > Regards, Simon
On 05/21/2012 06:41 PM, Simon Glass wrote: > Hi Stephen, > > On Wed, May 16, 2012 at 4:54 PM, Stephen Warren <swarren@wwwdotorg.org > <mailto:swarren@wwwdotorg.org>> wrote: > > From: Stephen Warren <swarren@nvidia.com <mailto:swarren@nvidia.com>> > > This will be used on TrimSlice. > > Signed-off-by: Stephen Warren <swarren@nvidia.com > <mailto:swarren@nvidia.com>> > --- > arch/arm/cpu/armv7/tegra2/funcmux.c | 7 +++++++ > arch/arm/include/asm/arch-tegra2/funcmux.h | 1 + > 2 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c > b/arch/arm/cpu/armv7/tegra2/funcmux.c > index 1559869..820ba4e 100644 > --- a/arch/arm/cpu/armv7/tegra2/funcmux.c > +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c > @@ -127,6 +127,13 @@ int funcmux_select(enum periph_id id, int config) > } > break; > > + case PERIPH_ID_SDMMC1: > + if (config == FUNCMUX_SDMMC1_SDIO1_4BIT) { > + pinmux_set_func(PINGRP_SDIO1, PMUX_FUNC_SDIO1); > + pinmux_tristate_disable(PINGRP_SDIO1); > + } > > else return -1 I think This is handled at the end of the function; if bad_config is set, it will return -1. (and bad_config is cleared by default in config==FUNCMUX_DEFAULT, and FUNCMUX_SDMMC1_SDIO1_4BIT==FUNCMUX_DEFAULT) > diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h > b/arch/arm/include/asm/arch-tegra2/funcmux.h > index 19184d1..b16c496 100644 > --- a/arch/arm/include/asm/arch-tegra2/funcmux.h > +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h > @@ -44,6 +44,7 @@ enum { > FUNCMUX_I2C3_DTF = 0, > > /* SDMMC configs */ > + FUNCMUX_SDMMC1_SDIO1_4BIT = 0, > > The name does not seem consistent - is it not possible to route this > peripheral to different pins? SDMMC1 is the module name, and SDIO1 is the pingroup name it's being routed to. I'm not sure what the inconsistency is. I don't recall if SDMMC1 can be routed to different pingroups or not.
On Mon, May 21, 2012 at 7:48 PM, Stephen Warren <swarren@wwwdotorg.org>wrote: > On 05/21/2012 06:41 PM, Simon Glass wrote: > > Hi Stephen, > > > > On Wed, May 16, 2012 at 4:54 PM, Stephen Warren <swarren@wwwdotorg.org > > <mailto:swarren@wwwdotorg.org>> wrote: > > > > From: Stephen Warren <swarren@nvidia.com <mailto:swarren@nvidia.com > >> > Acked-by: Simon Glass <sjg@chromium.org> > > > > This will be used on TrimSlice. > > > > Signed-off-by: Stephen Warren <swarren@nvidia.com > > <mailto:swarren@nvidia.com>> > > --- > > arch/arm/cpu/armv7/tegra2/funcmux.c | 7 +++++++ > > arch/arm/include/asm/arch-tegra2/funcmux.h | 1 + > > 2 files changed, 8 insertions(+), 0 deletions(-) > > > > diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c > > b/arch/arm/cpu/armv7/tegra2/funcmux.c > > index 1559869..820ba4e 100644 > > --- a/arch/arm/cpu/armv7/tegra2/funcmux.c > > +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c > > @@ -127,6 +127,13 @@ int funcmux_select(enum periph_id id, int > config) > > } > > break; > > > > + case PERIPH_ID_SDMMC1: > > + if (config == FUNCMUX_SDMMC1_SDIO1_4BIT) { > > + pinmux_set_func(PINGRP_SDIO1, > PMUX_FUNC_SDIO1); > > + pinmux_tristate_disable(PINGRP_SDIO1); > > + } > > > > else return -1 I think > > This is handled at the end of the function; if bad_config is set, it > will return -1. (and bad_config is cleared by default in > config==FUNCMUX_DEFAULT, and FUNCMUX_SDMMC1_SDIO1_4BIT==FUNCMUX_DEFAULT) > > > diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h > > b/arch/arm/include/asm/arch-tegra2/funcmux.h > > index 19184d1..b16c496 100644 > > --- a/arch/arm/include/asm/arch-tegra2/funcmux.h > > +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h > > @@ -44,6 +44,7 @@ enum { > > FUNCMUX_I2C3_DTF = 0, > > > > /* SDMMC configs */ > > + FUNCMUX_SDMMC1_SDIO1_4BIT = 0, > > > > The name does not seem consistent - is it not possible to route this > > peripheral to different pins? > > SDMMC1 is the module name, and SDIO1 is the pingroup name it's being > routed to. I'm not sure what the inconsistency is. I don't recall if > SDMMC1 can be routed to different pingroups or not. >
diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c b/arch/arm/cpu/armv7/tegra2/funcmux.c index 1559869..820ba4e 100644 --- a/arch/arm/cpu/armv7/tegra2/funcmux.c +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c @@ -127,6 +127,13 @@ int funcmux_select(enum periph_id id, int config) } break; + case PERIPH_ID_SDMMC1: + if (config == FUNCMUX_SDMMC1_SDIO1_4BIT) { + pinmux_set_func(PINGRP_SDIO1, PMUX_FUNC_SDIO1); + pinmux_tristate_disable(PINGRP_SDIO1); + } + break; + case PERIPH_ID_SDMMC2: if (config == FUNCMUX_SDMMC2_DTA_DTD_8BIT) { pinmux_set_func(PINGRP_DTA, PMUX_FUNC_SDIO2); diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h b/arch/arm/include/asm/arch-tegra2/funcmux.h index 19184d1..b16c496 100644 --- a/arch/arm/include/asm/arch-tegra2/funcmux.h +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h @@ -44,6 +44,7 @@ enum { FUNCMUX_I2C3_DTF = 0, /* SDMMC configs */ + FUNCMUX_SDMMC1_SDIO1_4BIT = 0, FUNCMUX_SDMMC2_DTA_DTD_8BIT = 0, FUNCMUX_SDMMC3_SDB_4BIT = 0, FUNCMUX_SDMMC3_SDB_SLXA_8BIT,