imx51 pwm support fixes.
cover imx51 pwm support fixes.
This patchset aims at getting imx51 pwm support into shape. The first patch fix a build failure when trying to use imx51_add_mxc_pwm() and the other adds a missing clock and fixes a test to detect which kind of pwm where's using.
Arnaud
PATCH 1/2 Fix pwm-related build failure
An embedded and charset-unspecified text was scrubbed...
Name: pwm_ftbfs.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110113/507e1d79/attachment.ksh>
PATCH 1/2 Fix pwm-related build failure
Hello.
Quoted 1 line · Arnaud Patard (Rtp)
Commit
076762aa52de48688f6e1b6999fe58d736479f37is adding a macro whis is
Please also specify the commit summary in parens.
Quoted 2 lines
calling
imx_add_mxc_pwm()but gives it 2 parameters while it's taking only one parameters.
WBR, Sergei
PATCH 2/2 mx51: add support for pwm
In reply to Arnaud Patard (Rtp)An embedded and charset-unspecified text was scrubbed...
Name: mx51_pwm.patch
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110113/806de120/attachment.ksh>
PATCH 2/2 mx51: add support for pwm
Quoted 22 lines · Arnaud Patard
This patch is adding support for pwm1 and pwm2 devices found on mx51.
[ this patch has been tested with pwm-backlight driver ]Signed-off-by Arnaud Patard <[email protected]>Index:
linux-2.6-submit/arch/arm/mach-mx5/clock-mx51-mx53.c
===================================================================arch/arm/mach-mx5/clock-mx51-mx53.c +5
-0@@ -1228,6 +1228,11 @@DEFINE_CLOCK (gpt_clk,0 ,MXC_CCM_CCGR2 , MXC_CCM_CCGRx_CG9_OFFSET,NULL ,NULL , &ipg_clk, &gpt_ipg_clk); +DEFINE_CLOCK (pwm1_clk,0 ,MXC_CCM_CCGR2 , MXC_CCM_CCGRx_CG6_OFFSET, +NULL ,NULL , &ipg_clk,NULL ); +DEFINE_CLOCK (pwm2_clk,0 ,MXC_CCM_CCGR2 , MXC_CCM_CCGRx_CG8_OFFSET, +NULL ,NULL , &ipg_clk,NULL ); +/* I2C */ DEFINE_CLOCK (i2c1_clk,0 ,MXC_CCM_CCGR1 , MXC_CCM_CCGRx_CG9_OFFSET,NULL ,NULL , &ipg_clk,NULL );
arch/arm/mach-mx5/clock-mx51-mx53.c line 1329
Quoted 5 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +2
-0@@ -1320,6 +1325,8 @@ _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) _REGISTER_CLOCK(NULL, "gpt", gpt_clk) _REGISTER_CLOCK("fec.0", NULL, fec_clk) + _REGISTER_CLOCK("mxc_pwm.0", "pwm", pwm1_clk) +_REGISTER_CLOCK ("mxc_pwm.1" ,"pwm" , pwm2_clk)
You really need "pwm"? I'd prefer NULL if that works, too. (And if not, please fix the driver :-)
Uwe
Quoted 8 lines
arch/arm/mach-mx5/clock-mx51-mx53.c +0
-0_REGISTER_CLOCK("imx-i2c.0", NULL, i2c1_clk) _REGISTER_CLOCK("imx-i2c.1", NULL, i2c2_clk)_REGISTER_CLOCK ("imx-i2c.2" ,NULL , hsi2c_clk)Index:
linux-2.6-submit/arch/arm/plat-mxc/pwm.c
===================================================================
arch/arm/plat-mxc/pwm.c line 63
Quoted 8 lines
arch/arm/plat-mxc/pwm.c +1
-1@@ -57,7 +57,7 @@if (pwm ==NULL || period_ns ==0 || duty_ns > period_ns)return -EINVAL ; -if (cpu_is_mx27 () ||cpu_is_mx3 () ||cpu_is_mx25 ()) { +if (cpu_is_mx27 () ||cpu_is_mx3 () ||cpu_is_mx25 () ||cpu_is_mx51 ()) {unsigned long long c;unsigned long period_cycles, duty_cycles, prescale;u32 cr;
Hmm, time to convert to platform-id?
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |