From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nishanth Menon Subject: Re: [PATCH 2/2] OMAP3: beagle xm: enable upto 800MHz OPP Date: Thu, 06 Jan 2011 06:24:34 -0600 Message-ID: <4D25B482.3080709@ti.com> References: <1294260576-20237-1-git-send-email-nm@ti.com> <1294260576-20237-3-git-send-email-nm@ti.com> <874o9nvskt.fsf@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]:45636 "EHLO na3sys009aog107.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187Ab1AFMYp (ORCPT ); Thu, 6 Jan 2011 07:24:45 -0500 Received: by mail-gw0-f43.google.com with SMTP id 17so7358488gwb.16 for ; Thu, 06 Jan 2011 04:24:44 -0800 (PST) In-Reply-To: <874o9nvskt.fsf@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Kevin Hilman Cc: l-o , l-a , Tony , Koen Kooi Kevin Hilman wrote, on 01/05/2011 05:28 PM: > Nishanth Menon writes: > >> Beagle XM uses 3730 and the board design allows enabling 800MHz and 1GHz >> OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz safely. >> For the moment, we tweak the default table to allow for 800Mhz OPP usage. > > Isn't this common to any board using 3730 (or 3630?) no it is not. only certain boards are capable of higher frequencies - there is a procedure called PDN analysis and vmin search that needs to be performed to guarentee this. > > IOW, what is Beagle specific about this? beagle is one of the boards capable of higher frequencies. > > Kevin > >> Reported-by: Koen Kooi >> Tested-by: Koen Kooi >> >> Signed-off-by: Nishanth Menon >> --- >> arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ >> 1 files changed, 50 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c >> index 6c12760..0b99b80 100644 >> --- a/arch/arm/mach-omap2/board-omap3beagle.c >> +++ b/arch/arm/mach-omap2/board-omap3beagle.c >> @@ -23,6 +23,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> #include >> @@ -44,10 +45,12 @@ >> #include >> #include >> #include >> +#include >> >> #include "mux.h" >> #include "hsmmc.h" >> #include "timer-gp.h" >> +#include "pm.h" >> >> #define NAND_BLOCK_SIZE SZ_128K >> >> @@ -556,6 +559,52 @@ static struct omap_musb_board_data musb_board_data = { >> .power = 100, >> }; >> >> +static void __init beagle_opp_init(void) >> +{ >> + int r = 0; >> + >> + /* Initialize the omap3 opp table */ >> + if (omap3_opp_init()) { >> + pr_err("%s: opp default init failed\n", __func__); >> + return; >> + } >> + >> + /* Custom OPP enabled for XM */ >> + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { >> + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); >> + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); >> + struct device *dev; >> + >> + if (!mh || !dh) { >> + pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", >> + __func__, mh, dh); >> + r = -EINVAL; >> + } else { >> + /* Enable MPU 1GHz and lower opps */ >> + dev =&mh->od->pdev.dev; >> + r = opp_enable(dev, 800000000); >> + /* TODO: MPU 1GHz needs SR and ABB */ >> + >> + /* Enable IVA 800MHz and lower opps */ >> + dev =&dh->od->pdev.dev; >> + r |= opp_enable(dev, 660000000); >> + /* TODO: DSP 800MHz needs SR and ABB */ >> + } >> + if (r) { >> + pr_err("%s: failed to enable higher opp %d\n", >> + __func__, r); >> + /* >> + * Cleanup - disable the higher freqs - we dont care >> + * about the results >> + */ >> + dev =&mh->od->pdev.dev; >> + opp_disable(dev, 800000000); >> + dev =&dh->od->pdev.dev; >> + opp_disable(dev, 660000000); >> + } >> + } >> +} >> + >> static void __init omap3_beagle_init(void) >> { >> omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); >> @@ -579,6 +628,7 @@ static void __init omap3_beagle_init(void) >> omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); >> >> beagle_display_init(); >> + beagle_opp_init(); >> } >> >> MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") -- Regards, Nishanth Menon