From patchwork Thu Aug 11 04:55:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanwoo Choi X-Patchwork-Id: 1055772 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7B4vZg7028980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Aug 2011 04:57:56 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QrNKZ-000571-1f; Thu, 11 Aug 2011 04:57:20 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QrNKB-0007Qi-AG; Thu, 11 Aug 2011 04:56:55 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QrNJ6-00079w-Hv for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2011 04:55:50 +0000 Received: from epcpsbgm2.samsung.com (mailout1.samsung.com [203.254.224.24]) by mailout1.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LPQ00H8KZ0IC420@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2011 13:55:44 +0900 (KST) X-AuditID: cbfee61b-b7c3dae000002cb8-dd-4e4360d07cb8 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 4B.7C.11448.0D0634E4; Thu, 11 Aug 2011 13:55:44 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LPQ00AF1Z0XZ8@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2011 13:55:45 +0900 (KST) Received: from [127.0.0.1] ([165.213.219.84]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Thu, 11 Aug 2011 13:56:19 +0900 Date: Thu, 11 Aug 2011 13:55:22 +0900 From: Chanwoo Choi Subject: [PATCH 4/4] ARM: EXYNOS4: Add power domain to use generic Power domain Framework To: Kukjin Kim , "Rafael J. Wysocki" , Russell King - ARM Linux Message-id: <4E4360BA.3020208@samsung.com> MIME-version: 1.0 User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) X-OriginalArrivalTime: 11 Aug 2011 04:56:19.0740 (UTC) FILETIME=[027645C0:01CC57E3] X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110811_005548_955115_1779AB5E X-CRM114-Status: GOOD ( 19.00 ) X-Spam-Score: -3.1 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.24 listed in list.dnswl.org] -0.8 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Kyungmin Park , linux-samsung-soc , linux-pm@lists.linux-foundation.org, linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 11 Aug 2011 04:57:56 +0000 (UTC) This patch initializes the power domain of EXYNOS4210. The devices which suppot runtime-PM have to be added in specific power domain. Signed-off-by: Chanwoo Choi Signed-off-by: Kyungmin Park --- arch/arm/mach-exynos4/mach-nuri.c | 18 ++++++++++++++++++ arch/arm/mach-exynos4/mach-smdkc210.c | 18 ++++++++++++++++++ arch/arm/mach-exynos4/mach-smdkv310.c | 15 +++++++++++++++ arch/arm/mach-exynos4/mach-universal_c210.c | 18 ++++++++++++++++++ 4 files changed, 69 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index 4c358cb..5844c55 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c @@ -44,6 +44,7 @@ #include #include +#include /* Following are default values for UCON, ULCON and UFCON UART registers */ #define NURI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -1125,6 +1126,21 @@ static void __init nuri_reserve(void) s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); } +static void __init nuri_power_domain_init(void) +{ + /* Initialize Power domain */ + exynos4210_init_pm_domain(&exynos4210_pd_mfc); + exynos4210_init_pm_domain(&exynos4210_pd_g3d); + exynos4210_init_pm_domain(&exynos4210_pd_lcd0); + exynos4210_init_pm_domain(&exynos4210_pd_lcd1); + exynos4210_init_pm_domain(&exynos4210_pd_tv); + exynos4210_init_pm_domain(&exynos4210_pd_cam); + exynos4210_init_pm_domain(&exynos4210_pd_gps); + + /* Add device to MFC power domain */ + exynos4210_add_device_to_domain(&exynos4210_pd_mfc, &s5p_device_mfc); +} + static void __init nuri_machine_init(void) { nuri_sdhci_init(); @@ -1145,6 +1161,8 @@ static void __init nuri_machine_init(void) /* Last */ platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); + + nuri_power_domain_init(); } MACHINE_START(NURI, "NURI") diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c index 4d1976c..0a3b2a9 100644 --- a/arch/arm/mach-exynos4/mach-smdkc210.c +++ b/arch/arm/mach-exynos4/mach-smdkc210.c @@ -37,6 +37,7 @@ #include #include +#include /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -273,6 +274,21 @@ static void __init smdkc210_map_io(void) s3c24xx_init_uarts(smdkc210_uartcfgs, ARRAY_SIZE(smdkc210_uartcfgs)); } +static void __init smdkc210_power_domain_init(void) +{ + /* Initialize Power domain */ + exynos4210_init_pm_domain(&exynos4210_pd_mfc); + exynos4210_init_pm_domain(&exynos4210_pd_g3d); + exynos4210_init_pm_domain(&exynos4210_pd_lcd0); + exynos4210_init_pm_domain(&exynos4210_pd_lcd1); + exynos4210_init_pm_domain(&exynos4210_pd_tv); + exynos4210_init_pm_domain(&exynos4210_pd_cam); + exynos4210_init_pm_domain(&exynos4210_pd_gps); + + /* Add device to LCD0 power domain */ + exynos4210_add_device_to_domain(&exynos4210_pd_lcd0, &s5p_device_fimd0); +} + static void __init smdkc210_machine_init(void) { s3c_i2c1_set_platdata(NULL); @@ -289,6 +305,8 @@ static void __init smdkc210_machine_init(void) s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata); platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); + + smdkc210_power_domain_init(); } MACHINE_START(SMDKC210, "SMDKC210") diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index 8c2819b..320c7f3 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c @@ -33,6 +33,7 @@ #include #include +#include /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -225,6 +226,18 @@ static void __init smdkv310_map_io(void) s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); } +static void __init smdkv310_power_domain_init(void) +{ + /* Initialize Power domain */ + exynos4210_init_pm_domain(&exynos4210_pd_mfc); + exynos4210_init_pm_domain(&exynos4210_pd_g3d); + exynos4210_init_pm_domain(&exynos4210_pd_lcd0); + exynos4210_init_pm_domain(&exynos4210_pd_lcd1); + exynos4210_init_pm_domain(&exynos4210_pd_tv); + exynos4210_init_pm_domain(&exynos4210_pd_cam); + exynos4210_init_pm_domain(&exynos4210_pd_gps); +} + static void __init smdkv310_machine_init(void) { s3c_i2c1_set_platdata(NULL); @@ -242,6 +255,8 @@ static void __init smdkv310_machine_init(void) samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); + + smdkv310_power_domain_init(); } MACHINE_START(SMDKV310, "SMDKV310") diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index 43998f0..1ebc907 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c @@ -36,6 +36,7 @@ #include #include +#include /* Following are default values for UCON, ULCON and UFCON UART registers */ #define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -737,6 +738,21 @@ static void __init universal_reserve(void) s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); } +static void __init universal_power_domain_init(void) +{ + /* Initialize Power domain */ + exynos4210_init_pm_domain(&exynos4210_pd_mfc); + exynos4210_init_pm_domain(&exynos4210_pd_g3d); + exynos4210_init_pm_domain(&exynos4210_pd_lcd0); + exynos4210_init_pm_domain(&exynos4210_pd_lcd1); + exynos4210_init_pm_domain(&exynos4210_pd_tv); + exynos4210_init_pm_domain(&exynos4210_pd_cam); + exynos4210_init_pm_domain(&exynos4210_pd_gps); + + /* Add device to MFC power domain */ + exynos4210_add_device_to_domain(&exynos4210_pd_mfc, &s5p_device_mfc); +} + static void __init universal_machine_init(void) { universal_sdhci_init(); @@ -757,6 +773,8 @@ static void __init universal_machine_init(void) /* Last */ platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); + + universal_power_domain_init(); } MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")