Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68984aed authored by Steve French's avatar Steve French
Browse files

Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git

parents 4a6d87f1 b4b08e58
Loading
Loading
Loading
Loading
+93 −0
Original line number Diff line number Diff line
			S3C24XX USB Host support
			========================



Introduction
------------

  This document details the S3C2410/S3C2440 in-built OHCI USB host support.

Configuration
-------------

  Enable at least the following kernel options:

  menuconfig:

   Device Drivers  --->
     USB support  --->
       <*> Support for Host-side USB
       <*>   OHCI HCD support


  .config:
    CONFIG_USB
    CONFIG_USB_OHCI_HCD


  Once these options are configured, the standard set of USB device
  drivers can be configured and used.


Board Support
-------------

  The driver attaches to a platform device, which will need to be
  added by the board specific support file in linux/arch/arm/mach-s3c2410,
  such as mach-bast.c or mach-smdk2410.c

  The platform device's platform_data field is only needed if the
  board implements extra power control or over-current monitoring.

  The OHCI driver does not ensure the state of the S3C2410's MISCCTRL
  register, so if both ports are to be used for the host, then it is
  the board support file's responsibility to ensure that the second
  port is configured to be connected to the OHCI core.


Platform Data
-------------

  See linux/include/asm-arm/arch-s3c2410/usb-control.h for the
  descriptions of the platform device data. An implementation
  can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c .

  The `struct s3c2410_hcd_info` contains a pair of functions
  that get called to enable over-current detection, and to
  control the port power status.

  The ports are numbered 0 and 1.

  power_control:

    Called to enable or disable the power on the port.

  enable_oc:

    Called to enable or disable the over-current monitoring.
    This should claim or release the resources being used to
    check the power condition on the port, such as an IRQ.

  report_oc:

    The OHCI driver fills this field in for the over-current code
    to call when there is a change to the over-current state on
    an port. The ports argument is a bitmask of 1 bit per port,
    with bit X being 1 for an over-current on port X.

    The function s3c2410_usb_report_oc() has been provided to
    ensure this is called correctly.

  port[x]:

    This is struct describes each port, 0 or 1. The platform driver
    should set the flags field of each port to S3C_HCDFLG_USED if
    the port is enabled.



Document Author
---------------

Ben Dooks, (c) 2005 Simtec Electronics
+1 −1
Original line number Diff line number Diff line
@@ -784,7 +784,7 @@ DVB SUBSYSTEM AND DRIVERS
P:	LinuxTV.org Project
M: 	linux-dvb-maintainer@linuxtv.org
L: 	linux-dvb@linuxtv.org (subscription required)
W:	http://linuxtv.org/developer/dvb.xml
W:	http://linuxtv.org/
S:	Supported

EATA-DMA SCSI DRIVER
+7 −0
Original line number Diff line number Diff line
@@ -533,6 +533,13 @@ ENTRY(__switch_to)
	ldr	r3, [r2, #TI_TP_VALUE]
	stmia	ip!, {r4 - sl, fp, sp, lr}	@ Store most regs on stack
	ldr	r6, [r2, #TI_CPU_DOMAIN]!
#if __LINUX_ARM_ARCH__ >= 6
#ifdef CONFIG_CPU_MPCORE
	clrex
#else
	strex	r3, r4, [ip]			@ Clear exclusive monitor
#endif
#endif
#if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT)
	mra	r4, r5, acc0
	stmia   ip, {r4, r5}
+3 −1
Original line number Diff line number Diff line
#if __LINUX_ARM_ARCH__ >= 6
#include <linux/config.h>

#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_MPCORE)
	.macro	bitop, instr
	mov	r2, #1
	and	r3, r0, #7		@ Get bit offset
+13 −5
Original line number Diff line number Diff line
/* linux/arch/arm/mach-s3c2410/usb-simtec.c
 *
 * Copyright (c) 2004 Simtec Electronics
 * Copyright (c) 2004,2005 Simtec Electronics
 *   Ben Dooks <ben@simtec.co.uk>
 *
 * http://www.simtec.co.uk/products/EB2410ITX/
@@ -14,6 +14,8 @@
 * Modifications:
 *	14-Sep-2004 BJD  Created
 *	18-Oct-2004 BJD  Cleanups, and added code to report OC cleared
 *	09-Aug-2005 BJD  Renamed s3c2410_report_oc to s3c2410_usb_report_oc
 *	09-Aug-2005 BJD  Ports powered only if both are enabled
*/

#define DEBUG
@@ -47,13 +49,19 @@
 * designed boards.
*/

static unsigned int power_state[2];

static void
usb_simtec_powercontrol(int port, int to)
{
	pr_debug("usb_simtec_powercontrol(%d,%d)\n", port, to);

	if (port == 1)
		s3c2410_gpio_setpin(S3C2410_GPB4, to ? 0:1);
	power_state[port] = to;

	if (power_state[0] && power_state[1])
		s3c2410_gpio_setpin(S3C2410_GPB4, 0);
	else
		s3c2410_gpio_setpin(S3C2410_GPB4, 1);
}

static irqreturn_t
@@ -63,10 +71,10 @@ usb_simtec_ocirq(int irq, void *pw, struct pt_regs *regs)

	if (s3c2410_gpio_getpin(S3C2410_GPG10) == 0) {
		pr_debug("usb_simtec: over-current irq (oc detected)\n");
		s3c2410_report_oc(info, 3);
		s3c2410_usb_report_oc(info, 3);
	} else {
		pr_debug("usb_simtec: over-current irq (oc cleared)\n");
		s3c2410_report_oc(info, 0);
		s3c2410_usb_report_oc(info, 0);
	}

	return IRQ_HANDLED;
Loading