All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] This patch series contains support for interrupt and USB gadget in MSM7x27a surf board
@ 2012-05-11  6:54 Srikanth Reddy Vintha
  2012-05-11  6:54 ` [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt Srikanth Reddy Vintha
  2012-05-11  6:54 ` [U-Boot] [PATCH 2/2] MSM7x27a:Add support for USB gadget Srikanth Reddy Vintha
  0 siblings, 2 replies; 7+ messages in thread
From: Srikanth Reddy Vintha @ 2012-05-11  6:54 UTC (permalink / raw)
  To: u-boot

Srikanth Reddy Vintha (2):
  MSM7x27a:Add support for interrupt
  MSM7x27a:Add support for USB gadget

 arch/arm/cpu/armv7/msm7x27a/Makefile            |    1 +
 arch/arm/cpu/armv7/msm7x27a/acpuclock.c         |    7 +
 arch/arm/cpu/armv7/msm7x27a/interrupts.c        |  136 +++++++++++++++++
 arch/arm/include/asm/arch-msm7x27a/exclusion.h  |   42 +++++
 arch/arm/include/asm/arch-msm7x27a/hsusb.h      |  183 +++++++++++++++++++++++
 arch/arm/include/asm/arch-msm7x27a/interrupts.h |   39 +++++
 arch/arm/include/asm/arch-msm7x27a/iomap.h      |    2 +
 arch/arm/include/asm/arch-msm7x27a/irqs.h       |   98 ++++++++++++
 board/qcom/msm7x27a_surf/msm7x27a_surf.c        |    2 +
 drivers/usb/gadget/msm_udc.c                    |   11 +-
 include/configs/msm7x27a_surf.h                 |   14 +-
 11 files changed, 524 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/msm7x27a/interrupts.c
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/exclusion.h
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/hsusb.h
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/interrupts.h
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/irqs.h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt
  2012-05-11  6:54 [U-Boot] [PATCH 0/2] This patch series contains support for interrupt and USB gadget in MSM7x27a surf board Srikanth Reddy Vintha
@ 2012-05-11  6:54 ` Srikanth Reddy Vintha
  2012-05-12  6:20   ` Marek Vasut
  2012-05-11  6:54 ` [U-Boot] [PATCH 2/2] MSM7x27a:Add support for USB gadget Srikanth Reddy Vintha
  1 sibling, 1 reply; 7+ messages in thread
From: Srikanth Reddy Vintha @ 2012-05-11  6:54 UTC (permalink / raw)
  To: u-boot

	* support for msm7x27a interrupt

Signed-off-by: Srikanth Reddy Vintha <srikanth.reddy@lntinfotech.com>
---
 arch/arm/cpu/armv7/msm7x27a/Makefile            |    1 +
 arch/arm/cpu/armv7/msm7x27a/interrupts.c        |  136 +++++++++++++++++++++++
 arch/arm/include/asm/arch-msm7x27a/exclusion.h  |   42 +++++++
 arch/arm/include/asm/arch-msm7x27a/interrupts.h |   39 +++++++
 arch/arm/include/asm/arch-msm7x27a/irqs.h       |   98 ++++++++++++++++
 board/qcom/msm7x27a_surf/msm7x27a_surf.c        |    2 +
 include/configs/msm7x27a_surf.h                 |    2 +-
 7 files changed, 319 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/msm7x27a/interrupts.c
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/exclusion.h
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/interrupts.h
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/irqs.h

diff --git a/arch/arm/cpu/armv7/msm7x27a/Makefile b/arch/arm/cpu/armv7/msm7x27a/Makefile
index 5f493d7..19e7546 100644
--- a/arch/arm/cpu/armv7/msm7x27a/Makefile
+++ b/arch/arm/cpu/armv7/msm7x27a/Makefile
@@ -34,6 +34,7 @@ COBJS-y	:= board.o
 COBJS-y	+= timer.o
 COBJS-y	+= acpuclock.o
 COBJS-y	+= gpio.o
+COBJS-$(CONFIG_USE_IRQ)	+= interrupts.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
diff --git a/arch/arm/cpu/armv7/msm7x27a/interrupts.c b/arch/arm/cpu/armv7/msm7x27a/interrupts.c
new file mode 100644
index 0000000..cc45c4b
--- /dev/null
+++ b/arch/arm/cpu/armv7/msm7x27a/interrupts.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2008, Google Inc.
+ * All rights reserved.
+ *
+ * (C) Copyright 2012
+ * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *	notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *	notice, this list of conditions and the following disclaimer in
+ *	the documentation and/or other materials provided with the
+ *	distribution.
+ *  * Neither the name of Google, Inc. nor the names of its contributors
+ *	may be used to endorse or promote products derived from this
+ *	software without specific prior written permission.
+ *
+ * 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 THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS 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.
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/interrupts.h>
+#include <asm/arch/irqs.h>
+#include <asm/arch/iomap.h>
+#include <asm/arch/exclusion.h>
+
+#define VIC_REG(off) (MSM_VIC_BASE + (off))
+
+#define VIC_INT_SELECT0	 VIC_REG(0x0000)  /* 1: FIQ, 0: IRQ */
+#define VIC_INT_SELECT1	 VIC_REG(0x0004)  /* 1: FIQ, 0: IRQ */
+#define VIC_INT_EN0		 VIC_REG(0x0010)
+#define VIC_INT_EN1		 VIC_REG(0x0014)
+#define VIC_INT_ENCLEAR0	VIC_REG(0x0020)
+#define VIC_INT_ENCLEAR1	VIC_REG(0x0024)
+#define VIC_INT_ENSET0	  VIC_REG(0x0030)
+#define VIC_INT_ENSET1	  VIC_REG(0x0034)
+#define VIC_INT_TYPE0	   VIC_REG(0x0040)  /* 1: EDGE, 0: LEVEL  */
+#define VIC_INT_TYPE1	   VIC_REG(0x0044)  /* 1: EDGE, 0: LEVEL  */
+#define VIC_INT_POLARITY0   VIC_REG(0x0050)  /* 1: NEG, 0: POS */
+#define VIC_INT_POLARITY1   VIC_REG(0x0054)  /* 1: NEG, 0: POS */
+#define VIC_NO_PEND_VAL	 VIC_REG(0x0060)
+#define VIC_INT_MASTEREN	VIC_REG(0x0064)  /* 1: IRQ, 2: FIQ	 */
+#define VIC_PROTECTION	  VIC_REG(0x006C)  /* 1: ENABLE		  */
+#define VIC_CONFIG		  VIC_REG(0x0068)  /* 1: USE ARM1136 VIC */
+#define VIC_IRQ_STATUS0	 VIC_REG(0x0080)
+#define VIC_IRQ_STATUS1	 VIC_REG(0x0084)
+#define VIC_FIQ_STATUS0	 VIC_REG(0x0090)
+#define VIC_FIQ_STATUS1	 VIC_REG(0x0094)
+#define VIC_RAW_STATUS0	 VIC_REG(0x00A0)
+#define VIC_RAW_STATUS1	 VIC_REG(0x00A4)
+#define VIC_INT_CLEAR0	  VIC_REG(0x00B0)
+#define VIC_INT_CLEAR1	  VIC_REG(0x00B4)
+#define VIC_SOFTINT0		VIC_REG(0x00C0)
+#define VIC_SOFTINT1		VIC_REG(0x00C4)
+#define VIC_IRQ_VEC_RD	  VIC_REG(0x00D0)  /* pending int # */
+#define VIC_IRQ_VEC_PEND_RD VIC_REG(0x00D4)  /* pending vector addr */
+#define VIC_IRQ_VEC_WR	  VIC_REG(0x00D8)
+#define VIC_IRQ_IN_SERVICE  VIC_REG(0x00E0)
+#define VIC_IRQ_IN_STACK	VIC_REG(0x00E4)
+#define VIC_TEST_BUS_SEL	VIC_REG(0x00E8)
+
+struct ihandler {
+	int_handler func;
+	void *arg;
+};
+
+static struct ihandler handler[NR_IRQS];
+
+int arch_interrupt_init(void)
+{
+	writel(0xffffffff, VIC_INT_CLEAR0);
+	writel(0xffffffff, VIC_INT_CLEAR1);
+	writel(0, VIC_INT_SELECT0);
+	writel(0, VIC_INT_SELECT1);
+	writel(0xffffffff, VIC_INT_TYPE0);
+	writel(0xffffffff, VIC_INT_TYPE1);
+	writel(0, VIC_CONFIG);
+	writel(1, VIC_INT_MASTEREN);
+	return 0;
+}
+
+void do_irq(struct pt_regs *pt_regs)
+{
+	unsigned num;
+	num = readl(VIC_IRQ_VEC_RD);
+	num = readl(VIC_IRQ_VEC_PEND_RD);
+	if (num > NR_IRQS)
+		return;
+	(void) handler[num].func(handler[num].arg);
+	writel(1 << (num & 31), (num > 31) ? VIC_INT_CLEAR1 : VIC_INT_CLEAR0);
+	writel(0, VIC_IRQ_VEC_WR);
+}
+
+int mask_interrupt(unsigned int vector)
+{
+	unsigned reg = (vector > 31) ? VIC_INT_ENCLEAR1 : VIC_INT_ENCLEAR0;
+	unsigned bit = 1 << (vector & 31);
+	writel(bit, reg);
+	return 0;
+}
+
+int unmask_interrupt(unsigned int vector)
+{
+	unsigned reg = (vector > 31) ? VIC_INT_ENSET1 : VIC_INT_ENSET0;
+	unsigned bit = 1 << (vector & 31);
+	writel(bit, reg);
+	return 0;
+}
+
+void register_int_handler(unsigned int vector, int_handler func, void *arg)
+{
+	if (vector >= NR_IRQS) {
+		debug("Could not set interrupt %#08x", vector);
+		return;
+	}
+	enter_critical_section();
+	handler[vector].func = func;
+	handler[vector].arg = arg;
+	exit_critical_section();
+}
+
diff --git a/arch/arm/include/asm/arch-msm7x27a/exclusion.h b/arch/arm/include/asm/arch-msm7x27a/exclusion.h
new file mode 100644
index 0000000..e98716e
--- /dev/null
+++ b/arch/arm/include/asm/arch-msm7x27a/exclusion.h
@@ -0,0 +1,42 @@
+/*
+ * (C) Copyright 2012
+ * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __EXCLUSION_H
+#define __EXCLUSION_H
+#include <common.h>
+
+/* critical sections */
+extern int critical_section_count;
+
+static inline __attribute__((always_inline)) void enter_critical_section(void)
+{
+	critical_section_count++;
+	if (critical_section_count == 1)
+		disable_interrupts();
+}
+
+static inline __attribute__((always_inline)) void exit_critical_section(void)
+{
+	critical_section_count--;
+	if (critical_section_count == 0)
+		enable_interrupts();
+}
+
+#endif
diff --git a/arch/arm/include/asm/arch-msm7x27a/interrupts.h b/arch/arm/include/asm/arch-msm7x27a/interrupts.h
new file mode 100644
index 0000000..c8e0368
--- /dev/null
+++ b/arch/arm/include/asm/arch-msm7x27a/interrupts.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * (C) Copyright 2012
+ * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#ifndef __PLATFORM_INTERRUPTS_H
+#define __PLATFORM_INTERRUPTS_H
+
+enum handler_return {
+	INT_NO_RESCHEDULE = 0,
+	INT_RESCHEDULE,
+};
+
+typedef enum handler_return (*int_handler)(void *arg);
+
+void register_int_handler(unsigned int vector, int_handler handler, void *arg);
+int mask_interrupt(unsigned int vector);
+int unmask_interrupt(unsigned int vector);
+#endif
diff --git a/arch/arm/include/asm/arch-msm7x27a/irqs.h b/arch/arm/include/asm/arch-msm7x27a/irqs.h
new file mode 100644
index 0000000..868d185
--- /dev/null
+++ b/arch/arm/include/asm/arch-msm7x27a/irqs.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2008, Google Inc.
+ * All rights reserved.
+ *
+ * (C) Copyright 2012
+ * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *	notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *	notice, this list of conditions and the following disclaimer in
+ *	the documentation and/or other materials provided with the
+ *	distribution.
+ *  * Neither the name of Google, Inc. nor the names of its contributors
+ *	may be used to endorse or promote products derived from this
+ *	software without specific prior written permission.
+ *
+ * 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 THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS 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 _PLATFORM_MSM7K_IRQS_H_
+#define _PLATFORM_MSM7K_IRQS_H_
+
+#define INT_A9_M2A_0		 0
+#define INT_A9_M2A_1		 1
+#define INT_A9_M2A_2		 2
+#define INT_A9_M2A_3		 3
+#define INT_A9_M2A_4		 4
+#define INT_A9_M2A_5		 5
+#define INT_A9_M2A_6		 6
+#define INT_GP_TIMER_EXP	 7
+#define INT_DEBUG_TIMER_EXP  8
+#define INT_UART1			9
+#define INT_UART2			10
+#define INT_UART3			11
+#define INT_UART1_RX		 12
+#define INT_UART2_RX		 13
+#define INT_UART3_RX		 14
+#define INT_USB_OTG		  15
+#define INT_MDDI_PRI		 16
+#define INT_MDDI_EXT		 17
+#define INT_MDDI_CLIENT	  18
+#define INT_MDP			  19
+#define INT_GRAPHICS		 20
+#define INT_ADM_AARM		 21
+#define INT_ADSP_A11		 22
+#define INT_ADSP_A9_A11	  23
+#define INT_SDC1_0		   24
+#define INT_SDC1_1		   25
+#define INT_SDC2_0		   26
+#define INT_SDC2_1		   27
+#define INT_KEYSENSE		 28
+#define INT_TCHSCRN_SSBI	 29
+#define INT_TCHSCRN1		 30
+#define INT_TCHSCRN2		 31
+
+#define INT_GPIO_GROUP1	  (32 + 0)
+#define INT_GPIO_GROUP2	  (32 + 1)
+#define INT_PWB_I2C		  (32 + 2)
+#define INT_NAND_WR_ER_DONE  (32 + 3)
+#define INT_NAND_OP_DONE	 (32 + 4)
+#define INT_SOFTRESET		(32 + 5)
+#define INT_PBUS_ARM11	   (32 + 6)
+#define INT_AXI_MPU_SMI	  (32 + 7)
+#define INT_AXI_MPU_EBI1	 (32 + 8)
+#define INT_AD_HSSD		  (32 + 9)
+#define INT_ARM11_PM		 (32 + 10)
+#define INT_ARM11_DMA		(32 + 11)
+#define INT_TSIF_IRQ		 (32 + 12)
+#define INT_UART1DM_IRQ	  (32 + 13)
+#define INT_UART1DM_RX	   (32 + 14)
+#define INT_USB_HS		   (32 + 15)
+#define INT_SDC3_0		   (32 + 16)
+#define INT_SDC3_1		   (32 + 17)
+#define INT_SDC4_0		   (32 + 18)
+#define INT_SDC4_1		   (32 + 19)
+#define INT_UART2DM_RX	   (32 + 20)
+#define INT_UART2DM_IRQ	  (32 + 21)
+
+#define MSM_IRQ_BIT(irq)	 (1 << ((irq) & 31))
+
+#define NR_IRQS 54
+
+#endif
diff --git a/board/qcom/msm7x27a_surf/msm7x27a_surf.c b/board/qcom/msm7x27a_surf/msm7x27a_surf.c
index 9199f48..cc8f000 100644
--- a/board/qcom/msm7x27a_surf/msm7x27a_surf.c
+++ b/board/qcom/msm7x27a_surf/msm7x27a_surf.c
@@ -29,11 +29,13 @@
 #include <asm/arch/proc_comm.h>
 #include "msm7x27a_surf.h"
 
+int critical_section_count;
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f()
 {
+	critical_section_count = 0;
 	uart1_clock_init();
 	return 0;
 }
diff --git a/include/configs/msm7x27a_surf.h b/include/configs/msm7x27a_surf.h
index a82ba59..2b5efb8 100644
--- a/include/configs/msm7x27a_surf.h
+++ b/include/configs/msm7x27a_surf.h
@@ -98,7 +98,7 @@
 /*---------------------------------------------------------------------
  * IRQ Settings
  */
-
+#define CONFIG_USE_IRQ
 #define CONFIG_STACKSIZE_IRQ    (4*1024)	/* IRQ stack */
 #define CONFIG_STACKSIZE_FIQ    (4*1024)	/* FIQ stack */
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 2/2] MSM7x27a:Add support for USB gadget
  2012-05-11  6:54 [U-Boot] [PATCH 0/2] This patch series contains support for interrupt and USB gadget in MSM7x27a surf board Srikanth Reddy Vintha
  2012-05-11  6:54 ` [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt Srikanth Reddy Vintha
@ 2012-05-11  6:54 ` Srikanth Reddy Vintha
  1 sibling, 0 replies; 7+ messages in thread
From: Srikanth Reddy Vintha @ 2012-05-11  6:54 UTC (permalink / raw)
  To: u-boot

	* USB gadget support

Signed-off-by: Srikanth Reddy Vintha <srikanth.reddy@lntinfotech.com>
---
 arch/arm/cpu/armv7/msm7x27a/acpuclock.c    |    7 +
 arch/arm/include/asm/arch-msm7x27a/hsusb.h |  183 ++++++++++++++++++++++++++++
 arch/arm/include/asm/arch-msm7x27a/iomap.h |    2 +
 drivers/usb/gadget/msm_udc.c               |   11 +-
 include/configs/msm7x27a_surf.h            |   12 +-
 5 files changed, 205 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-msm7x27a/hsusb.h

diff --git a/arch/arm/cpu/armv7/msm7x27a/acpuclock.c b/arch/arm/cpu/armv7/msm7x27a/acpuclock.c
index 7f46d18..ae9db0d 100644
--- a/arch/arm/cpu/armv7/msm7x27a/acpuclock.c
+++ b/arch/arm/cpu/armv7/msm7x27a/acpuclock.c
@@ -220,6 +220,13 @@ void acpu_clock_init(void)
 	}
 }
 
+void hsusb_clock_init(void)
+{
+	/* USB local clock control not enabled; use proc comm */
+	usb_clock_init();
+}
+
+
 #ifdef CONFIG_QC_MMC
 /* Configure MMC clock */
 void clock_config_mmc(uint32_t interface, uint32_t freq)
diff --git a/arch/arm/include/asm/arch-msm7x27a/hsusb.h b/arch/arm/include/asm/arch-msm7x27a/hsusb.h
new file mode 100644
index 0000000..0a8f853
--- /dev/null
+++ b/arch/arm/include/asm/arch-msm7x27a/hsusb.h
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2008, Google Inc.
+ * All rights reserved.
+ *
+ * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
+ *
+ * (C) Copyright 2012
+ * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 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 THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS 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 _HSUSB_H_
+#define _HSUSB_H_
+
+#include <asm/arch/iomap.h>
+
+#ifndef MSM_USB_BASE
+#error Must define base address for USB controller MSM_USB_BASE
+#endif
+
+#define USB_ID               (MSM_USB_BASE + 0x0000)
+#define USB_HWGENERAL        (MSM_USB_BASE + 0x0004)
+#define USB_HWHOST           (MSM_USB_BASE + 0x0008)
+#define USB_HWDEVICE         (MSM_USB_BASE + 0x000C)
+#define USB_HWTXBUF          (MSM_USB_BASE + 0x0010)
+#define USB_HWRXBUF          (MSM_USB_BASE + 0x0014)
+#define USB_SBUSCFG          (MSM_USB_BASE + 0x0090)
+
+#define USB_AHB_BURST        (MSM_USB_BASE + 0x0090)
+#define USB_AHB_MODE         (MSM_USB_BASE + 0x0098)
+#define USB_CAPLENGTH        (MSM_USB_BASE + 0x0100) /* 8 bit */
+#define USB_HCIVERSION       (MSM_USB_BASE + 0x0102) /* 16 bit */
+#define USB_HCSPARAMS        (MSM_USB_BASE + 0x0104)
+#define USB_HCCPARAMS        (MSM_USB_BASE + 0x0108)
+#define USB_DCIVERSION       (MSM_USB_BASE + 0x0120) /* 16 bit */
+#define USB_USBCMD           (MSM_USB_BASE + 0x0140)
+#define USB_USBSTS           (MSM_USB_BASE + 0x0144)
+#define USB_USBINTR          (MSM_USB_BASE + 0x0148)
+#define USB_FRINDEX          (MSM_USB_BASE + 0x014C)
+#define USB_DEVICEADDR       (MSM_USB_BASE + 0x0154)
+#define USB_ENDPOINTLISTADDR (MSM_USB_BASE + 0x0158)
+#define USB_BURSTSIZE        (MSM_USB_BASE + 0x0160)
+#define USB_TXFILLTUNING     (MSM_USB_BASE + 0x0164)
+#define USB_ULPI_VIEWPORT    (MSM_USB_BASE + 0x0170)
+#define USB_ENDPTNAK         (MSM_USB_BASE + 0x0178)
+#define USB_ENDPTNAKEN       (MSM_USB_BASE + 0x017C)
+#define USB_PORTSC           (MSM_USB_BASE + 0x0184)
+#define USB_OTGSC            (MSM_USB_BASE + 0x01A4)
+#define USB_USBMODE          (MSM_USB_BASE + 0x01A8)
+#define USB_ENDPTSETUPSTAT   (MSM_USB_BASE + 0x01AC)
+#define USB_ENDPTPRIME       (MSM_USB_BASE + 0x01B0)
+#define USB_ENDPTFLUSH       (MSM_USB_BASE + 0x01B4)
+#define USB_ENDPTSTAT        (MSM_USB_BASE + 0x01B8)
+#define USB_ENDPTCOMPLETE    (MSM_USB_BASE + 0x01BC)
+#define USB_ENDPTCTRL(n)     (MSM_USB_BASE + 0x01C0 + (4 * (n)))
+
+
+#define USBCMD_RESET   2
+#define USBCMD_ATTACH  1
+
+#define USBMODE_DEVICE 2
+#define USBMODE_HOST   3
+
+/* Endpoint Txfer Descriptor dTD as defined by DC */
+struct ept_queue_item {
+	struct ept_queue_item *next;
+#define UDC_DTD_TOTAL_BYTES(info) (((info) >> 16) & 0x7FFF)
+	unsigned info; /* 30:16-Total Bytes,7:0-Status */
+	unsigned page0;
+	unsigned page1;
+	unsigned page2;
+	unsigned page3;
+	unsigned page4;
+	unsigned reserved;
+	};
+
+/* Endpoint Queue Head (dQH) as defined by the DC must take up 64K.
+ * There must be one dQH for every endpoint and direction. */
+struct ept_queue_head {
+	unsigned config;
+	unsigned current; /* read-only */
+	unsigned next;
+	unsigned info;
+	unsigned page0;
+	unsigned page1;
+	unsigned page2;
+	unsigned page3;
+	unsigned page4;
+	unsigned reserved_0;
+	unsigned char setup_data[8];
+	unsigned reserved_1;
+	unsigned reserved_2;
+	unsigned reserved_3;
+	unsigned reserved_4;
+};
+
+#define CONFIG_MAX_PKT(n)     ((n) << 16)
+#define CONFIG_ZLT            (1 << 29)    /* stop on zero-len xfer */
+#define CONFIG_IOS            (1 << 15)    /* IRQ on setup */
+
+
+#define TERMINATE 1
+
+#define INFO_BYTES(n)         ((n) << 16)
+#define INFO_IOC              (1 << 15)
+#define INFO_ACTIVE           (1 << 7)
+#define INFO_HALTED           (1 << 6)
+#define INFO_BUFFER_ERROR     (1 << 5)
+#define INFO_TX_ERROR         (1 << 3)
+
+
+#define STS_NAKI        (1 << 16)  /* */
+#define STS_SLI         (1 << 8)   /* R/WC - suspend state entered */
+#define STS_SRI         (1 << 7)   /* R/WC - SOF recv'd */
+#define STS_URI		(1 << 6)   /* R/WC - RESET recv'd - write to clear */
+#define STS_FRI         (1 << 3)   /* R/WC - Frame List Rollover */
+#define STS_PCI         (1 << 2)   /* R/WC - Port Change Detect */
+#define STS_UEI         (1 << 1)   /* R/WC - USB Error Interrupt*/
+#define STS_UI          (1 << 0)   /* R/WC - USB Interrupt Trans Complete */
+
+/* bits used in all the endpoint status registers */
+#define EPT_TX(n) (1 << ((n) + 16))
+#define EPT_RX(n) (1 << (n))
+
+
+#define CTRL_TXE              (1 << 23) /* TX Endpoint Enable */
+#define CTRL_TXR              (1 << 22) /* TX Data Toggle Reset */
+#define CTRL_TXI              (1 << 21) /* TX Data Toggle Inhibit */
+#define CTRL_TXT(n)           ((n) << 18) /* TX Endpoint Type */
+#define CTRL_TXD              (1 << 17) /* TX Endpoint Data Source */
+#define CTRL_TXS              (1 << 16) /* TX Endpoint Stall */
+#define CTRL_RXE              (1 << 7) /* RX Endpoint Enable */
+#define CTRL_RXR              (1 << 6) /* RX Data Toggle Reset */
+#define CTRL_RXI              (1 << 5) /* RX Data Toggle Inhibit */
+#define CTRL_RXT(n)           ((n) << 2) /* RX Endpoint Type */
+#define CTRL_RXD              (1 << 1) /* RX Endpoint Data Source */
+#define CTRL_RXS              (1 << 0) /* RX Endpint Stall */
+
+#define CTRL_TXT_CTRL         (0 << 18)
+#define CTRL_TXT_ISOCH        (1 << 18)
+#define CTRL_TXT_BULK         (2 << 18)
+#define CTRL_TXT_INT          (3 << 18)
+
+#define CTRL_RXT_CTRL         (0 << 2)
+#define CTRL_RXT_ISOCH        (1 << 2)
+#define CTRL_RXT_BULK         (2 << 2)
+#define CTRL_RXT_INT          (3 << 2)
+
+#define ULPI_WAKEUP           (1 << 31)
+#define ULPI_RUN              (1 << 30)
+#define ULPI_WRITE            (1 << 29)
+#define ULPI_READ             (0 << 29)
+#define ULPI_STATE_NORMAL     (1 << 27)
+#define ULPI_ADDR(n)          (((n) & 255) << 16)
+#define ULPI_DATA(n)          ((n) & 255)
+#define ULPI_DATA_READ(n)     (((n) >> 8) & 255)
+
+#define PORTSC_PTC           (0xF << 16)
+#define PORTSC_PTC_TST_PKT   (0x4 << 16)
+
+#endif
diff --git a/arch/arm/include/asm/arch-msm7x27a/iomap.h b/arch/arm/include/asm/arch-msm7x27a/iomap.h
index 4c9d434..adc0b02 100644
--- a/arch/arm/include/asm/arch-msm7x27a/iomap.h
+++ b/arch/arm/include/asm/arch-msm7x27a/iomap.h
@@ -48,6 +48,8 @@
 
 #define MSM_SHARED_BASE 0x00100000
 
+#define MSM_USB_BASE 0xA0800000
+
 #define MSM_SDC1_BASE   0xA0400000
 #define MSM_SDC3_BASE   0xA0600000
 
diff --git a/drivers/usb/gadget/msm_udc.c b/drivers/usb/gadget/msm_udc.c
index 7c2a14a..1fbbbfb 100644
--- a/drivers/usb/gadget/msm_udc.c
+++ b/drivers/usb/gadget/msm_udc.c
@@ -173,8 +173,10 @@ static void msm_udc_handle_setup(void)
 		udcdbg("clear feature\n");
 		if ((s.wValue == 0) && (s.wLength == 0)) {
 			unsigned num = s.wIndex & USB_ENDPOINT_NUMBER_MASK;
-			unsigned direction = s.wIndex & USB_ENDPOINT_DIR_MASK;
-
+			#ifdef DEBUG
+				unsigned direction =
+					 s.wIndex & USB_ENDPOINT_DIR_MASK;
+			#endif
 			udcdbg("Clear feature ep%i%s\n", num, direction ?
 				"in" : "out");
 			msm_udc_ep_enable(num, 1);
@@ -217,7 +219,7 @@ static void msm_udc_handle_setup(void)
 
 static void msm_udc_ep_complete(unsigned num, unsigned direction)
 {
-	struct ept_queue_item *dTD = dTD_list[num];
+	struct ept_queue_item *dTD = (struct ept_queue_item *) dTD_list[num];
 	struct usb_endpoint_instance *epi =
 		&udc_device->bus->endpoint_array[num];
 	struct urb *urb = msm_udc_get_urb_by_dir(num, direction);
@@ -383,7 +385,8 @@ int udc_endpoint_write(struct usb_endpoint_instance *epi)
 	enter_critical_section();
 	/* Handle the case where there are completed dTDs waiting */
 	if (dTD_list[num] != NULL) {
-		struct ept_queue_item *dTDlast = dTD_list[num];
+		struct ept_queue_item *dTDlast =
+				(struct ept_queue_item *)dTD_list[num];
 		unsigned qDepth = 1;
 		while (dTDlast->next != (struct ept_queue_item *) TERMINATE) {
 			dTDlast = dTDlast->next;
diff --git a/include/configs/msm7x27a_surf.h b/include/configs/msm7x27a_surf.h
index 2b5efb8..5f0eed3 100644
--- a/include/configs/msm7x27a_surf.h
+++ b/include/configs/msm7x27a_surf.h
@@ -38,6 +38,11 @@
  */
 #define CONFIG_SYS_MALLOC_LEN           (2 * 1024)	/* 2KB  */
 
+/* Enable USB */
+#define CONFIG_MSM_UDC
+#define CONFIG_USB_TTY
+#define CONFIG_USB_DEVICE
+
 /*
  * select serial console configuration
  */
@@ -60,7 +65,7 @@
 #undef CONFIG_CMD_NET		/* network support */
 #undef CONFIG_SYS_MAX_FLASH_SECT
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"console=ttyS0,115200n8\0" \
+	"usbtty=cdc_acm\0"
 
 #define CONFIG_BOOTDELAY	-1
 
@@ -106,10 +111,6 @@
  * Physical Memory Map
  */
 
-#if 0
-#define CONFIG_BOOTDELAY       0
-#define CONFIG_BOOTCOMMAND		"mmc part"
-#endif
 #define CONFIG_NR_DRAM_BANKS		1
 
 #define PHYS_SDRAM_1			0x00000000
@@ -124,5 +125,4 @@
 #define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_INIT_RAM_ADDR + \
 						CONFIG_SYS_INIT_RAM_SIZE - \
 						GENERATED_GBL_DATA_SIZE)
-
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt
  2012-05-11  6:54 ` [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt Srikanth Reddy Vintha
@ 2012-05-12  6:20   ` Marek Vasut
  2012-05-14 11:58     ` Srikanth Reddy
  0 siblings, 1 reply; 7+ messages in thread
From: Marek Vasut @ 2012-05-12  6:20 UTC (permalink / raw)
  To: u-boot

Dear Srikanth Reddy Vintha,

> 	* support for msm7x27a interrupt
> 
> Signed-off-by: Srikanth Reddy Vintha <srikanth.reddy@lntinfotech.com>
> ---
>  arch/arm/cpu/armv7/msm7x27a/Makefile            |    1 +
>  arch/arm/cpu/armv7/msm7x27a/interrupts.c        |  136
> +++++++++++++++++++++++ arch/arm/include/asm/arch-msm7x27a/exclusion.h  | 
>  42 +++++++
>  arch/arm/include/asm/arch-msm7x27a/interrupts.h |   39 +++++++
>  arch/arm/include/asm/arch-msm7x27a/irqs.h       |   98 ++++++++++++++++
>  board/qcom/msm7x27a_surf/msm7x27a_surf.c        |    2 +
>  include/configs/msm7x27a_surf.h                 |    2 +-
>  7 files changed, 319 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/msm7x27a/interrupts.c
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/exclusion.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/interrupts.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/irqs.h
> 
> diff --git a/arch/arm/cpu/armv7/msm7x27a/Makefile
> b/arch/arm/cpu/armv7/msm7x27a/Makefile index 5f493d7..19e7546 100644
> --- a/arch/arm/cpu/armv7/msm7x27a/Makefile
> +++ b/arch/arm/cpu/armv7/msm7x27a/Makefile
> @@ -34,6 +34,7 @@ COBJS-y	:= board.o
>  COBJS-y	+= timer.o
>  COBJS-y	+= acpuclock.o
>  COBJS-y	+= gpio.o
> +COBJS-$(CONFIG_USE_IRQ)	+= interrupts.o
> 
>  SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
>  OBJS	:= $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
> diff --git a/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> b/arch/arm/cpu/armv7/msm7x27a/interrupts.c new file mode 100644
> index 0000000..cc45c4b
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> @@ -0,0 +1,136 @@
> +/*
> + * Copyright (c) 2008, Google Inc.
> + * All rights reserved.
> + *
> + * (C) Copyright 2012
> + * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *  * Redistributions of source code must retain the above copyright
> + *	notice, this list of conditions and the following disclaimer.
> + *  * Redistributions in binary form must reproduce the above copyright
> + *	notice, this list of conditions and the following disclaimer in
> + *	the documentation and/or other materials provided with the
> + *	distribution.
> + *  * Neither the name of Google, Inc. nor the names of its contributors
> + *	may be used to endorse or promote products derived from this
> + *	software without specific prior written permission.
> + *
> + * 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 THE
> + * COPYRIGHT OWNER OR CONTRIBUTORS 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.

So this is not GPL? Until this is cleared (or WD claims otherwise), I'm not 
reviewing further.

Btw if you submit any patches, make sure to CC the proper custodian so the 
patches are not lost http://www.denx.de/wiki/U-Boot/Custodians

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt
  2012-05-12  6:20   ` Marek Vasut
@ 2012-05-14 11:58     ` Srikanth Reddy
  2012-06-12 11:47       ` Srikanth Reddy
  2012-06-21 20:10       ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: Srikanth Reddy @ 2012-05-14 11:58 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang Denk,

could you please clarify on the below review comment.
________________________________________
From: Marek Vasut [marek.vasut at gmail.com]
Sent: Saturday, May 12, 2012 11:50 AM
To: u-boot at lists.denx.de
Cc: Srikanth Reddy; Mohamed Haneef; Shrinivas Sahukar; wd at denx.de
Subject: Re: [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt

Dear Srikanth Reddy Vintha,

>       * support for msm7x27a interrupt
>
> Signed-off-by: Srikanth Reddy Vintha <srikanth.reddy@lntinfotech.com>
> ---
>  arch/arm/cpu/armv7/msm7x27a/Makefile            |    1 +
>  arch/arm/cpu/armv7/msm7x27a/interrupts.c        |  136
> +++++++++++++++++++++++ arch/arm/include/asm/arch-msm7x27a/exclusion.h  |
>  42 +++++++
>  arch/arm/include/asm/arch-msm7x27a/interrupts.h |   39 +++++++
>  arch/arm/include/asm/arch-msm7x27a/irqs.h       |   98 ++++++++++++++++
>  board/qcom/msm7x27a_surf/msm7x27a_surf.c        |    2 +
>  include/configs/msm7x27a_surf.h                 |    2 +-
>  7 files changed, 319 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/msm7x27a/interrupts.c
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/exclusion.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/interrupts.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/irqs.h
>
> diff --git a/arch/arm/cpu/armv7/msm7x27a/Makefile
> b/arch/arm/cpu/armv7/msm7x27a/Makefile index 5f493d7..19e7546 100644
> --- a/arch/arm/cpu/armv7/msm7x27a/Makefile
> +++ b/arch/arm/cpu/armv7/msm7x27a/Makefile
> @@ -34,6 +34,7 @@ COBJS-y     := board.o
>  COBJS-y      += timer.o
>  COBJS-y      += acpuclock.o
>  COBJS-y      += gpio.o
> +COBJS-$(CONFIG_USE_IRQ)      += interrupts.o
>
>  SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
>  OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
> diff --git a/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> b/arch/arm/cpu/armv7/msm7x27a/interrupts.c new file mode 100644
> index 0000000..cc45c4b
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> @@ -0,0 +1,136 @@
> +/*
> + * Copyright (c) 2008, Google Inc.
> + * All rights reserved.
> + *
> + * (C) Copyright 2012
> + * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *  * Redistributions of source code must retain the above copyright
> + *   notice, this list of conditions and the following disclaimer.
> + *  * Redistributions in binary form must reproduce the above copyright
> + *   notice, this list of conditions and the following disclaimer in
> + *   the documentation and/or other materials provided with the
> + *   distribution.
> + *  * Neither the name of Google, Inc. nor the names of its contributors
> + *   may be used to endorse or promote products derived from this
> + *   software without specific prior written permission.
> + *
> + * 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 THE
> + * COPYRIGHT OWNER OR CONTRIBUTORS 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.

So this is not GPL? Until this is cleared (or WD claims otherwise), I'm not
reviewing further.

Btw if you submit any patches, make sure to CC the proper custodian so the
patches are not lost http://www.denx.de/wiki/U-Boot/Custodians


Is it compatible with GPL?, If not how do we overcome this.



Best regards,
 SrikanthR V

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt
  2012-05-14 11:58     ` Srikanth Reddy
@ 2012-06-12 11:47       ` Srikanth Reddy
  2012-06-21 20:10       ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Srikanth Reddy @ 2012-06-12 11:47 UTC (permalink / raw)
  To: u-boot

Hi,

I observed few files are Dual licensed in U-Boot. 

In my case To resolve license incompatibility ,Is it ok to add GPLV2 on top of existing license in the same file . so that the final file having two license .

please comment on this ...

Thanks,
Srikanth R V 
  
________________________________________
From: Srikanth Reddy
Sent: Monday, May 14, 2012 5:28 PM
To: wd at denx.de; u-boot at lists.denx.de
Cc: Marek Vasut; Mohamed Haneef; Murugadoss P; Shrinivas Sahukar
Subject: RE: [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt

Hi Wolfgang Denk,

could you please clarify on the below review comment.
________________________________________
From: Marek Vasut [marek.vasut at gmail.com]
Sent: Saturday, May 12, 2012 11:50 AM
To: u-boot at lists.denx.de
Cc: Srikanth Reddy; Mohamed Haneef; Shrinivas Sahukar; wd at denx.de
Subject: Re: [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt

Dear Srikanth Reddy Vintha,

>       * support for msm7x27a interrupt
>
> Signed-off-by: Srikanth Reddy Vintha <srikanth.reddy@lntinfotech.com>
> ---
>  arch/arm/cpu/armv7/msm7x27a/Makefile            |    1 +
>  arch/arm/cpu/armv7/msm7x27a/interrupts.c        |  136
> +++++++++++++++++++++++ arch/arm/include/asm/arch-msm7x27a/exclusion.h  |
>  42 +++++++
>  arch/arm/include/asm/arch-msm7x27a/interrupts.h |   39 +++++++
>  arch/arm/include/asm/arch-msm7x27a/irqs.h       |   98 ++++++++++++++++
>  board/qcom/msm7x27a_surf/msm7x27a_surf.c        |    2 +
>  include/configs/msm7x27a_surf.h                 |    2 +-
>  7 files changed, 319 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/msm7x27a/interrupts.c
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/exclusion.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/interrupts.h
>  create mode 100644 arch/arm/include/asm/arch-msm7x27a/irqs.h
>
> diff --git a/arch/arm/cpu/armv7/msm7x27a/Makefile
> b/arch/arm/cpu/armv7/msm7x27a/Makefile index 5f493d7..19e7546 100644
> --- a/arch/arm/cpu/armv7/msm7x27a/Makefile
> +++ b/arch/arm/cpu/armv7/msm7x27a/Makefile
> @@ -34,6 +34,7 @@ COBJS-y     := board.o
>  COBJS-y      += timer.o
>  COBJS-y      += acpuclock.o
>  COBJS-y      += gpio.o
> +COBJS-$(CONFIG_USE_IRQ)      += interrupts.o
>
>  SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
>  OBJS := $(addprefix $(obj),$(COBJS-y) $(SOBJS-y))
> diff --git a/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> b/arch/arm/cpu/armv7/msm7x27a/interrupts.c new file mode 100644
> index 0000000..cc45c4b
> --- /dev/null
> +++ b/arch/arm/cpu/armv7/msm7x27a/interrupts.c
> @@ -0,0 +1,136 @@
> +/*
> + * Copyright (c) 2008, Google Inc.
> + * All rights reserved.
> + *
> + * (C) Copyright 2012
> + * Larsen & Toubro Infotech Ltd. <www.lntinfotech.com>
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *  * Redistributions of source code must retain the above copyright
> + *   notice, this list of conditions and the following disclaimer.
> + *  * Redistributions in binary form must reproduce the above copyright
> + *   notice, this list of conditions and the following disclaimer in
> + *   the documentation and/or other materials provided with the
> + *   distribution.
> + *  * Neither the name of Google, Inc. nor the names of its contributors
> + *   may be used to endorse or promote products derived from this
> + *   software without specific prior written permission.
> + *
> + * 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 THE
> + * COPYRIGHT OWNER OR CONTRIBUTORS 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.

So this is not GPL? Until this is cleared (or WD claims otherwise), I'm not
reviewing further.

Btw if you submit any patches, make sure to CC the proper custodian so the
patches are not lost http://www.denx.de/wiki/U-Boot/Custodians


Is it compatible with GPL?, If not how do we overcome this.



Best regards,
 SrikanthR V

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt
  2012-05-14 11:58     ` Srikanth Reddy
  2012-06-12 11:47       ` Srikanth Reddy
@ 2012-06-21 20:10       ` Wolfgang Denk
  1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Denk @ 2012-06-21 20:10 UTC (permalink / raw)
  To: u-boot

Dear Srikanth Reddy,

In message <3C902E36B0BFAD4394CBF7D8633B02A10B5E5987CD@BLRINMSMBX01.bglrodc.lntinfotech.com> you wrote:
> 
> could you please clarify on the below review comment.

I'm not sure which aditional comment you need.

> So this is not GPL? Until this is cleared (or WD claims otherwise), I'm not
> reviewing further.

Please fix your quoting.  This looks as if it was written by you, but
actually this was Marek's remark.  See
http://www.netmeister.org/news/learn2quote.html

> Is it compatible with GPL?, If not how do we overcome this.

You mentioned you could dual-license it as GPLv2+ as well - that would
be obviously best.  Thanks.

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: wd at denx.de
Well, the way I see it, logic is only a way of being ignorant by num-
bers.                                 - Terry Pratchett, _Small Gods_

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-06-21 20:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-11  6:54 [U-Boot] [PATCH 0/2] This patch series contains support for interrupt and USB gadget in MSM7x27a surf board Srikanth Reddy Vintha
2012-05-11  6:54 ` [U-Boot] [PATCH 1/2] MSM7x27a:Add support for interrupt Srikanth Reddy Vintha
2012-05-12  6:20   ` Marek Vasut
2012-05-14 11:58     ` Srikanth Reddy
2012-06-12 11:47       ` Srikanth Reddy
2012-06-21 20:10       ` Wolfgang Denk
2012-05-11  6:54 ` [U-Boot] [PATCH 2/2] MSM7x27a:Add support for USB gadget Srikanth Reddy Vintha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.