Message ID | CACKLOr0-GzO0r0ERCQvqCn2oDkDE816+MHsu=bLbA5BkEBAqYA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Nov 23, 2011 at 01:32:29PM +0100, javier Martin wrote: > Hi Sascha, > I was just trying to fix the issues you pointed previously and I have > a question for you. > > On 22 November 2011 21:55, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > Hi Javier, > >> + > >> +static int emmaprp_probe(struct platform_device *pdev) > >> +{ > >> + struct emmaprp_dev *pcdev; > >> + struct video_device *vfd; > >> + struct resource *res_emma; > >> + int irq_emma; > >> + int ret; > >> + > >> + pcdev = kzalloc(sizeof *pcdev, GFP_KERNEL); > >> + if (!pcdev) > >> + return -ENOMEM; > >> + > >> + spin_lock_init(&pcdev->irqlock); > >> + > >> + pcdev->clk_emma = clk_get(NULL, "emma"); > > > > You should change the entry for the emma in > > arch/arm/mach-imx/clock-imx27.c to the following: > > > > _REGISTER_CLOCK("m2m-emmaprp", NULL, emma_clk) > > > > and use clk_get(&pdev->dev, NULL) here. > > > > Is this what you are asking for? > > --- a/arch/arm/mach-imx/clock-imx27.c > +++ b/arch/arm/mach-imx/clock-imx27.c > @@ -661,7 +661,7 @@ static struct clk_lookup lookups[] = { > _REGISTER_CLOCK(NULL, "dma", dma_clk) > _REGISTER_CLOCK(NULL, "rtic", rtic_clk) > _REGISTER_CLOCK(NULL, "brom", brom_clk) > - _REGISTER_CLOCK(NULL, "emma", emma_clk) > + _REGISTER_CLOCK("m2m-emmaprp", NULL, emma_clk) > _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk) > _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) > _REGISTER_CLOCK(NULL, "emi", emi_clk) > > If I do that, mx2_camera.c will stop working. This depends on the platform device id. If you use with -1 you have to use "m2m-emmaprp", if you use 0 (as you did I think) you have to use "m2m-emmaprp.0". Basically the string has to match the device name as found in /sys/devices/platform/ Sascha
--- a/arch/arm/mach-imx/clock-imx27.c +++ b/arch/arm/mach-imx/clock-imx27.c @@ -661,7 +661,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "dma", dma_clk) _REGISTER_CLOCK(NULL, "rtic", rtic_clk) _REGISTER_CLOCK(NULL, "brom", brom_clk) - _REGISTER_CLOCK(NULL, "emma", emma_clk) + _REGISTER_CLOCK("m2m-emmaprp", NULL, emma_clk) _REGISTER_CLOCK(NULL, "slcdc", slcdc_clk) _REGISTER_CLOCK("imx27-fec.0", NULL, fec_clk) _REGISTER_CLOCK(NULL, "emi", emi_clk)