Commit f0a233c0 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: ohci_omap updates

This updates the OMAP OHCI support to match the latest from the
Linux-OMAP tree.  Notable changes from the preceding version:

  - Use the new USB init model (arch/arm/mach-omap/usb.c).

  - The OMAP-specific bus is gone; it now uses platform_device.
    (Update from Tony Lindgren.)

  - Works on the H2 board, which requires the external isp1301
    transceiver even in non-OTG configurations.

  - Adds OTG support.

  - Adds basic power management calls.

The mach-omap/Kconfig file in the main Linux tree is a bit out of
date, it doesn't know about CONFIG_ARCH_OMAP_OTG (for the OMAPs that
have OTG silicon).
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 9fbdfdf7
......@@ -52,6 +52,7 @@ config USB_EHCI_ROOT_HUB_TT
config USB_OHCI_HCD
tristate "OHCI HCD support"
depends on USB
select ISP1301_OMAP if MACH_OMAP_H2
---help---
The Open Host Controller Interface (OHCI) is a standard for accessing
USB 1.1 host controller hardware. It does more in hardware than Intel's
......
......@@ -97,6 +97,7 @@
#include <linux/list.h>
#include <linux/interrupt.h> /* for in_interrupt () */
#include <linux/usb.h>
#include <linux/usb_otg.h>
#include "../core/hcd.h"
#include <linux/dma-mapping.h>
#include <linux/dmapool.h> /* needed by ohci-mem.c when no PCI */
......@@ -693,7 +694,7 @@ static void ohci_stop (struct usb_hcd *hcd)
/* must not be called from interrupt context */
#ifdef CONFIG_PM
#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM)
static void mark_children_gone (struct usb_device *dev)
{
......
This diff is collapsed.
/*
* linux/drivers/usb/host/ohci-omap.h
*
* OMAP OHCI USB controller specific defines
*/
/* OMAP USB OHCI common defines */
#define OMAP_OHCI_NAME "omap-ohci"
#define OMAP_OHCI_BASE 0xfffba000
#define OMAP_OHCI_SIZE 4096
#define HMC_CLEAR (0x3f << 1)
#define APLL_NDPLL_SWITCH 0x0001
#define DPLL_PLL_ENABLE 0x0010
#define DPLL_LOCK 0x0001
#define SOFT_REQ_REG_REQ 0x0001
#define USB_MCLK_EN 0x0010
#define USB_HOST_HHC_UHOST_EN 0x00000200
#define SOFT_USB_OTG_REQ (1 << 8)
#define SOFT_USB_REQ (1 << 3)
#define STATUS_REQ_REG 0xfffe0840
#define USB_HOST_DPLL_REQ (1 << 8)
#define SOFT_DPLL_REQ (1 << 0)
/* OMAP-1510 USB OHCI defines */
#define OMAP1510_LB_MEMSIZE 32 /* Should be same as SDRAM size */
#define OMAP1510_LB_CLOCK_DIV 0xfffec10c
#define OMAP1510_LB_MMU_CTL 0xfffec208
#define OMAP1510_LB_MMU_LCK 0xfffec224
#define OMAP1510_LB_MMU_LD_TLB 0xfffec228
#define OMAP1510_LB_MMU_CAM_H 0xfffec22c
#define OMAP1510_LB_MMU_CAM_L 0xfffec230
#define OMAP1510_LB_MMU_RAM_H 0xfffec234
#define OMAP1510_LB_MMU_RAM_L 0xfffec238
/* OMAP-1610 USB OHCI defines */
#define USB_TRANSCEIVER_CTRL 0xfffe1064
#define OTG_REV 0xfffb0400
#define OTG_SYSCON_1 0xfffb0404
#define OTG_IDLE_EN (1 << 15)
#define DEV_IDLE_EN (1 << 13)
#define OTG_SYSCON_2 0xfffb0408
#define OTG_CTRL 0xfffb040c
#define OTG_IRQ_EN 0xfffb0410
#define OTG_IRQ_SRC 0xfffb0414
#define OTG_EN (1 << 31)
#define USBX_SYNCHRO (1 << 30)
#define SRP_VBUS (1 << 12)
#define OTG_PADEN (1 << 10)
#define HMC_PADEN (1 << 9)
#define UHOST_EN (1 << 8)
/* Hardware specific defines */
#define OMAP1510_FPGA_HOST_CTRL 0xe800020c
......@@ -359,6 +359,13 @@ struct ohci_hcd {
struct ed *ed_controltail; /* last in ctrl list */
struct ed *periodic [NUM_INTS]; /* shadow int_table */
/*
* OTG controllers and transceivers need software interaction;
* other external transceivers should be software-transparent
*/
struct otg_transceiver *transceiver;
unsigned power_budget;
/*
* memory management for queue data structures
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment