Re: [PATCH 1/2] AM35x: musb: fix compilation error

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

 



On Tue, Nov 30, 2010 at 10:30:10AM -0800, Tony Lindgren wrote:
* Felipe Balbi <balbi@xxxxxx> [101122 02:12]:
Hi,

On Mon, Nov 22, 2010 at 02:22:40PM +0530, Ajay Kumar Gupta wrote:
>Fixes compilation error as control.h APIs are not available to
>drivers/usb/musb/am35x.c file. Earlier it was getting included
>from <plat/control.h> but now moved to new location by another
>pacth.
>
>Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>

Tony ? Do you ack the usage of that header ?

NAK. Drivers should not mess with the control registers directly.

Instead, the following should be done in the platform init code:

$ grep -r omap_ctrl_read drivers/usb
drivers/usb/musb/am35x.c:       devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
drivers/usb/musb/am35x.c:       while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2)
drivers/usb/musb/am35x.c:       devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
drivers/usb/musb/am35x.c:               lvl_intr = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
drivers/usb/musb/am35x.c:       u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
drivers/usb/musb/am35x.c:       sw_reset = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
drivers/usb/musb/am35x.c:       lvl_intr = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);

You can pass a function pointer like board_set_power or simila in
platform_data.

That was my feeling too. Anand, care to update ?!?

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux