Re: [PATCH 24/24] omap4: multi-omap: Allow build to work

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

 



On Tue, 16 Feb 2010, Santosh Shilimkar wrote:

> The musb support is enable to omap3 platforms. For omap4 only board
> support is available and the driver still isn't supported.
> Because of this build with omap3_defconfig used for multi-omap
> doesn't work on omap4430 sdp.
> 
> This patch hacks the musb probe to keep the multi-omap build
> working on omap4430 sdp
> 
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
> ---
>  drivers/usb/musb/musb_core.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index bcce8e8..13b1c4a 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -2124,6 +2124,10 @@ static int __init musb_probe(struct platform_device *pdev)
>  	struct resource	*iomem;
>  	void __iomem	*base;
>  
> +	/* FIXME: multi-omap build to work on omap4 */
> +	if (cpu_is_omap44xx())
> +		return 0;

NAK.  This will break musb compilation on all non-OMAP platforms.  This is 
a major part of the reason why these cpu_is_omap*() calls should not go 
into any device driver.

The right place for this kind of hack is in mach-omap2/usb-musb.c.

Also, this should return an error, not pretend that it succeeded.  It 
should also include a big fat WARN_ON() to reduce the risk that this 
temporary hack will be overlooked.

> +
>  	iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!iomem || irq == 0)
>  		return -ENODEV;
> -- 
> 1.6.0.4
> 


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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux