From patchwork Sat May 10 07:20:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 4147181 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C68A69F23C for ; Sat, 10 May 2014 07:02:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC476201B4 for ; Sat, 10 May 2014 07:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE2F520263 for ; Sat, 10 May 2014 07:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756986AbaEJHCK (ORCPT ); Sat, 10 May 2014 03:02:10 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:27970 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756801AbaEJHCH (ORCPT ); Sat, 10 May 2014 03:02:07 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5C006KAJJIOAB0@mailout3.samsung.com>; Sat, 10 May 2014 16:02:06 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.48]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 2A.85.11120.EEECD635; Sat, 10 May 2014 16:02:06 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-e0-536dceee9f79 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 9B.51.25708.DEECD635; Sat, 10 May 2014 16:02:06 +0900 (KST) Received: from localhost.localdomain ([12.36.165.191]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5C00A3FJJBOO70@mmp1.samsung.com>; Sat, 10 May 2014 16:02:05 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: kgene.kim@samsung.com, t.figa@samsung.com, arnd@arndb.de, Pankaj Dubey , Russell King Subject: [PATCH v3 2/6] ARM: EXYNOS: Remove i2c sys configuration related code Date: Sat, 10 May 2014 16:20:15 +0900 Message-id: <1399706419-13976-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399706419-13976-1-git-send-email-pankaj.dubey@samsung.com> References: <1399706287-13919-1-git-send-email-y@samsung.com> <1399706419-13976-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t8zA91353KDDZrusVv8nXSM3aJ3wVU2 i02Pr7FaXN41h81ixvl9TBa3L/NaLNr6hd1i/YzXLA4cHi3NPWwev39NYvTYvKTeo2/LKkaP z5vkAlijuGxSUnMyy1KL9O0SuDIali5lLNigVbF152umBsY1Sl2MnBwSAiYSx6+3s0DYYhIX 7q1nA7GFBJYxSqxaWgBTs/rPZqYuRi6g+CJGiU/rl0I5bUwSzU3HmUGq2AR0JZ68nwtmiwhk S1xpvM8MUsQs0Mco0fnmF9hYYQE/ib4Vz9hBbBYBVYkth7+BxXkFPCRWXbnM2MXIAbROQWLO JBuQMKeAp8SOH11QF9VILG94wQgyU0JgFbvE7B2/mCHmCEh8m3yIBaJXVmLTAWaIqyUlDq64 wTKBUXgBI8MqRtHUguSC4qT0ImO94sTc4tK8dL3k/NxNjJBg79/BePeA9SHGZKBxE5mlRJPz gdGSVxJvaGxmZGFqYmpsZG5pR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dGqEkkzMD95ft1Hvn8rGP3obtaasrGWvnyizmHdm9HQlluKMREMt5qLi RAA9dODg6gIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since all these code has been moved into i2c driver, now we can safely remove them from machine files. CC: Russell King Signed-off-by: Pankaj Dubey Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/exynos.c | 38 +------------------------------ arch/arm/mach-exynos/include/mach/map.h | 3 --- arch/arm/mach-exynos/pm.c | 10 -------- arch/arm/mach-exynos/regs-sys.h | 22 ------------------ 4 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 arch/arm/mach-exynos/regs-sys.h diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 59eb1f1..09063ee 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -29,11 +29,11 @@ #include #include +#include #include "common.h" #include "mfc.h" #include "regs-pmu.h" -#include "regs-sys.h" #define L2_AUX_VAL 0x7C470001 #define L2_AUX_MASK 0xC200ffff @@ -42,11 +42,6 @@ static struct regmap *exynos_pmu_regmap; static struct map_desc exynos4_iodesc[] __initdata = { { - .virtual = (unsigned long)S3C_VA_SYS, - .pfn = __phys_to_pfn(EXYNOS4_PA_SYSCON), - .length = SZ_64K, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)S3C_VA_TIMER, .pfn = __phys_to_pfn(EXYNOS4_PA_TIMER), .length = SZ_16K, @@ -116,11 +111,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { static struct map_desc exynos5_iodesc[] __initdata = { { - .virtual = (unsigned long)S3C_VA_SYS, - .pfn = __phys_to_pfn(EXYNOS5_PA_SYSCON), - .length = SZ_64K, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)S3C_VA_TIMER, .pfn = __phys_to_pfn(EXYNOS5_PA_TIMER), .length = SZ_16K, @@ -293,32 +283,6 @@ void __init exynos_map_pmu(void) static void __init exynos_dt_machine_init(void) { - struct device_node *i2c_np; - const char *i2c_compat = "samsung,s3c2440-i2c"; - unsigned int tmp; - int id; - - /* - * Exynos5's legacy i2c controller and new high speed i2c - * controller have muxed interrupt sources. By default the - * interrupts for 4-channel HS-I2C controller are enabled. - * If node for first four channels of legacy i2c controller - * are available then re-configure the interrupts via the - * system register. - */ - if (soc_is_exynos5()) { - for_each_compatible_node(i2c_np, NULL, i2c_compat) { - if (of_device_is_available(i2c_np)) { - id = of_alias_get_id(i2c_np, "i2c"); - if (id < 4) { - tmp = readl(EXYNOS5_SYS_I2C_CFG); - writel(tmp & ~(0x1 << id), - EXYNOS5_SYS_I2C_CFG); - } - } - } - } - exynos_map_pmu(); if (!soc_is_exynos5440()) diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 34eee6e..bd4a320 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -25,9 +25,6 @@ #define EXYNOS_PA_CHIPID 0x10000000 -#define EXYNOS4_PA_SYSCON 0x10010000 -#define EXYNOS5_PA_SYSCON 0x10050100 - #define EXYNOS4_PA_CMU 0x10030000 #define EXYNOS5_PA_CMU 0x10010000 diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index a7a1b7f..59e5604 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -37,7 +37,6 @@ #include "common.h" #include "regs-pmu.h" -#include "regs-sys.h" #include "exynos-pmu.h" static struct regmap *pmu_regmap; @@ -52,10 +51,6 @@ struct exynos_wkup_irq { u32 mask; }; -static struct sleep_save exynos5_sys_save[] = { - SAVE_ITEM(EXYNOS5_SYS_I2C_CFG), -}; - static struct sleep_save exynos_core_save[] = { /* SROM side */ SAVE_ITEM(S5P_SROM_BW), @@ -211,7 +206,6 @@ static void exynos_pm_prepare(void) s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); if (soc_is_exynos5250()) { - s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save)); /* Disable USE_RETENTION of JPEG_MEM_OPTION */ regmap_read(pmu_regmap, EXYNOS5_JPEG_MEM_OPTION, &tmp); tmp &= ~EXYNOS5_OPTION_USE_RETENTION; @@ -296,10 +290,6 @@ static void exynos_pm_resume(void) regmap_write(pmu_regmap, S5P_PAD_RET_EBIA_OPTION, (1 << 28)); regmap_write(pmu_regmap, S5P_PAD_RET_EBIB_OPTION, (1 << 28)); - if (soc_is_exynos5250()) - s3c_pm_do_restore(exynos5_sys_save, - ARRAY_SIZE(exynos5_sys_save)); - s3c_pm_do_restore_core(exynos_core_save, ARRAY_SIZE(exynos_core_save)); if (!soc_is_exynos5250()) diff --git a/arch/arm/mach-exynos/regs-sys.h b/arch/arm/mach-exynos/regs-sys.h deleted file mode 100644 index 84332b0..0000000 --- a/arch/arm/mach-exynos/regs-sys.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * EXYNOS - system register definition - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_REGS_SYS_H -#define __ASM_ARCH_REGS_SYS_H __FILE__ - -#include - -#define S5P_SYSREG(x) (S3C_VA_SYS + (x)) - -/* For EXYNOS5 */ -#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234) - -#endif /* __ASM_ARCH_REGS_SYS_H */