Re: Amba bus definition (amba/bus.h)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Nov 07, 2008 at 05:56:59PM +0100, Nick.Thompson@xxxxxxxxxxxx wrote:
> I'm porting Linux to an SoC device with a small number of amba peripherals
> on the chip.
> 
> While getting the SD-Card interface to work (mmci.c PL-180/1) I was
> surprised to find that the driver took irq numbers from the amba
> /device/ structure, but not the interrupt flags or the clock name.
> These where hard coded in the driver. This seems to be the case for
> all amba peripherals.

Clock names are driver specific.  They are not device specific.  If
you think they are, you're misinterpreting the clk API - go read the
documentation along side clk_get() in include/linux/clk.h

As for interrupt flags, all AMBA based systems have never needed to
specify such details.  Do you have a requirement for that?  If so,
let's do the job properly and not make these kinds of things
conditional.

> I then changed the mmci driver to use these new fields:
> 
> -    host->clk = clk_get(&dev->dev, "MCLK");
> +    host->clk = clk_get(&dev->dev, dev->clk);

NAK.

I'm going to make all the AMBA drivers pass 'NULL' to clk_get() for
the next kernel; they're just not necessary in drivers where only one
clock exists.  As is documented, what must be used is the struct device.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter