From owner-p4-projects@FreeBSD.ORG Mon Jul 13 13:12:29 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4DA6A1065673; Mon, 13 Jul 2009 13:12:29 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C84106566C for ; Mon, 13 Jul 2009 13:12:29 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E9E628FC13 for ; Mon, 13 Jul 2009 13:12:28 +0000 (UTC) (envelope-from syl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n6DDCSGu097083 for ; Mon, 13 Jul 2009 13:12:28 GMT (envelope-from syl@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6DDCSRK097081 for perforce@freebsd.org; Mon, 13 Jul 2009 13:12:28 GMT (envelope-from syl@FreeBSD.org) Date: Mon, 13 Jul 2009 13:12:28 GMT Message-Id: <200907131312.n6DDCSRK097081@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to syl@FreeBSD.org using -f From: Sylvestre Gallon To: Perforce Change Reviews Cc: Subject: PERFORCE change 166001 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 13:12:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=166001 Change 166001 by syl@syl_pablo on 2009/07/13 13:11:35 Implement clear_stall. Update get_hw_ep_profile because this ip does not support isochronous transfers. Affected files ... .. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.c#3 edit .. //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.h#4 edit Differences ... ==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.c#3 (text+ko) ==== @@ -73,6 +73,12 @@ #endif /* + * This driver dont support DMA for the mement. DMA seems to not be + * implemented on s3c2xxx cpus. + */ + + +/* * Here is a list of what the chip supports. */ @@ -91,7 +97,6 @@ .support_multi_buffer = 1, .support_bulk = 1, .support_interrupt = 1, - .support_isochronous = 1 , .support_in = 1, .support_out = 1 , }, @@ -102,7 +107,6 @@ .support_multi_buffer = 1, .support_bulk = 1, .support_interrupt = 1, - .support_isochronous = 1 , .support_in = 1, .support_out = 1 , }, @@ -113,7 +117,6 @@ .support_multi_buffer = 1, .support_bulk = 1, .support_interrupt = 1, - .support_isochronous = 1 , .support_in = 1, .support_out = 1 , }, @@ -124,7 +127,6 @@ .support_multi_buffer = 1, .support_bulk = 1, .support_interrupt = 1, - .support_isochronous = 1 , .support_in = 1, .support_out = 1 , }, @@ -284,9 +286,96 @@ return ; } +static void +s3c24dci_clear_stall_sub(struct s3c24dci_softc *sc, uint8_t ep_no, + uint8_t ep_type, uint8_t ep_dir) +{ + const struct usb_hw_ep_profile *pf; + uint32_t csr1; + uint32_t csr2; + uint32_t ittmp; + + if (ep_type == UE_CONTROL) { + /* clearing stall is not needed */ + } + + /* disable ep */ + + ittmp = S3C24XX_DCI_READ_4(S3C24_DCI_EP_INT_EN); + ittmp &= ~(1<flags.usb_mode != USB_MODE_DEVICE) { + /* not supported */ + return ; + } + /* get softc */ + sc = S3C24_DCI_BUS2SC(udev->bus); + + /* get endpoint descriptors */ + ed = ep->edesc; + + s3c24dci_clear_stall_sub(sc, + (ed->bEndpointAddress & UE_ADDR), + (ed->bmAttributes & UE_XFERTYPE), + (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT))); return ; } ==== //depot/projects/soc2009/syl_usb/src/sys/dev/usb/controller/s3c24xxdci.h#4 (text+ko) ==== @@ -169,6 +169,12 @@ #define S3C24XX_DCI_EP_MAX 5 +#define S3C24XX_DCI_READ_4(sc, reg) \ + bus_space_read_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg) + +#define S3C24XX_DCI_WRITE_4(sc, reg, (sc)->sc_io_hdl, reg, data) \ + bus_space_write_4((sc)->sc_io_tag, (sc)->sc_io_hdl, reg, data) + struct s3c24dci_softc { struct usb_bus sc_bus;