From patchwork Sat May 12 13:37:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [GIT, PULL] Urgent fixes (for v3.4 if possible) for Renesas ARM-based platforms Date: Sat, 12 May 2012 03:37:36 -0000 From: Guennadi Liakhovetski X-Patchwork-Id: 158738 Message-Id: To: Olof Johansson Cc: Arnd Bergmann , Linux-sh list , Magnus Damm , "Rafael J. Wysocki" , "arm@kernel.org" , linux-arm-kernel@lists.infradead.org On Fri, 11 May 2012, Olof Johansson wrote: > On Fri, May 11, 2012 at 11:37 PM, Guennadi Liakhovetski > wrote: > > On Fri, 11 May 2012, Olof Johansson wrote: > > > >> Hej Magnus, > >> > >> On Fri, May 11, 2012 at 9:28 PM, Magnus Damm wrote: > >> > >> >>>  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas.git fixes > >> >> > >> >> No such branch (nor tag). > >> > > >> > I believe Rafael will get back to you about that when he gets to his computer. > >> > >> Yep, good. > >> > >> >>> Guennadi Liakhovetski (2): > >> >>>      ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper > >> >>>      ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper > >> >> > >> >> These seem to fix the long-standing build errors on the two platforms, > >> >> but that's impossible to tell from reading the commit messages (they > >> >> are empty). Care to add one describing why they're important to go in? > >> > > >> > I only know that a) some boards don't build without these fixes and b) > >> > they used to build just fine. > >> > > >> > Perhaps Guennadi [CC:ed] could be so kind to fill us in with the blanks? > >> > >> It was pretty obvious once I tried applying them and building that > >> they did indeed resolve the build errors. However, the reason I'm > >> asking for a better description is that when looking at just the pull > >> request, or even the patch full commit description, it was impossible > >> to tell why the patch was urgent as a fix. So, while I am not > >> questioning that the patch should be included, I'm just requesting to > >> make sure it's properly described. That's also good for historical > >> purposes when someone is reading the git logs a year from now, etc. > > > > Ok, sorry, I wasn't sure from the previous mail - would you prefer to > > actually extend their commit messages? As described here > > > > http://thread.gmane.org/gmane.linux.kernel.mmc/12744/focus=12748 > > > > These patches are a part of a patch-series, so, when they were submitted > > in that context, it was pretty obvious how they relate to the rest. > > However, unfortunately, they are now applied later than the main patches > > in that series, so, their purpose has become much less obvious, and their > > main feature now seems to be not the conversion of the affected platforms, > > but fixing the build. > > Yeah, that seems to be what happened here, so indeed by now the > commits are a bit out of context. > > > So, I think, we could use something like this in the > > patch descriptions: > > > > This also fixes modular mmc build on this platform by eliminating the use > > of an inline function, which calls into the mmc core. > > Sounds good, with a cut-and-paste of the build error that happens > without the patch for extra credit. > > Rafael, can you add the above or something like it to the commit > messages when you push out the fixes branch? Let me try to make it a bit easier yet: here are the biuld failures from both platforms: mackerel: arch/arm/mach-shmobile/built-in.o: In function `mackerel_sdhi0_gpio_cd': pfc-sh7372.c:(.text+0x1138): undefined reference to `mmc_detect_change' ag5evm: arch/arm/mach-shmobile/built-in.o: In function `ag5evm_sdhi0_gpio_cd': pfc-sh73a0.c:(.text+0x7c0): undefined reference to `mmc_detect_change' Also attaching to this email the patches with added patch descriptions and these error-logs. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ >From f777bac2a06ac4c08dea6a815a340e000ee0bdf6 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 16 Apr 2012 23:09:19 +0200 Subject: [PATCH 2/2] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper This also fixes the following modular mmc build failure: arch/arm/mach-shmobile/built-in.o: In function `mackerel_sdhi0_gpio_cd': pfc-sh7372.c:(.text+0x1138): undefined reference to `mmc_detect_change' on this platform by eliminating the use of an inline function, which calls into the mmc core. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Simon Horman Acked-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/board-ag5evm.c | 22 ++-------------------- 1 files changed, 2 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c index cb224a3..0891ec6 100644 --- a/arch/arm/mach-shmobile/board-ag5evm.c +++ b/arch/arm/mach-shmobile/board-ag5evm.c @@ -365,23 +365,13 @@ static struct platform_device mipidsi0_device = { }; /* SDHI0 */ -static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg) -{ - struct device *dev = arg; - struct sh_mobile_sdhi_info *info = dev->platform_data; - struct tmio_mmc_data *pdata = info->pdata; - - tmio_mmc_cd_wakeup(pdata); - - return IRQ_HANDLED; -} - static struct sh_mobile_sdhi_info sdhi0_info = { .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, - .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, + .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD, .tmio_caps = MMC_CAP_SD_HIGHSPEED, .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, + .cd_gpio = GPIO_PORT251, }; static struct resource sdhi0_resources[] = { @@ -557,7 +547,6 @@ static void __init ag5evm_init(void) lcd_backlight_reset(); /* enable SDHI0 on CN15 [SD I/F] */ - gpio_request(GPIO_FN_SDHICD0, NULL); gpio_request(GPIO_FN_SDHIWP0, NULL); gpio_request(GPIO_FN_SDHICMD0, NULL); gpio_request(GPIO_FN_SDHICLK0, NULL); @@ -566,13 +555,6 @@ static void __init ag5evm_init(void) gpio_request(GPIO_FN_SDHID0_1, NULL); gpio_request(GPIO_FN_SDHID0_0, NULL); - if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd, - IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, - "sdhi0 cd", &sdhi0_device.dev)) - sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD; - else - pr_warn("Unable to setup SDHI0 GPIO IRQ\n"); - /* enable SDHI1 on CN4 [WLAN I/F] */ gpio_request(GPIO_FN_SDHICLK1, NULL); gpio_request(GPIO_FN_SDHICMD1_PU, NULL); -- 1.7.2.5