Return-Path: Received: from nm15-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.208]:30692 "HELO nm15-vm0.bullet.mail.sp2.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751871Ab0KJCyU (ORCPT ); Tue, 9 Nov 2010 21:54:20 -0500 Message-ID: <320241.1412.qm@web180311.mail.gq1.yahoo.com> Date: Tue, 9 Nov 2010 18:54:17 -0800 (PST) From: David Brownell Subject: Re: [PATCH v2] USB: Add MSM USB Device Controller driver In-Reply-To: <20101110021259.GA16558@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Matthieu CASTET , Pavan Kondeti Cc: "greg@kroah.com" , "linux-usb@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , Mike Lockwood , Brian Swetland --- On Tue, 11/9/10, Pavan Kondeti wrote: > >> Hi Matthieu, > >> > >>> This look like the arc/chipidea/mips ehci otg > core. > >> > >> Yes. It is chipidea core for ARM. > >>> Why can't you reuse the ci13xxx_udc.c driver That basic approach is FAR PREFERABLE. Fix the bugs once, tune once, and so forth, reuse the ULPI support, etc. Work on more platforms, since the silicon IP is reused. You'll end up with more folk who can help maintain the driver too, since the pool of potential helpers won't be limited to those who have/use MSM hardware. Just be sure to cleanly factor the bus (PCI vs MSM-s ARM platform flavor and SoC glues (bus-related). That factoring will likely be the hardest part; but there are examples of similar stuff in Linux today. > ? > >>> Or if ci13xxx_udc.c is too bad, rewrite a new > generic version for this core. > >>> > > Yes, but why not adding this to ci13xxx_udc.c instead > of doing a new driver. > > For example adding platform subsystem is less than 150 > lines of code. > > I agree. > > > > I am not sure doing n drivers for a same hardware is a > good idea. I'm pretty sure it is a BAD idea, myself. Same IP/hardware means only bus/SoC glue really needs to differ (including power and reset management). - Dave