All of lore.kernel.org
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 04/11] MXS: Add data shared between imx-otg and EHCI driver
Date: Tue,  1 May 2012 03:55:56 +0200	[thread overview]
Message-ID: <1335837363-12376-5-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1335837363-12376-1-git-send-email-marex@denx.de>

This patch adds common data shared between the MXS EHCI HCD driver,
the MXS USB Gadget driver and the imx-otg driver. These data allow
passing clock and memory stuff from imx-otg driver into the
host/gadget driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chen Peter-B29397 <B29397@freescale.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Li Frank-B20596 <B20596@freescale.com>
Cc: Linux USB <linux-usb@vger.kernel.org>
Cc: Liu JunJie-B08287 <B08287@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Shi Make-B15407 <B15407@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Subodh Nijsure <snijsure@grid-net.com>
Cc: Wolfgang Denk <wd@denx.de>
---
 include/linux/usb/mxs-usb.h |   72 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 include/linux/usb/mxs-usb.h

diff --git a/include/linux/usb/mxs-usb.h b/include/linux/usb/mxs-usb.h
new file mode 100644
index 0000000..708d61f
--- /dev/null
+++ b/include/linux/usb/mxs-usb.h
@@ -0,0 +1,72 @@
+/*
+ * include/linux/usb/mxs-usb.h
+ *
+ * Freescale i.MX USB driver shared data.
+ *
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ * on behalf of DENX Software Engineering GmbH
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __INCLUDE_LINUX_USB_MXS_USB_H__
+#define __INCLUDE_LINUX_USB_MXS_USB_H__
+
+#include <linux/types.h>
+#include <linux/platform_device.h>
+#include <linux/usb/otg.h>
+#include <linux/irq.h>
+
+struct imx_otg_res {
+	struct resource		*mem_res;
+	void __iomem		*mem;
+	struct device		*dev;
+};
+
+struct imx_otg {
+	struct platform_device	*pdev_host;
+	struct platform_device	*pdev_gadget;
+
+	struct imx_otg_res	res;
+
+	struct clk		*clk;
+	int			irq;
+	int			irq_wakeup;
+
+	uint32_t		gpio_vbus;
+	uint32_t		gpio_vbus_inverted;
+	enum usb_otg_state	new_state;
+	enum usb_otg_state	cur_state;
+	struct usb_otg		otg;
+	struct work_struct	work;
+
+	irqreturn_t		(*host_handler)(int irq, void *data);
+	void			*host_data;
+	irqreturn_t		(*gadget_handler)(int irq, void *data);
+	void			*gadget_data;
+};
+
+void imx_otg_set_irq_handler(struct device *dev,
+			irqreturn_t (*handler)(int irq, void *data),
+			void *data, int host);
+
+struct imx_usb_platform_data {
+	uint32_t		gpio_vbus;
+	bool			gpio_vbus_inverted;
+	bool			host_mode;
+	bool			gadget_mode;
+};
+
+#endif /* __INCLUDE_LINUX_USB_MXS_USB_H__ */
-- 
1.7.10

  parent reply	other threads:[~2012-05-01  1:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01  1:55 [RFC PATCH 00/11 V7] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-05-01  1:55 ` [PATCH 01/11] MXS: Make clk_disable return integer Marek Vasut
2012-05-01  1:55 ` [PATCH 02/11] MXS: Add USB EHCI and USB PHY clock handling Marek Vasut
2012-05-01  1:55 ` [PATCH 03/11] MXS: Fixup i.MX233 USB base address name Marek Vasut
2012-05-01  1:55 ` Marek Vasut [this message]
2012-05-01  1:55 ` [PATCH 05/11] MXS: Modify the ci13xxx_udc to avoid adding UDC Marek Vasut
2012-05-01  1:55 ` [PATCH 06/11] MXS: Add small registration glue for ci13xxx_udc Marek Vasut
2012-05-01  1:55 ` [PATCH 07/11] MXS: Add separate MXS EHCI HCD driver Marek Vasut
2012-05-01  1:56 ` [PATCH 08/11] MXS: Add imx-otg driver Marek Vasut
2012-05-01  1:56 ` [PATCH 09/11] MXS: Add USB PHY driver Marek Vasut
2012-05-01  1:56 ` [PATCH 10/11] MXS: Add platform registration hooks for USB EHCI Marek Vasut
2012-05-01  1:56 ` [PATCH 11/11] MXS: Enable USB on M28EVK Marek Vasut
2012-05-01  3:13 ` [RFC PATCH 00/11 V7] MXS: Add i.MX28 USB Host driver Chen Peter-B29397
2012-05-01  3:21   ` Marek Vasut
2012-05-01  3:36     ` Chen Peter-B29397
2012-05-01  3:49       ` Marek Vasut
2012-05-01  7:52         ` Chen Peter-B29397
2012-05-01 13:55           ` Marek Vasut
2012-05-03  3:24             ` Chen Peter-B29397
2012-05-03 13:27               ` Marek Vasut
2012-05-09  3:29                 ` Chen Peter-B29397
2012-05-09  8:43                   ` Marek Vasut
2012-05-09 10:19                     ` Chen Peter-B29397
2012-05-09 10:31                       ` Marek Vasut
2012-05-08  0:58 ` Marek Vasut
2012-05-10 10:19 ` Juergen Beisert
2012-05-10 18:10   ` Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2012-04-29 22:34 [RFC PATCH 00/11 V6] " Marek Vasut
2012-04-29 22:34 ` [PATCH 04/11] MXS: Add data shared between imx-otg and EHCI driver Marek Vasut
2012-04-18 17:46 [RFC PATCH 00/10 V3] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-04-22 12:59 ` [RFC PATCH 00/11 V4] " Marek Vasut
2012-04-22 12:59   ` [PATCH 04/11] MXS: Add data shared between imx-otg and EHCI driver Marek Vasut
2012-04-22 14:39     ` Shawn Guo
2012-04-22 15:42       ` Marek Vasut
2012-04-22 16:38         ` Shawn Guo
2012-04-24  3:18   ` [RFC PATCH 00/11 V5] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-04-24  3:18     ` [PATCH 04/11] MXS: Add data shared between imx-otg and EHCI driver Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335837363-12376-5-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.