From patchwork Thu Nov 22 14:47:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 1789161 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B31933FC64 for ; Thu, 22 Nov 2012 21:15:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755351Ab2KVSmW (ORCPT ); Thu, 22 Nov 2012 13:42:22 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:55628 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752980Ab2KVSmR convert rfc822-to-8bit (ORCPT ); Thu, 22 Nov 2012 13:42:17 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAMElUoY000709; Thu, 22 Nov 2012 08:47:30 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAMElScP025030; Thu, 22 Nov 2012 20:17:28 +0530 (IST) Received: from DBDE01.ent.ti.com ([fe80::d5df:c4b5:9919:4e10]) by DBDE70.ent.ti.com ([fe80::2141:513f:409:315a%21]) with mapi id 14.01.0323.003; Thu, 22 Nov 2012 20:17:28 +0530 From: "Hiremath, Vaibhav" To: Igor Mazanov CC: Tony Lindgren , Jean Pihet , "Menon, Nishanth" , "linux-omap@vger.kernel.org" Subject: RE: AM335x: Beaglebone stops to boot with current git kernel Thread-Topic: AM335x: Beaglebone stops to boot with current git kernel Thread-Index: AQHNwnyzDNLQJKbwAkKBAnuqc0JqYJfpLH6AgAshCYCAABcFAIAA/uaAgAAR4ACAAHItkA== Date: Thu, 22 Nov 2012 14:47:28 +0000 Message-ID: <79CD15C6BA57404B839C016229A409A83EB7F1E3@DBDE01.ent.ti.com> References: <20121121183809.GZ18567@atomide.com> <50ADBB5B.7090401@ti.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.24.170.142] MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On Thu, Nov 22, 2012 at 17:46:50, Igor Mazanov wrote: > On Thu, Nov 22, 2012 at 9:42 AM, Vaibhav Hiremath wrote: > > > > > > On 11/22/2012 1:30 AM, Igor Mazanov wrote: > >> On Wed, Nov 21, 2012 at 9:38 PM, Tony Lindgren wrote: > >>> * Jean Pihet [121114 08:43]: > >>>> On Wed, Nov 14, 2012 at 4:28 PM, Igor Mazanov wrote: > >>>>> > >>>>> Beaglebone boot process is broken with the current git kernel. I use > >>>>> omap2plus_defconfig for tests. > >>>>> > >>>>> It looks like the boot process stops due to the last changes in the AM33xx > >>>>> clock sysbsystem. A following patch resolves this issue: > >>> ... > >>> > >>>> The patch should change the name of the hwmod entry as well, can you > >>>> fold this change in the current patch? > >>> > >>> Any news on updating this? > >> > >> The current kernel boots, but after a switching to CCF doesn't work > >> the debugss - it's just disabled in the current hwmod code. So, it > >> looks like we can't use JTAG to connect to the running kernel. > >> > > > > just resumed from vacation... > > > > JTAG clock will get disabled because, CONFIG_OMAP_RESET_CLOCKS will > > disable unused clocks, so as debugss clock. > > > > There is another thread started by Joel on the similar issue, > > > > http://www.mail-archive.com/linux-omap@vger.kernel.org/msg80863.html > > > > Something below should be done for debugss on AM33xx, > > > > diff --git a/arch/arm/mach-omap2/clock33xx_data.c > > b/arch/arm/mach-omap2/clock33xx_data.c > > index 17e3de5..60e0b53 100644 > > --- a/arch/arm/mach-omap2/clock33xx_data.c > > +++ b/arch/arm/mach-omap2/clock33xx_data.c > > @@ -584,6 +584,9 @@ static struct clk debugss_ick = { > > .clkdm_name = "l3_aon_clkdm", > > .parent = &dpll_core_m4_ck, > > .ops = &clkops_omap2_dflt, > > +#ifdef CONFIG_DEBUG_KERNEL > > + .flags = ENABLE_ON_INIT, > > +#endif > > .enable_reg = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL, > > .enable_bit = AM33XX_MODULEMODE_SWCTRL, > > .recalc = &followparent_recalc, > > Yes, I noticed this thread. But now a clock subsystem in the current > kernel is switched to Common Clock Framework and debugss (and several > another modules) is disabled Still this can be handled and enabled during init. > (#if 0 .... #endif) in > omap_hwmod_33xx_data.c. > > From omap_hwmod_33xx_data.c: > > /* > * Modules omap_hwmod structures > * > * The following IPs are excluded for the moment because: > * - They do not need an explicit SW control using omap_hwmod API. > * - They still need to be validated with the driver > * properly adapted to omap_hwmod / omap_device > * > * - cEFUSE (doesn't fall under any ocp_if) > * - clkdiv32k > * - debugss > * - ocmc ram > * - ocp watch point > * - aes0 > * - sha0 > */ > > I uncommented the debugss entry in the omap_hwmod settings, but only > got a warning like: > > CC arch/arm/mach-omap2/omap_hwmod_33xx_data.o > arch/arm/mach-omap2/omap_hwmod_33xx_data.c:472:26: warning: > 'am33xx_debugss_hwmod' defined but not used [-Wunused-variable] > > By the way, I need to use JTAG to trace a problem described in this thread: > > http://marc.info/?l=linux-omap&m=135307646415429&w=2 > > May be, it's the clocks related issue too... > I have quickly created patch for you, can you try below patch and let me know? Thanks, Vaibhav --- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c index ea64ad6..c9af78c 100644 --- a/arch/arm/mach-omap2/cclock33xx_data.c +++ b/arch/arm/mach-omap2/cclock33xx_data.c @@ -920,6 +920,7 @@ static const char *enable_init_clks[] = { "l4hs_gclk", "l4fw_gclk", "l4ls_gclk", + "debugss_ick", }; int __init am33xx_clk_init(void) diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index ad8d43b..750b897 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c @@ -460,27 +460,6 @@ static struct omap_hwmod am33xx_clkdiv32k_hwmod = { }, }; -/* - * 'debugss' class - * debug sub system - */ -static struct omap_hwmod_class am33xx_debugss_hwmod_class = { - .name = "debugss", -}; - -static struct omap_hwmod am33xx_debugss_hwmod = { - .name = "debugss", - .class = &am33xx_debugss_hwmod_class, - .clkdm_name = "l3_aon_clkdm", - .main_clk = "debugss_ick", - .prcm = { - .omap4 = { - .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, - .modulemode = MODULEMODE_SWCTRL, - }, - }, -}; - /* ocmcram */ static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = { .name = "ocmcram", @@ -570,6 +549,28 @@ static struct omap_hwmod am33xx_sha0_hwmod = { #endif +/* + * 'debugss' class + * debug sub system + */ +static struct omap_hwmod_class am33xx_debugss_hwmod_class = { + .name = "debugss", +}; + +static struct omap_hwmod am33xx_debugss_hwmod = { + .name = "debugss", + .class = &am33xx_debugss_hwmod_class, + .clkdm_name = "l3_aon_clkdm", + .main_clk = "debugss_ick", + .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), + .prcm = { + .omap4 = { + .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET, + .modulemode = MODULEMODE_SWCTRL, + }, + }, +}; + /* 'smartreflex' class */ static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = { .name = "smartreflex", @@ -2261,6 +2262,24 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__gfx = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l3_main -> debugss */ +static struct omap_hwmod_addr_space am33xx_debugss_addrs[] = { + { + .pa_start = 0x4b000000, + .pa_end = 0x4b000000 + SZ_16M - 1, + .flags = ADDR_TYPE_RT + }, + { } +}; + +static struct omap_hwmod_ocp_if am33xx_l3_main__debugss = { + .master = &am33xx_l3_main_hwmod, + .slave = &am33xx_debugss_hwmod, + .clk = "debugss_ick", + .addr = am33xx_debugss_addrs, + .user = OCP_USER_MPU, +}; + /* l4 wkup -> smartreflex0 */ static struct omap_hwmod_addr_space am33xx_smartreflex0_addrs[] = { { @@ -3315,6 +3334,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { &am33xx_pruss__l3_main, &am33xx_wkup_m3__l4_wkup, &am33xx_gfx__l3_main, + &am33xx_l3_main__debugss, &am33xx_l4_wkup__wkup_m3, &am33xx_l4_wkup__control, &am33xx_l4_wkup__smartreflex0,