From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from co202.xi-lite.net ([149.6.83.202]:36641 "EHLO co202.xi-lite.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753160Ab0KINhB (ORCPT ); Tue, 9 Nov 2010 08:37:01 -0500 Message-ID: <4CD94E79.1050104@parrot.com> Date: Tue, 9 Nov 2010 14:36:57 +0100 From: Matthieu CASTET MIME-Version: 1.0 Subject: Re: [PATCH v2] USB: Add MSM USB Device Controller driver References: <1289301494-26150-1-git-send-email-pkondeti@codeaurora.org> <1289301494-26150-2-git-send-email-pkondeti@codeaurora.org> <4CD93321.4040106@parrot.com> <20101109121607.GA30807@codeaurora.org> In-Reply-To: <20101109121607.GA30807@codeaurora.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org List-ID: To: Pavan Kondeti Cc: "greg@kroah.com" , "linux-usb@vger.kernel.org" , "linux-arm-msm@vger.kernel.org" , Mike Lockwood , Brian Swetland Hi Pavan, Pavan Kondeti a écrit : > On Tue, Nov 09, 2010 at 12:40:17PM +0100, Matthieu CASTET 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 ? >> Or if ci13xxx_udc.c is too bad, rewrite a new generic version for this core. >> > ci13xxx_udc.c driver registers with PCI subsytem (ours is a platform subsystem), > does not manage clocks. msm72k_udc.c also takes care of initializing the > integrated PHY. We also need to program special registers (MSM-ARM specific) > upon resetting the hardware. 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 am not sure doing n drivers for a same hardware is a good idea. May be ci13xxx_udc.c isn't enough generic, but in this case don't do the same mistake with the new driver. Make a generic core, and make the ulpi stuff (or other specific stuff) in a glue around this code. Look at host ehci : you don't need to rewrite ehci core. You only add a glue around it. Matthieu