Hi, It looks ok to me, besides that I have a few cosmetic changes, see them below. On Fri, 14 Dec 2007 19:32:42 +0530, "Gadiyar, Anand" <gadiyar@xxxxxx> wrote: > From: Anand Gadiyar <gadiyar@xxxxxx> > > Added support for USB on OMAP34XX. > > Signed-off-by: Anand Gadiyar <gadiyar@xxxxxx> > Signed-off-by: Vikram Pandita <vikram.pandita@xxxxxx> > Signed-off-by: Nishant Kamat <nskamat@xxxxxx> > --- > arch/arm/mach-omap2/Makefile | 3 - > arch/arm/mach-omap2/board-3430sdp-usb.c | 77 > ++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/board-3430sdp.c | 1 > include/asm-arm/arch-omap/board-3430sdp.h | 4 + > 4 files changed, 84 insertions(+), 1 deletion(-) > > Index: linux-omap-dec10/arch/arm/mach-omap2/Makefile > =================================================================== > --- linux-omap-dec10.orig/arch/arm/mach-omap2/Makefile 2007-12-14 > 19:06:41.769920533 +0530 > +++ linux-omap-dec10/arch/arm/mach-omap2/Makefile 2007-12-14 > 19:06:46.574767639 +0530 > @@ -26,7 +26,8 @@ > board-2430sdp-flash.o \ > board-2430sdp-usb.o > obj-$(CONFIG_MACH_OMAP_2430OSK) += board-2430osk.o > -obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o > +obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ > + board-3430sdp-usb.o > obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \ > board-apollon-mmc.o \ > board-apollon-keys.o > Index: linux-omap-dec10/arch/arm/mach-omap2/board-3430sdp-usb.c > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ linux-omap-dec10/arch/arm/mach-omap2/board-3430sdp-usb.c 2007-12-14 > 19:07:25.650524215 +0530 > @@ -0,0 +1,77 @@ > +/* > + * linux/arch/arm/mach-omap2/board-3430sdp-usb.c > + * > + * This file will contain the board specific details for the > + * MENTOR USB OTG and Synopsys EHCI host controllers on OMAP3430 > + * > + * Copyright (C) 2007 Texas Instruments > + * Author: Vikram Pandita > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#include <linux/types.h> > +#include <linux/errno.h> > +#include <linux/delay.h> > +#include <linux/platform_device.h> > +#include <linux/usb/musb.h> > + > +#include <asm/arch/hardware.h> > +#include <asm/arch/usb.h> > + > +#ifdef CONFIG_USB_MUSB_SOC > +static struct resource musb_resources[] = { > + [0] = { > + .start = OMAP34XX_HSUSB_OTG_BASE, > + .end = OMAP34XX_HSUSB_OTG_BASE + SZ_8K, > + .flags = IORESOURCE_MEM, > + }, > + [1] = { /* general IRQ */ > + .start = INT_243X_HS_USB_MC, > + .flags = IORESOURCE_IRQ, > + }, > + [2] = { /* DMA IRQ */ > + .start = INT_243X_HS_USB_DMA, > + .flags = IORESOURCE_IRQ, > + }, > +}; > + > +static struct musb_hdrc_platform_data musb_plat = { > +#ifdef CONFIG_USB_MUSB_OTG > + .mode = MUSB_OTG, > +#elif defined(CONFIG_USB_MUSB_HDRC_HCD) > + .mode = MUSB_HOST, > +#elif defined(CONFIG_USB_GADGET_MUSB_HDRC) > + .mode = MUSB_PERIPHERAL, > +#endif > + .multipoint = 1, > + .clock = NULL, There is extra whitespace after "clock" > + .set_clock = NULL, > +}; > + > +static u64 musb_dmamask = ~(u32)0; > + > +static struct platform_device musb_device = { > + .name = "musb_hdrc", > + .id = 0, > + .dev = { > + .dma_mask = &musb_dmamask, > + .coherent_dma_mask = 0xffffffff, > + .platform_data = &musb_plat, > + }, > + .num_resources = ARRAY_SIZE(musb_resources), > + .resource = musb_resources, > +}; > +#endif > + > +void __init sdp3430_usb_init(void) > +{ > +#ifdef CONFIG_USB_MUSB_SOC > + if (platform_device_register(&musb_device) < 0) { > + printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); > + return; > + } > +#endif > +} The #ifdef CONFIG_USB_MUSB_SOC thing would look better like this: #ifdef CONFIG_USB_MUSB_SOC static struct resource musb_resources[] = { [0] = { (the rest of the code) void __init sdp3430_usb_init(void) { if (platform_device_register(&musb_device) < 0) { printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); return; } } #else void __init sdp3430_usb_init(void) { } #endif It's easier to read this way. > Index: linux-omap-dec10/arch/arm/mach-omap2/board-3430sdp.c > =================================================================== > --- linux-omap-dec10.orig/arch/arm/mach-omap2/board-3430sdp.c 2007-12-14 > 19:06:41.769920533 +0530 > +++ linux-omap-dec10/arch/arm/mach-omap2/board-3430sdp.c 2007-12-14 > 19:06:46.574767639 +0530 > @@ -316,6 +316,7 @@ > ARRAY_SIZE(sdp3430_spi_board_info)); > ads7846_dev_init(); > omap_serial_init(); > + sdp3430_usb_init(); > } > > static void __init omap_3430sdp_map_io(void) > Index: linux-omap-dec10/include/asm-arm/arch-omap/board-3430sdp.h > =================================================================== > --- > linux-omap-dec10.orig/include/asm-arm/arch-omap/board-3430sdp.h 2007-12-14 > 19:06:41.769920533 +0530 > +++ linux-omap-dec10/include/asm-arm/arch-omap/board-3430sdp.h 2007-12-14 > 19:06:46.575767607 +0530 > @@ -29,6 +29,10 @@ > #ifndef __ASM_ARCH_OMAP_3430SDP_H > #define __ASM_ARCH_OMAP_3430SDP_H > > +#include <linux/init.h> > + > +extern void __init sdp3430_usb_init(void); __init and friends should rely only in .c files to avoid overwriting such rules. You don't need to redefine them in the header file ;-) After removing __init, you won't need to include linux/init.h > + > #define DEBUG_BASE 0x08000000 /* debug board */ > > /* Placeholder for 3430SDP specific defines */ > - > 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 -- Best Regards, Felipe Balbi http://felipebalbi.com me@xxxxxxxxxxxxxxx - 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