From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko =?iso-8859-1?q?St=FCbner?= Subject: Re: [RFC] cpufreq: Add S3C2416/S3C2450 cpufreq driver Date: Fri, 30 Dec 2011 13:07:42 +0100 Message-ID: <201112301307.43109.heiko@sntech.de> References: <201112292058.07448.heiko@sntech.de> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-samsung-soc-owner@vger.kernel.org List-ID: Content-Type: Text/Plain; charset="iso-8859-1" To: Dron Gus Cc: davej@redhat.com, Kukjin Kim , cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Am Freitag 30 Dezember 2011, 08:48:30 schrieb Dron Gus: > Hi. >=20 > On Thu, Dec 29, 2011 at 11:58 PM, Heiko St=FCbner w= rote: > ... >=20 > > +static int __init s3c2416_cpufreq_driver_init(struct cpufreq_polic= y > > *policy) >=20 > ... >=20 > > + s3c_freq->armdiv =3D clk_get(NULL, "armdiv"); > > + if (IS_ERR(s3c_freq->armdiv)) { > > + pr_err("cpufreq: Unable to obtain ARMDIV: %ld\n", > > + PTR_ERR(s3c_freq->armdiv)); > > + return PTR_ERR(s3c_freq->armdiv); > > + } > > + > > + s3c_freq->hclk =3D clk_get(NULL, "hclk"); > > + if (IS_ERR(s3c_freq->hclk)) { > > + pr_warn("cpufreq: Unable to obtain HCLK: %ld\n", > > + PTR_ERR(s3c_freq->hclk)); > > + s3c_freq->hclk =3D NULL; /*we can live without hclk= */ > > + } >=20 > clk_put allready obtained "armdiv"? >=20 > > + > > + s3c_freq->armclk =3D clk_get(NULL, "armclk"); > > + if (IS_ERR(s3c_freq->armclk)) { > > + pr_err("cpufreq: Unable to obtain ARMCLK: %ld\n", > > + PTR_ERR(s3c_freq->armclk)); > > + return PTR_ERR(s3c_freq->armclk); > > + } >=20 > Same for "hclk" and "armclk"? thanks for finding those, it seems probe also needs a lot more love. As you were also working on S3C2416 stuff, could you possibly test the = driver=20 and see if it still hangs for you? After I introduced the switch from hclk to armdiv using a forced armdiv= =3Dhclk=20 frequency the hangs stopped for me and the devices ran hours with varyi= ng=20 workloads without hangs. (also including voltage scaling) Heiko From mboxrd@z Thu Jan 1 00:00:00 1970 From: heiko@sntech.de (Heiko =?iso-8859-1?q?St=FCbner?=) Date: Fri, 30 Dec 2011 13:07:42 +0100 Subject: [RFC] cpufreq: Add S3C2416/S3C2450 cpufreq driver In-Reply-To: References: <201112292058.07448.heiko@sntech.de> Message-ID: <201112301307.43109.heiko@sntech.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Am Freitag 30 Dezember 2011, 08:48:30 schrieb Dron Gus: > Hi. > > On Thu, Dec 29, 2011 at 11:58 PM, Heiko St?bner wrote: > ... > > > +static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy > > *policy) > > ... > > > + s3c_freq->armdiv = clk_get(NULL, "armdiv"); > > + if (IS_ERR(s3c_freq->armdiv)) { > > + pr_err("cpufreq: Unable to obtain ARMDIV: %ld\n", > > + PTR_ERR(s3c_freq->armdiv)); > > + return PTR_ERR(s3c_freq->armdiv); > > + } > > + > > + s3c_freq->hclk = clk_get(NULL, "hclk"); > > + if (IS_ERR(s3c_freq->hclk)) { > > + pr_warn("cpufreq: Unable to obtain HCLK: %ld\n", > > + PTR_ERR(s3c_freq->hclk)); > > + s3c_freq->hclk = NULL; /*we can live without hclk */ > > + } > > clk_put allready obtained "armdiv"? > > > + > > + s3c_freq->armclk = clk_get(NULL, "armclk"); > > + if (IS_ERR(s3c_freq->armclk)) { > > + pr_err("cpufreq: Unable to obtain ARMCLK: %ld\n", > > + PTR_ERR(s3c_freq->armclk)); > > + return PTR_ERR(s3c_freq->armclk); > > + } > > Same for "hclk" and "armclk"? thanks for finding those, it seems probe also needs a lot more love. As you were also working on S3C2416 stuff, could you possibly test the driver and see if it still hangs for you? After I introduced the switch from hclk to armdiv using a forced armdiv=hclk frequency the hangs stopped for me and the devices ran hours with varying workloads without hangs. (also including voltage scaling) Heiko