Re: [PATCH v16 01/10]USB/ppc4xx: Add Synopsys DWC OTG Register definitions

2012-05-12 Thread Greg KH
On Thu, May 03, 2012 at 05:53:03PM +0530, Rupjyoti Sarmah wrote:
 
 Add Synopsys Design Ware core register definitions.
 
 Signed-off-by: Rupjyoti Sarmah rsar...@apm.com
 Signed-off-by: Tirumala R Marri tma...@apm.com
 Signed-off-by: Fushen Chen fc...@apm.com
 Signed-off-by: Mark Miesfeld mmiesf...@apm.com
 ---
  drivers/usb/dwc/regs.h | 1326 
 
  1 files changed, 1326 insertions(+), 0 deletions(-)
  create mode 100644 drivers/usb/dwc/regs.h

Why are you not cc: the linux-usb mailing list, and the proper
maintainers, for this patchset?

I'm guessing you aren't wanting to get these applied :)

greg k-h
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH v16 01/10]USB/ppc4xx: Add Synopsys DWC OTG Register definitions

2012-05-03 Thread Rupjyoti Sarmah

Add Synopsys Design Ware core register definitions.

Signed-off-by: Rupjyoti Sarmah rsar...@apm.com
Signed-off-by: Tirumala R Marri tma...@apm.com
Signed-off-by: Fushen Chen fc...@apm.com
Signed-off-by: Mark Miesfeld mmiesf...@apm.com
---
 drivers/usb/dwc/regs.h | 1326 
 1 files changed, 1326 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/dwc/regs.h

diff --git a/drivers/usb/dwc/regs.h b/drivers/usb/dwc/regs.h
new file mode 100644
index 000..c03252c
--- /dev/null
+++ b/drivers/usb/dwc/regs.h
@@ -0,0 +1,1326 @@
+/*
+ * DesignWare HS OTG controller driver
+ * Copyright (C) 2006 Synopsys, Inc.
+ * Portions Copyright (C) 2010 Applied Micro Circuits Corporation.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License version 2 for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see http://www.gnu.org/licenses
+ * or write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Suite 500, Boston, MA 02110-1335 USA.
+ *
+ * Based on Synopsys driver version 2.60a
+ * Modified by Mark Miesfeld mmiesf...@apm.com
+ *
+ * Revamped register difinitions by Tirumala R Marri(tma...@apm.com)
+ * Updated by Rupjyoti Sarmah rsar...@apm.com
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL SYNOPSYS, INC. BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef __DWC_OTG_REGS_H__
+#define __DWC_OTG_REGS_H__
+
+#include linux/types.h
+/*Bit fields in the Device EP Transfer Size Register is 11 bits */
+#undef DWC_LIMITED_XFER_SIZE
+/*
+ * This file contains the Macro defintions for accessing the DWC_otg core
+ * registers.
+ *
+ * The application interfaces with the HS OTG core by reading from and
+ * writing to the Control and Status Register (CSR) space through the
+ * AHB Slave interface. These registers are 32 bits wide, and the
+ * addresses are 32-bit-block aligned.
+ * CSRs are classified as follows:
+ * - Core Global Registers
+ * - Device Mode Registers
+ * - Device Global Registers
+ * - Device Endpoint Specific Registers
+ * - Host Mode Registers
+ * - Host Global Registers
+ * - Host Port CSRs
+ * - Host Channel Specific Registers
+ *
+ * Only the Core Global registers can be accessed in both Device and
+ * Host modes. When the HS OTG core is operating in one mode, either
+ * Device or Host, the application must not access registers from the
+ * other mode. When the core switches from one mode to another, the
+ * registers in the new mode of operation must be reprogrammed as they
+ * would be after a power-on reset.
+ */
+
+/*
+ * DWC_otg Core registers.  The core_global_regs structure defines the
+ * size and relative field offsets for the Core Global registers.
+ */
+#defineDWC_GOTGCTL 0x000
+#defineDWC_GOTGINT 0x004
+#defineDWC_GAHBCFG 0x008
+#defineDWC_GUSBCFG 0x00C
+#defineDWC_GRSTCTL 0x010
+#defineDWC_GINTSTS 0x014
+#defineDWC_GINTMSK 0x018
+#defineDWC_GRXSTSR 0x01C
+#defineDWC_GRXSTSP 0x020
+#defineDWC_GRXFSIZ 0x024
+#defineDWC_GNPTXFSIZ   0x028
+#defineDWC_GNPTXSTS0x02C
+#defineDWC_GI2CCTL 0x030
+#defineDWC_VDCTL   0x034
+#defineDWC_GGPIO   0x038
+#defineDWC_GUID0x03C
+#defineDWC_GSNPSID 0x040
+#defineDWC_GHWCFG1 0x044
+#defineDWC_GHWCFG2 0x048
+#defineDWC_GHWCFG3 0x04c
+#defineDWC_GHWCFG4 0x050
+#defineDWC_HPTXFSIZ0x100
+#defineDWC_DPTX_FSIZ_DIPTXF(x) (0x104 + x * 4) /* 15 = x  1 */
+
+#define DWC_GLBINTRMASK0x0001
+#define DWC_DMAENABLE  0x0020

Re: [PATCH v16 01/10]USB/ppc4xx: Add Synopsys DWC OTG Register definitions

2012-05-03 Thread Wolfgang Denk
Dear Rupjyoti Sarmah,

In message 201205031223.q43cn3ln022...@amcc.com you wrote:
 
 Add Synopsys Design Ware core register definitions.

Olof Johansson o...@lixom.net has commented v15 of this patch as
follows:

 No, just start over from scratch. Just leave the crap driver behind,
 use it for reference but write the new one.
 
 It's obvious given that you are already at iteration v15 and it's
 still looking this bad that this is not realistic to get reviewed and
 accepted as-is. I don't think staging is a good target either -- what
 the driver really needs is _functional_ cut-down to only cover the use
 cases that your product uses, and staging cleanups are mostly around
 style and refactoring, not changing, fixing or removing functionality.
 ...
 I don't think you understood what I meant. Try building an ARM config
 with this driver enabled, for example, and you'll see that it breaks
 the build.

See http://thread.gmane.org/gmane.linux.usb.general/53348/focus=53913
for the full context and other important comments.

It seems most of these requests have been ignored so far.

I would also like to point out that the same Synopsys USB controller
is used in a number of other SoCs (especially ARM chips), and
supported by other drivers, some of these even in mainline.

See http://thread.gmane.org/gmane.linux.usb.general/61714/focus=62139
for a related thread.


Instead of trying to add a completely new driver to mainline (and one
which has been repeatedly been rejected), I vote for focussing on the
existing driver code that is already in mainline, and testing and
improving this so we can use a single implementation of this driver
code for all SoCs that use the same IP block.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
panic: kernel trap (ignored)
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev