Re: [RFC / PATCH 1/6] OMAP : Add USB transceiver interface type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Dec 24, 2009 at 12:42:32PM +0100, ext Maulik Mankad wrote:
OMAP: Add USB transceiver interface type

This patch proposes to pass transceiver interface type (ULPI/UTMI)
from the board file.

OMAP4 MUSB provides two options to interface with the transceiver.

(1) MUSB communicates with an ON chip transceiver using UTMI.
(2) MUSB communicates with an OFF chip transceiver using ULPI.

The driver shall program the OTG_INTERFSEL register as per the
information passed from the board file.

this is really omap specific and I wanted to keep us from adding too many board/arch-specific fields to musb platform_data. I can think of two ways of cleaning this up:

1. do the interface selection usb arch/arm/mach-omap2/usb-musb.c

2. add a void *arch_data to struct musb_platform_data and allow archs to pass whatever data structure they want to their own drivers/usb/musb/$arch.c

I like (2) better.

few comments below.

Signed-off-by: Maulik Mankad <x0082077@xxxxxx>
Cc: Tony Lindgren <tony@xxxxxxxxxxx>
Cc: Felipe Balbi <felipe.balbi@xxxxxxxxx>
Cc: David Brownell <david-b@xxxxxxxxxxx>

Index: linux-2.6/include/linux/usb/musb.h
===================================================================
--- linux-2.6.orig/include/linux/usb/musb.h
+++ linux-2.6/include/linux/usb/musb.h
@@ -61,6 +61,9 @@ struct musb_hdrc_platform_data {
	/* MUSB_HOST, MUSB_PERIPHERAL, or MUSB_OTG */
	u8		mode;

+	/* ULPI / UTMI based on transceiver interface */
+	u8		interface_type;
+
	/* for clk_get() */
	const char	*clock;

Index: linux-2.6/arch/arm/plat-omap/include/plat/usb.h
===================================================================
--- linux-2.6.orig/arch/arm/plat-omap/include/plat/usb.h
+++ linux-2.6/arch/arm/plat-omap/include/plat/usb.h
@@ -42,7 +42,8 @@ struct ehci_hcd_omap_platform_data {
#define UDC_BASE			OMAP2_UDC_BASE
#define OMAP_OHCI_BASE			OMAP2_OHCI_BASE

-extern void usb_musb_init(void);
+enum musb_interface	{MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};

aren't there 3 possible cases on omaps ?
. 8-pin PHY interface, UTMI+ level 3
. 12-pin PHY interface, 8-bit SDR ULPI
. 8-pin PHY interface, 4-bit DDR ULPI

also, please define that as:

enum musb_interface {
	MUSB_INTERFACE_ULPI,
	...
};

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux