From patchwork Tue Oct 21 16:17:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 39162 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 61E9C2039B for ; Tue, 21 Oct 2014 16:18:37 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf1057901lbg.1 for ; Tue, 21 Oct 2014 09:18:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=ZUDrh5ta690hEQvfi3hKA+kbm+KfQNco+zhzGL9bYiQ=; b=FpRFLyX0fMMw+6cilrfSqhgZJi+rTAcMGkne05Jnvp3THrYwnfUa21NOID5R9hHj3P xSU+WRqfIeGZPc+rhkS2ZO0WuNnbv5vALfM4vBTbzpEuad5LG7rdza4b0WYgm8+d9ttN W95g1UmL4WNmcuYbZNG/99cU4HnvSHv96dLUMiewAhI+5LAhqRGg89fr+HMR+yjNp9bq 1mBUqrlw8p2G0IOqDvcyPQjkhlHyHlJ2OMHogY0bZLF96BQK5ho6r4C4MrRZZUwB88Gg NFVgUjRfLFJZtij+2DplOfX6f4CLTNyHPRPJ8Gh3PZk519DOqoBQc5cEGl3WXPQ70t1z VkKQ== X-Gm-Message-State: ALoCoQl0UskJbiF9/w/I+C3qV3QCH7Q+qbbpRAdAPxIWmh9rNeu1m1gI342Turd/z7p+WMxYpy1N X-Received: by 10.180.182.164 with SMTP id ef4mr3744850wic.0.1413908314033; Tue, 21 Oct 2014 09:18:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.68 with SMTP id p4ls79152laa.52.gmail; Tue, 21 Oct 2014 09:18:33 -0700 (PDT) X-Received: by 10.112.54.162 with SMTP id k2mr35686059lbp.63.1413908313748; Tue, 21 Oct 2014 09:18:33 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id ud4si19663258lac.101.2014.10.21.09.18.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 09:18:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so1286339lbd.6 for ; Tue, 21 Oct 2014 09:18:33 -0700 (PDT) X-Received: by 10.112.130.41 with SMTP id ob9mr35216289lbb.74.1413908313637; Tue, 21 Oct 2014 09:18:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp532720lbz; Tue, 21 Oct 2014 09:18:32 -0700 (PDT) X-Received: by 10.70.35.72 with SMTP id f8mr12186211pdj.134.1413908311909; Tue, 21 Oct 2014 09:18:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ak3si11687123pbc.91.2014.10.21.09.18.31 for ; Tue, 21 Oct 2014 09:18:31 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756053AbaJUQSY (ORCPT + 27 others); Tue, 21 Oct 2014 12:18:24 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:56881 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755656AbaJUQSS (ORCPT ); Tue, 21 Oct 2014 12:18:18 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9LGHqgV009408; Tue, 21 Oct 2014 11:17:52 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LGHptI030533; Tue, 21 Oct 2014 11:17:52 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 21 Oct 2014 11:17:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9LGHpZ0008169; Tue, 21 Oct 2014 11:17:51 -0500 From: Nishanth Menon To: Tony Lindgren CC: , , , , "Franklin Cooper Jr." Subject: [PATCH] ARM: DRA7: hwmod data: Add missing UART hwmod data Date: Tue, 21 Oct 2014 11:17:51 -0500 Message-ID: <1413908271-666-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nm@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ambresh K We had constrainted hwmod entries to entries in dts which were present only for default mapped interrupts, the ones such as UARTs > 6 which needed IRQ crossbar configured were never added to hwmod database. Add them now that IRQ crossbar is functional Without this, enabling UARTs7 to 10 in dts results in the following crash: [ 1.893829] omap_uart 48420000.serial: _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info [ 1.903381] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 [ 1.903381] ------------[ cut here ]------------ [ 1.903381] WARNING: CPU: 0 PID: 0 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x2ac/0x32c() [ 1.903411] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER2_P3 (Read): Data Access in User mode during Functional access [ 1.903411] Modules linked in: [ 1.903411] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.18.0-rc1-dirty #3 [ 1.903442] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 1.903442] [] (show_stack) from [] (dump_stack+0x78/0x94) [ 1.903472] [] (dump_stack) from [] (warn_slowpath_common+0x6c/0x8c) [ 1.903472] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [ 1.903472] [] (warn_slowpath_fmt) from [] (l3_interrupt_handler+0x2ac/0x32c) [ 1.903503] [] (l3_interrupt_handler) from [] (handle_irq_event_percpu+0x60/0x230) [ 1.903503] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x3c/0x5c) [ 1.903503] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xc4/0x190) [ 1.903503] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x20/0x30) [ 1.903533] [] (generic_handle_irq) from [] (__handle_domain_irq+0x64/0xb8) [ 1.903533] [] (__handle_domain_irq) from [] (gic_handle_irq+0x20/0x60) [ 1.903533] [] (gic_handle_irq) from [] (__irq_svc+0x44/0x5c) [ 1.903533] Exception stack(0xc08d1f60 to 0xc08d1fa8) [ 1.903564] 1f60: 00000001 00000001 00000000 c08dc930 c08d0000 00000000 00000000 00000000 [ 1.903564] 1f80: ffffffed c0978028 c08d89dc c08d8978 00000000 c08d1fa8 c0083fc0 c000f160 [ 1.903564] 1fa0: 20000013 ffffffff [ 1.903564] [] (__irq_svc) from [] (arch_cpu_idle+0x20/0x3c) [ 1.903594] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x198/0x338) [ 1.903594] [] (cpu_startup_entry) from [] (start_kernel+0x358/0x3c4) [ 1.903594] [] (start_kernel) from [<80008074>] (0x80008074) [ 1.903594] ---[ end trace 293fc95d463cff71 ]--- [ 2.117553] Internal error: : 1406 [#1] SMP ARM [ 2.122314] Modules linked in: [ 2.125518] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 3.18.0-rc1-dirty #3 [ 2.133850] task: ed868b80 ti: ed86a000 task.ti: ed86a000 [ 2.139526] PC is at serial_omap_probe+0x2fc/0x514 [ 2.144561] LR is at trace_hardirqs_on_caller+0xec/0x1c4 [ 2.150146] pc : [] lr : [] psr: 40000013 [ 2.150146] sp : ed86be18 ip : ed9bb57c fp : f005e000 [ 2.162231] r10: 0000012a r9 : ed9b4f80 r8 : edc5bdcd [ 2.167724] r7 : edc58810 r6 : ed9bb400 r5 : ed9bb410 r4 : edc5bc10 [ 2.174560] r3 : 00000000 r2 : 00000000 r1 : 00000014 r0 : ffffffed [ 2.181427] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 2.189117] Control: 10c5387d Table: 8000406a DAC: 00000015 [ 2.195159] Process swapper/0 (pid: 1, stack limit = 0xed86a248) [ 2.201477] Stack: (0xed86be18 to 0xed86c000) [ 2.206054] be00: ed9ba2d0 00000000 [ 2.214660] be20: edc50150 00000001 c08cba58 00000000 00000000 ed9bb410 ffffffed c09481d8 [ 2.223236] be40: 00000000 c09481d8 c08cba58 00000000 00000000 c039bcfc c1170958 ed9bb410 [ 2.231842] be60: ed9bb444 c039a6f4 00000000 ed9bb410 c09481d8 ed9bb444 00000000 c08dc698 [ 2.240447] be80: edc4a100 c039a8b0 c09481d8 c039a81c 00000000 c0399060 ed8afaa8 ed92c110 [ 2.249053] bea0: c09481d8 edc482c0 c0949308 c0399ee0 c077f80c c09481d8 ed86a000 c09481d8 [ 2.257659] bec0: ed86a000 c08dc698 00000000 c039b088 00000000 00000000 ed86a000 c08a1924 [ 2.266235] bee0: c08a1904 c00089c4 00000000 00000000 00000000 00000000 60000093 00000000 [ 2.274841] bf00: 00000004 00000000 ed868b80 00000004 00000000 60000053 00000000 00000001 [ 2.283447] bf20: 00000000 c0083ea8 00000001 ed86a000 c08334bc ef7fc307 000000b2 c0059358 [ 2.292053] bf40: c07e176c c083299c 00000006 00000006 c08cb588 c08b69cc 00000006 c08b69ac [ 2.300659] bf60: c097a280 000000b2 c08cba58 c0869588 00000000 c0869e04 00000006 00000006 [ 2.309234] bf80: c0869588 00000000 00000000 c05dfd7c 00000000 00000000 00000000 00000000 [ 2.317840] bfa0: 00000000 c05dfd84 00000000 c000e668 00000000 00000000 00000000 00000000 [ 2.326446] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 2.335052] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 020405d0 00090c40 [ 2.343658] [] (serial_omap_probe) from [] (platform_drv_probe+0x48/0x98) [ 2.352630] [] (platform_drv_probe) from [] (driver_probe_device+0x10c/0x234) [ 2.361968] [] (driver_probe_device) from [] (__driver_attach+0x94/0x98) [ 2.370819] [] (__driver_attach) from [] (bus_for_each_dev+0x54/0x88) [ 2.379425] [] (bus_for_each_dev) from [] (bus_add_driver+0xdc/0x1d4) [ 2.388031] [] (bus_add_driver) from [] (driver_register+0x78/0xf4) [ 2.396453] [] (driver_register) from [] (serial_omap_init+0x20/0x40) [ 2.405059] [] (serial_omap_init) from [] (do_one_initcall+0x80/0x1cc) [ 2.413757] [] (do_one_initcall) from [] (kernel_init_freeable+0x1b8/0x28c) [ 2.422912] [] (kernel_init_freeable) from [] (kernel_init+0x8/0xe4) [ 2.431396] [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) [ 2.439361] Code: e1b02f23 020320f0 0203300f 01a02222 (0a000021) [ 2.445770] ---[ end trace 293fc95d463cff72 ]--- [ 2.450683] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 2.450683] [ 2.460296] CPU0: stopping [ 2.463134] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D W 3.18.0-rc1-dirty #3 [ 2.471405] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 2.479522] [] (show_stack) from [] (dump_stack+0x78/0x94) [ 2.487060] [] (dump_stack) from [] (handle_IPI+0x190/0x264) [ 2.494781] [] (handle_IPI) from [] (gic_handle_irq+0x58/0x60) [ 2.502716] [] (gic_handle_irq) from [] (__irq_svc+0x44/0x5c) [ 2.510528] Exception stack(0xc08d1f60 to 0xc08d1fa8) [ 2.515808] 1f60: c000f15c 00000000 00000000 00000000 c08d0000 00000000 00000000 00000000 [ 2.524353] 1f80: ffffffed c0978028 c08d89dc c08d8978 00000000 c08d1fa8 c000f15c c000f160 [ 2.532897] 1fa0: 60000013 ffffffff [ 2.536529] [] (__irq_svc) from [] (arch_cpu_idle+0x20/0x3c) [ 2.544281] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x198/0x338) [ 2.552917] [] (cpu_startup_entry) from [] (start_kernel+0x358/0x3c4) [ 2.561462] [] (start_kernel) from [<80008074>] (0x80008074) [ 2.568298] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ Reported-by: Franklin Cooper Jr. Signed-off-by: Nishanth Menon Signed-off-by: Ambresh K --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 100 +++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 5684f11..e2a7043 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -2075,6 +2075,70 @@ static struct omap_hwmod dra7xx_uart6_hwmod = { }, }; +/* uart7 */ +static struct omap_hwmod dra7xx_uart7_hwmod = { + .name = "uart7", + .class = &dra7xx_uart_hwmod_class, + .clkdm_name = "l4per2_clkdm", + .main_clk = "uart7_gfclk_mux", + .flags = HWMOD_SWSUP_SIDLE_ACT, + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_L4PER2_UART7_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_L4PER2_UART7_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* uart8 */ +static struct omap_hwmod dra7xx_uart8_hwmod = { + .name = "uart8", + .class = &dra7xx_uart_hwmod_class, + .clkdm_name = "l4per2_clkdm", + .main_clk = "uart8_gfclk_mux", + .flags = HWMOD_SWSUP_SIDLE_ACT, + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_L4PER2_UART8_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_L4PER2_UART8_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* uart9 */ +static struct omap_hwmod dra7xx_uart9_hwmod = { + .name = "uart9", + .class = &dra7xx_uart_hwmod_class, + .clkdm_name = "l4per2_clkdm", + .main_clk = "uart9_gfclk_mux", + .flags = HWMOD_SWSUP_SIDLE_ACT, + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_L4PER2_UART9_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_L4PER2_UART9_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* uart10 */ +static struct omap_hwmod dra7xx_uart10_hwmod = { + .name = "uart10", + .class = &dra7xx_uart_hwmod_class, + .clkdm_name = "wkupaon_clkdm", + .main_clk = "uart10_gfclk_mux", + .flags = HWMOD_SWSUP_SIDLE_ACT, + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_WKUPAON_UART10_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_WKUPAON_UART10_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + /* * 'usb_otg_ss' class * @@ -3095,6 +3159,38 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart6 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l4_per2 -> uart7 */ +static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart7 = { + .master = &dra7xx_l4_per2_hwmod, + .slave = &dra7xx_uart7_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l4_per2 -> uart8 */ +static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart8 = { + .master = &dra7xx_l4_per2_hwmod, + .slave = &dra7xx_uart8_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l4_per2 -> uart9 */ +static struct omap_hwmod_ocp_if dra7xx_l4_per2__uart9 = { + .master = &dra7xx_l4_per2_hwmod, + .slave = &dra7xx_uart9_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l4_wkup -> uart10 */ +static struct omap_hwmod_ocp_if dra7xx_l4_wkup__uart10 = { + .master = &dra7xx_l4_wkup_hwmod, + .slave = &dra7xx_uart10_hwmod, + .clk = "wkupaon_iclk_mux", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l4_per3 -> usb_otg_ss1 */ static struct omap_hwmod_ocp_if dra7xx_l4_per3__usb_otg_ss1 = { .master = &dra7xx_l4_per3_hwmod, @@ -3259,6 +3355,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per1__uart4, &dra7xx_l4_per1__uart5, &dra7xx_l4_per1__uart6, + &dra7xx_l4_per2__uart7, + &dra7xx_l4_per2__uart8, + &dra7xx_l4_per2__uart9, + &dra7xx_l4_wkup__uart10, &dra7xx_l4_per3__usb_otg_ss1, &dra7xx_l4_per3__usb_otg_ss2, &dra7xx_l4_per3__usb_otg_ss3,