From patchwork Wed Nov 11 17:07:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 7596901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 776139F2E9 for ; Wed, 11 Nov 2015 17:10:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F9372066E for ; Wed, 11 Nov 2015 17:10:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C65720667 for ; Wed, 11 Nov 2015 17:10:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZwYs2-0004Ts-Cx; Wed, 11 Nov 2015 17:07:42 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZwYry-0004Pu-1S for linux-arm-kernel@lists.infradead.org; Wed, 11 Nov 2015 17:07:39 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id tABH7DSP020907; Wed, 11 Nov 2015 11:07:13 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id tABH7DHG022525; Wed, 11 Nov 2015 11:07:13 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Wed, 11 Nov 2015 11:07:13 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id tABH7C0L023537; Wed, 11 Nov 2015 11:07:13 -0600 From: Felipe Balbi To: Paul Walmsley Subject: [PATCH] ARM: OMAP: DRA7: hwmod: Add data for McASP3 Date: Wed, 11 Nov 2015 11:07:11 -0600 Message-ID: <1447261631-26362-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151111_090738_188124_A2544049 X-CRM114-Status: GOOD ( 12.67 ) X-Spam-Score: -7.3 (-------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Lindgren , Linux OMAP Mailing List , Felipe Balbi , Linux ARM Kernel Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 From: Peter Ujfalusi McASP3 is used by default on DRA7x based boards for audio. This fixes following error with Beagle x15: [ 0.402190] platform 48468000.mcasp: Cannot lookup hwmod 'mcasp3' which is followed by a splat: [ 11.207663] Unhandled fault: imprecise external abort (0x1406) at 0x00000000 [ 11.207670] ------------[ cut here ]------------ [ 11.207683] WARNING: CPU: 0 PID: 272 at /home/balbi/workspace/linux/drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x220/0x34c() [ 11.207688] 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER2_P3 (Read): Data Access in User mode during Functional access [ 11.207742] Modules linked in: snd_soc_simple_card(+) omapdss leds_gpio led_class gpio_fan extcon_usb_gpio cpufreq_dt omap_wdt phy_omap_usb2 snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap snd_soc_tlv320aic3x rtc_omap snd_soc_core ti_soc_thermal dwc3_omap snd_pcm_dmaengine snd_pcm extcon_palmas snd_timer extcon snd rtc_palmas rtc_ds1307 tmp102 palmas_pwrbutton thermal_sys soundcore hwmon autofs4 [ 11.207748] CPU: 0 PID: 272 Comm: systemd-udevd Not tainted 4.3.0-11482-g3d26f1f5fc82-dirty #27 [ 11.207751] Hardware name: Generic DRA74X (Flattened Device Tree) [ 11.207765] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 11.207772] [] (show_stack) from [] (dump_stack+0x84/0x9c) [ 11.207783] [] (dump_stack) from [] (warn_slowpath_common+0x78/0xb4) [ 11.207790] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [ 11.207798] [] (warn_slowpath_fmt) from [] (l3_interrupt_handler+0x220/0x34c) [ 11.207805] [] (l3_interrupt_handler) from [] (handle_irq_event_percpu+0x44/0x1f0) [ 11.207811] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x5c) [ 11.207818] [] (handle_irq_event) from [] (handle_fasteoi_irq+0xcc/0x1b0) [ 11.207824] [] (handle_fasteoi_irq) from [] (generic_handle_irq+0x20/0x34) [ 11.207829] [] (generic_handle_irq) from [] (__handle_domain_irq+0x64/0xe0) [ 11.207835] [] (__handle_domain_irq) from [] (gic_handle_irq+0x40/0x8c) [ 11.207842] [] (gic_handle_irq) from [] (__irq_usr+0x54/0x80) [ 11.207846] Exception stack(0xed143fb0 to 0xed143ff8) [ 11.207851] 3fa0: 7f69b370 7f69b368 00000370 00000000 [ 11.207857] 3fc0: b6ddb4e0 7f69b370 00000016 7f69b308 be8db278 be8db2a0 7f68b024 00000001 [ 11.207863] 3fe0: b6ddb4e0 be8db180 b6d46a47 b6d46a50 60000030 ffffffff [ 11.207866] ---[ end trace 7d8de48d1bc8fbac ]--- Signed-off-by: Peter Ujfalusi Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index 51d1ecb384bd..b730c582a1f7 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -1298,6 +1298,38 @@ static struct omap_hwmod dra7xx_mcspi4_hwmod = { }; /* + * 'mcasp' class + * + */ +static struct omap_hwmod_class_sysconfig dra7xx_mcasp_sysc = { + .sysc_offs = 0x0004, + .sysc_flags = SYSC_HAS_SIDLEMODE, + .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), + .sysc_fields = &omap_hwmod_sysc_type3, +}; + +static struct omap_hwmod_class dra7xx_mcasp_hwmod_class = { + .name = "mcasp", + .sysc = &dra7xx_mcasp_sysc, +}; + +/* mcasp3 */ +static struct omap_hwmod dra7xx_mcasp3_hwmod = { + .name = "mcasp3", + .class = &dra7xx_mcasp_hwmod_class, + .clkdm_name = "l4per2_clkdm", + .main_clk = "mcasp3_ahclkx_mux", + .flags = HWMOD_SWSUP_SIDLE, + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_L4PER2_MCASP3_CLKCTRL_OFFSET, + .context_offs = DRA7XX_RM_L4PER2_MCASP3_CONTEXT_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + +/* * 'mmc' class * */ @@ -2566,6 +2598,14 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__hdmi = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l4_per2 -> mcasp3 */ +static struct omap_hwmod_ocp_if dra7xx_l4_per2__mcasp3 = { + .master = &dra7xx_l4_per2_hwmod, + .slave = &dra7xx_mcasp3_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l4_per1 -> elm */ static struct omap_hwmod_ocp_if dra7xx_l4_per1__elm = { .master = &dra7xx_l4_per1_hwmod, @@ -3308,6 +3348,7 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_wkup__dcan1, &dra7xx_l4_per2__dcan2, &dra7xx_l4_per2__cpgmac0, + &dra7xx_l4_per2__mcasp3, &dra7xx_gmac__mdio, &dra7xx_l4_cfg__dma_system, &dra7xx_l3_main_1__dss,