From patchwork Fri Apr 12 13:47:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 2435791 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D200C3FD40 for ; Fri, 12 Apr 2013 13:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754949Ab3DLNsA (ORCPT ); Fri, 12 Apr 2013 09:48:00 -0400 Received: from gloria.sntech.de ([95.129.55.99]:41430 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754587Ab3DLNr7 (ORCPT ); Fri, 12 Apr 2013 09:47:59 -0400 Received: from 146-52-52-35-dynip.superkabel.de ([146.52.52.35] helo=marty.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1UQeKc-0003E6-7k; Fri, 12 Apr 2013 15:47:58 +0200 From: Heiko =?iso-8859-15?q?St=FCbner?= To: Alexander Varnin Subject: Re: sdhci-s3c suspends immediately Date: Fri, 12 Apr 2013 15:47:56 +0200 User-Agent: KMail/1.13.7 (Linux/3.2.0-3-686-pae; KDE/4.8.4; i686; ; ) Cc: linux-samsung-soc@vger.kernel.org References: <5167FC1D.7020601@mail.ru> In-Reply-To: <5167FC1D.7020601@mail.ru> MIME-Version: 1.0 Message-Id: <201304121547.56887.heiko@sntech.de> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Hi Alexander, Am Freitag, 12. April 2013, 14:20:45 schrieb Alexander Varnin: > Hello. I'm trying to bring up sdhci-s3c driver on S3C2443 SOC. > It seems to initialize correctly, but immediately after that it get > suspended by some force. This turns off all interrupts, so SD controller > doesn't work. I don't know, where suspend command comes from, but whole > system stay in working state. > I've recorded some boot log with extended verbose for a driver. It is > attached. > > I want to understand, why and where does this command come from. And how > to turn it off. Now there is no suspend support working on my board, but > i don't want to turn suspend (PM runtime) off at all, because it may be > need to set it up in future. > Please, help. This is called runtime-suspend and is meant to put the hardware block in a low power mode when it's not used. While suspend-to-ram puts the whole system to sleep the runtime-powermanagement is meant to reduce the power consumption of the running system by turning of unused components. Normally the controller will be woken up, when a card detect event is found, but in the mach-smdk2443.c there does not seem to be any configured. Try adding something like the attached diff (only compile-tested) to your board file, which simply tells the driver that the card is always present for testing purposes. To finalze this you will need to determine how the card detect is really managed for the channel on your board (via a gpio or similar) Good luck Heiko ------------ 8< ----------------- &s3c_device_i2c0, @@ -133,6 +139,8 @@ static void __init smdk2443_machine_init(void) s3c24xx_ac97_setup_gpio(S3C24XX_AC97_GPE0); #endif + s3c_sdhci1_set_platdata(&smdk2443_hsmmc1_pdata); + platform_add_devices(smdk2443_devices, ARRAY_SIZE(smdk2443_devices)); smdk_machine_init(); } --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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-s3c24xx/mach-smdk2443.c b/arch/arm/mach- s3c24xx/mach-smdk2443.c index 9435c3b..499d048 100644 --- a/arch/arm/mach-s3c24xx/mach-smdk2443.c +++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c @@ -42,6 +42,7 @@ #include #include #include +#include #include "common.h" #include "common-smdk.h" @@ -108,6 +109,11 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = { } }; +static struct s3c_sdhci_platdata smdk2443_hsmmc1_pdata __initdata = { + .max_width = 4, + .cd_type = S3C_SDHCI_CD_PERMANENT, +}; + static struct platform_device *smdk2443_devices[] __initdata = { &s3c_device_wdt,