From patchwork Fri Jun 14 22:40:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2725281 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A81E2C0AB1 for ; Fri, 14 Jun 2013 22:40:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9529120223 for ; Fri, 14 Jun 2013 22:40:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7985320227 for ; Fri, 14 Jun 2013 22:40:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753565Ab3FNWkJ (ORCPT ); Fri, 14 Jun 2013 18:40:09 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:61360 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839Ab3FNWkI (ORCPT ); Fri, 14 Jun 2013 18:40:08 -0400 Received: from wuerfel.localnet (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MK8g5-1UoS002lYT-001PFr; Sat, 15 Jun 2013 00:39:33 +0200 From: Arnd Bergmann To: Tomasz Figa Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kukjin Kim , Olof Johansson , Marek Szyprowski , Sylwester Nawrocki , Thomas Abraham Subject: Re: [PATCH 00/28] Twenty eight patches big Exynos cleanup Date: Sat, 15 Jun 2013 00:40:05 +0200 Message-ID: <44606956.qkeEi5jTbO@wuerfel> User-Agent: KMail/4.10.3 (Linux/3.9.0-2-generic; KDE/4.10.3; x86_64; ; ) In-Reply-To: <1371238384-1504-1-git-send-email-t.figa@samsung.com> References: <1371238384-1504-1-git-send-email-t.figa@samsung.com> MIME-Version: 1.0 X-Provags-ID: V02:K0:tSvkAfcA8HgIfFBgSGqaVRe6sLVhtWvFRY5sTa+htdT kcMfdMIBH81wdgpUbdO4TNaRxvVRz1bAuxOkx+vIDjrU6oiDz3 +e+NzMggnFzD0QB10jxWtN3DBpC8O3istuzM9kw2uPRnEjWLKw meBhLfb+NohxIfn/Nlw4biH1cvma2SVeZ8mxuTqXNrRj/I7K1b PteddXbO1S9NxHGaNxD7cFaD74R88xSxOKfKiIPw8t521qPTxz q7z/vV6Y8bCqKR7JvJmBu8j2Rp+F3oaxMz8mPRECz03IjDRg0K YkkmX8yZaO5VuPoTihExL/XEKfSwoYRbzQgwGG123oeyWeW1n3 riF9vYMmhxM1Ok0aDCiE= 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.2 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 fwiw, I compared the patches now, and got to this diff. You had more things that I missed, these are the ones I found that you didn't have. Feel free to integrate them into your series, with or without my signed-off-by, as they are all trivial and they still need to be split up and described. Signed-off-by: Arnd Bergmann --- 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-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index fe75a65..f36a762 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -110,23 +110,6 @@ config MACH_EXYNOS5_DT Machine support for Samsung EXYNOS5 machine with device tree enabled. Select this if a fdt blob is available for the EXYNOS5 SoC based board. -if ARCH_EXYNOS4 - -comment "Configuration for HSMMC 8-bit bus width" - -config EXYNOS4_SDHCI_CH0_8BIT - bool "Channel 0 with 8-bit bus" - help - Support HSMMC Channel 0 8-bit bus. - If selected, Channel 1 is disabled. - -config EXYNOS4_SDHCI_CH2_8BIT - bool "Channel 2 with 8-bit bus" - help - Support HSMMC Channel 2 8-bit bus. - If selected, Channel 3 is disabled. -endif - endmenu endif diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 7b53e4c..a14ef64 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -60,8 +60,6 @@ static void exynos5_map_io(void); static void exynos5440_map_io(void); static int exynos_init(void); -unsigned long xxti_f = 0, xusbxti_f = 0; - static struct cpu_table cpu_ids[] __initdata = { { .idcode = EXYNOS4210_CPU_ID, @@ -322,7 +320,7 @@ void __init exynos_init_late(void) exynos_pm_late_initcall(); } -int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, +static int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, int depth, void *data) { struct map_desc iodesc; @@ -351,15 +349,12 @@ int __init exynos_fdt_map_chipid(unsigned long node, const char *uname, * register the standard cpu IO areas */ -void __init exynos_init_io(struct map_desc *mach_desc, int size) +void __init exynos_init_io(void) { debug_ll_io_init(); of_scan_flat_dt(exynos_fdt_map_chipid, NULL); - if (mach_desc) - iotable_init(mach_desc, size); - /* detect cpu id and rev. */ s5p_init_cpu(S5P_VA_CHIPID); @@ -400,12 +395,7 @@ void __init exynos_init_time(void) clocksource_of_init(); } -void __init exynos4_init_irq(void) -{ - irqchip_init(); -} - -void __init exynos5_init_irq(void) +void __init exynos_init_irq(void) { irqchip_init(); } @@ -425,7 +415,6 @@ static int __init exynos_core_init(void) } core_initcall(exynos_core_init); -#ifdef CONFIG_CACHE_L2X0 static int __init exynos4_l2x0_cache_init(void) { int ret; @@ -437,47 +426,10 @@ static int __init exynos4_l2x0_cache_init(void) if (!ret) { l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); - return 0; } - - if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) { - l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC; - /* TAG, Data Latency Control: 2 cycles */ - l2x0_saved_regs.tag_latency = 0x110; - - if (soc_is_exynos4212() || soc_is_exynos4412()) - l2x0_saved_regs.data_latency = 0x120; - else - l2x0_saved_regs.data_latency = 0x110; - - l2x0_saved_regs.prefetch_ctrl = 0x30000007; - l2x0_saved_regs.pwr_ctrl = - (L2X0_DYNAMIC_CLK_GATING_EN | L2X0_STNDBY_MODE_EN); - - l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); - - __raw_writel(l2x0_saved_regs.tag_latency, - S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL); - __raw_writel(l2x0_saved_regs.data_latency, - S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL); - - /* L2X0 Prefetch Control */ - __raw_writel(l2x0_saved_regs.prefetch_ctrl, - S5P_VA_L2CC + L2X0_PREFETCH_CTRL); - - /* L2X0 Power Control */ - __raw_writel(l2x0_saved_regs.pwr_ctrl, - S5P_VA_L2CC + L2X0_POWER_CTRL); - - clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); - clean_dcache_area(&l2x0_saved_regs, sizeof(struct l2x0_regs)); - } - - l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK); - return 0; + return ret; } early_initcall(exynos4_l2x0_cache_init); -#endif static int __init exynos_init(void) { diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index 11fc1e2..4410885 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -19,9 +19,8 @@ void exynos_init_time(void); extern unsigned long xxti_f, xusbxti_f; struct map_desc; -void exynos_init_io(struct map_desc *mach_desc, int size); -void exynos4_init_irq(void); -void exynos5_init_irq(void); +void exynos_init_io(void); +void exynos_init_irq(void); void exynos4_restart(char mode, const char *cmd); void exynos5_restart(char mode, const char *cmd); void exynos_init_late(void); diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b046b5..7966407 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -23,6 +23,10 @@ #include +/* + * FIXME: go through the list and remove from iotable + * all that are not essential + */ #define EXYNOS4_PA_SYSRAM0 0x02025000 #define EXYNOS4_PA_SYSRAM1 0x02020000 #define EXYNOS5_PA_SYSRAM 0x02020000 diff --git a/arch/arm/mach-exynos/include/mach/pm-core.h b/arch/arm/mach-exynos/include/mach/pm-core.h index 71e6b89..e40aa87 100644 --- a/arch/arm/mach-exynos/include/mach/pm-core.h +++ b/arch/arm/mach-exynos/include/mach/pm-core.h @@ -34,10 +34,7 @@ static inline void s3c_pm_debug_init_uart(void) static inline void s3c_pm_arch_prepare_irqs(void) { - u32 eintmask = s3c_irqwake_eintmask; - - if (of_have_populated_dt()) - eintmask = exynos_get_eint_wake_mask(); + u32 eintmask = exynos_get_eint_wake_mask(); __raw_writel(eintmask, S5P_EINT_WAKEUP_MASK); __raw_writel(s3c_irqwake_intmask & ~(1 << 31), S5P_WAKEUP_MASK); diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index b9ed834..20f0c04 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -23,15 +23,7 @@ #include "common.h" -static void __init exynos4_dt_map_io(void) -{ - exynos_init_io(NULL, 0); -} -static void __init exynos4_dt_machine_init(void) -{ - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); -} static char const *exynos4_dt_compat[] __initdata = { "samsung,exynos4210", @@ -55,10 +47,9 @@ static void __init exynos4_reserve(void) DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") /* Maintainer: Thomas Abraham */ .smp = smp_ops(exynos_smp_ops), - .init_irq = exynos4_init_irq, - .map_io = exynos4_dt_map_io, + .init_irq = exynos_init_irq, + .map_io = exynos_init_io, .init_early = exynos_firmware_init, - .init_machine = exynos4_dt_machine_init, .init_late = exynos_init_late, .init_time = exynos_init_time, .dt_compat = exynos4_dt_compat, diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 9596861..ef2b010 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -27,11 +27,6 @@ static u64 dma_mask64 = DMA_BIT_MASK(64); static u64 dma_mask32 = DMA_BIT_MASK(32); -static void __init exynos5_dt_map_io(void) -{ - exynos_init_io(NULL, 0); -} - static int exynos5440_platform_notifier(struct notifier_block *nb, unsigned long event, void *__dev) { @@ -104,9 +99,9 @@ static void __init exynos5_reserve(void) DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)") /* Maintainer: Kukjin Kim */ - .init_irq = exynos5_init_irq, .smp = smp_ops(exynos_smp_ops), - .map_io = exynos5_dt_map_io, + .init_irq = exynos_init_irq, + .map_io = exynos_init_io, .init_machine = exynos5_dt_machine_init, .init_late = exynos_init_late, .init_time = exynos_init_time,