From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from de01egw02.freescale.net (de01egw02.freescale.net [192.88.165.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "de01egw02.freescale.net", Issuer "Thawte Premium Server CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 0613BDEA91 for ; Fri, 18 Apr 2008 05:56:56 +1000 (EST) Message-ID: <4807AB7A.90005@freescale.com> Date: Thu, 17 Apr 2008 14:56:42 -0500 From: Timur Tabi MIME-Version: 1.0 To: Anton Vorontsov Subject: Re: [PATCH 2/5] [POWERPC] QE: add support for QE USB clocks routing References: <20080417192656.GA19107@polina.dev.rtsoft.ru> <20080417192846.GB28286@polina.dev.rtsoft.ru> In-Reply-To: <20080417192846.GB28286@polina.dev.rtsoft.ru> Content-Type: text/plain; charset=ISO-8859-1 Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Anton Vorontsov wrote: > +config QE_USB > + bool > + help > + QE USB Host Controller support Don't you need something like "depends on USB"? I would assume that you need core USB support before any USB drivers can be loaded. > --- /dev/null > +++ b/arch/powerpc/sysdev/qe_lib/usb.c > @@ -0,0 +1,57 @@ > +/* > + * QE USB routines > + * > + * Copyright (c) Freescale Semicondutor, Inc. 2006. > + * Shlomi Gridish Is this code from one of our BSPs? > +int qe_usb_clock_set(enum qe_clock clk, int rate) > +{ > + struct qe_mux __iomem *mux = &qe_immr->qmx; > + unsigned long flags; > + const bool is_brg = clk < QE_CLK1; You don't really need "is_brg", since it's only used once. > + spin_lock_irqsave(&cmxgcr_lock, flags); > + > + clrsetbits_be32(&mux->cmxgcr, QE_CMXGCR_USBCS, val); Would it be useful if I made the clrsetbits functions atomic, using lwarx/stwcx.? -- Timur Tabi Linux kernel developer at Freescale