Message ID | 1372970334-21485-3-git-send-email-g.liakhovetski@gmx.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Hi Guennadi, Thanks for your efforts on this. On Fri, Jul 5, 2013 at 5:38 AM, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote: > Add MMCIF support to the APE6EVM board in both PIO and DMA modes, depending > on the DMAC driver availability. > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> This also goes without saying, but please add comments in the code and in the commit log explaining how the current implementation assumes the voltage to be static, but while the actual hardware allows the PMIC to control the voltage. Also, in the near future please finalize your earlier work where you add MMCIF support to the DT reference board support - a separate commit is fine with me, but make sure it gets merged. Apart from that, Acked-by: Magnus Damm <damm@opensource.se> -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 5 Jul 2013, Magnus Damm wrote: > Hi Guennadi, > > Thanks for your efforts on this. > > On Fri, Jul 5, 2013 at 5:38 AM, Guennadi Liakhovetski > <g.liakhovetski@gmx.de> wrote: > > Add MMCIF support to the APE6EVM board in both PIO and DMA modes, depending > > on the DMAC driver availability. > > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> > > This also goes without saying, but please add comments in the code and > in the commit log explaining how the current implementation assumes > the voltage to be static, but while the actual hardware allows the > PMIC to control the voltage. > > Also, in the near future please finalize your earlier work where you > add MMCIF support to the DT reference board support - a separate > commit is fine with me, but make sure it gets merged. With pinmux set up in .c? > Apart from that, > > Acked-by: Magnus Damm <damm@opensource.se> Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jul 5, 2013 at 4:15 PM, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote: > On Fri, 5 Jul 2013, Magnus Damm wrote: > >> Hi Guennadi, >> >> Thanks for your efforts on this. >> >> On Fri, Jul 5, 2013 at 5:38 AM, Guennadi Liakhovetski >> <g.liakhovetski@gmx.de> wrote: >> > Add MMCIF support to the APE6EVM board in both PIO and DMA modes, depending >> > on the DMAC driver availability. >> > >> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> >> >> This also goes without saying, but please add comments in the code and >> in the commit log explaining how the current implementation assumes >> the voltage to be static, but while the actual hardware allows the >> PMIC to control the voltage. >> >> Also, in the near future please finalize your earlier work where you >> add MMCIF support to the DT reference board support - a separate >> commit is fine with me, but make sure it gets merged. > > With pinmux set up in .c? It depends on timing. Since you have C version working now I recommend to commit that as-is first. Whenever Simon rebases to -rc1 then it should be possible to use the final PFC / GPIO DT patches from Laurent and then the C pinmux bits can finally be converted to DT. Makes sense? / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index af6dd39..05f8557 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -21,6 +21,8 @@ #include <linux/gpio.h> #include <linux/interrupt.h> #include <linux/kernel.h> +#include <linux/mmc/host.h> +#include <linux/mmc/sh_mmcif.h> #include <linux/pinctrl/machine.h> #include <linux/platform_device.h> #include <linux/regulator/fixed.h> @@ -54,6 +56,24 @@ static const struct smsc911x_platform_config lan9220_data = { .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, }; +/* Fixed 3.3V regulator to be used by MMCIF */ +static struct regulator_consumer_supply fixed3v3_power_consumers[] = +{ + REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"), +}; + +/* MMCIF */ +static struct sh_mmcif_plat_data mmcif0_pdata = { + .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, + .slave_id_tx = SHDMA_SLAVE_MMCIF0_TX, + .slave_id_rx = SHDMA_SLAVE_MMCIF0_RX, +}; + +static struct resource mmcif0_resources[] = { + DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), + DEFINE_RES_IRQ(gic_spi(169)), +}; + static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SCIFA0 console */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", @@ -61,6 +81,11 @@ static const struct pinctrl_map ape6evm_pinctrl_map[] = { /* SMSC */ PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a73a4", "irqc_irq40", "irqc"), + /* MMCIF0 */ + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", + "mmc0_data8", "mmc0"), + PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-r8a73a4", + "mmc0_ctrl", "mmc0"), }; static void __init ape6evm_add_standard_devices(void) @@ -93,6 +118,11 @@ static void __init ape6evm_add_standard_devices(void) platform_device_register_resndata(&platform_bus, "smsc911x", -1, lan9220_res, ARRAY_SIZE(lan9220_res), &lan9220_data, sizeof(lan9220_data)); + regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, + ARRAY_SIZE(fixed3v3_power_consumers), 3300000); + platform_device_register_resndata(&platform_bus, "sh_mmcif", 0, + mmcif0_resources, ARRAY_SIZE(mmcif0_resources), + &mmcif0_pdata, sizeof(mmcif0_pdata)); } static const char *ape6evm_boards_compat_dt[] __initdata = {
Add MMCIF support to the APE6EVM board in both PIO and DMA modes, depending on the DMAC driver availability. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com> --- arch/arm/mach-shmobile/board-ape6evm.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)