X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=include%2Fusb%2Fs3c_udc.h;h=7f49a4e2d5cfec88c301a69b264d5e8bd1888938;hb=132f9bfc9ed0761fe349d2609918fa8a61e20692;hp=14dadc8b0538cddf281fc205e7d1827b91d052e7;hpb=b2eb7d9bc6032e16b7dd898f7c0ea654f63b61db;p=u-boot diff --git a/include/usb/s3c_udc.h b/include/usb/s3c_udc.h index 14dadc8b05..7f49a4e2d5 100644 --- a/include/usb/s3c_udc.h +++ b/include/usb/s3c_udc.h @@ -3,26 +3,14 @@ * Samsung S3C on-chip full/high speed USB device controllers * Copyright (C) 2005 for Samsung Electronics * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __S3C_USB_GADGET #define __S3C_USB_GADGET #include +#include #include #include #include @@ -32,7 +20,7 @@ /*-------------------------------------------------------------------------*/ /* DMA bounce buffer size, 16K is enough even for mass storage */ -#define DMA_BUFFER_SIZE (4096*4) +#define DMA_BUFFER_SIZE (16*SZ_1K) #define EP0_FIFO_SIZE 64 #define EP_FIFO_SIZE 512 @@ -94,15 +82,12 @@ struct s3c_udc { struct s3c_plat_otg_data *pdata; - void *dma_buf[S3C_MAX_ENDPOINTS+1]; - dma_addr_t dma_addr[S3C_MAX_ENDPOINTS+1]; - int ep0state; struct s3c_ep ep[S3C_MAX_ENDPOINTS]; unsigned char usb_address; - unsigned req_pending:1, req_std:1, req_config:1; + unsigned req_pending:1, req_std:1; }; extern struct s3c_udc *the_controller; @@ -111,54 +96,6 @@ extern struct s3c_udc *the_controller; #define ep_index(EP) ((EP)->bEndpointAddress&0xF) #define ep_maxpacket(EP) ((EP)->ep.maxpacket) -/*-------------------------------------------------------------------------*/ -/* #define DEBUG_UDC */ -#ifdef DEBUG_UDC -#define DBG(stuff...) printf("udc: " stuff) -#else -#define DBG(stuff...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC_SETUP -#define DEBUG_SETUP(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG_SETUP(fmt, args...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC_EP0 -#define DEBUG_EP0(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG_EP0(fmt, args...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC -#define DEBUG(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG(fmt, args...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC_ISR -#define DEBUG_ISR(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG_ISR(fmt, args...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC_OUT_EP -#define DEBUG_OUT_EP(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG_OUT_EP(fmt, args...) do {} while (0) -#endif - -#ifdef DEBUG_S3C_UDC_IN_EP -#define DEBUG_IN_EP(fmt, args...) printk(fmt, ##args) -#else -#define DEBUG_IN_EP(fmt, args...) do {} while (0) -#endif - -#define ERR(stuff...) printf("ERR udc: " stuff) -#define WARN(stuff...) printf("WARNING udc: " stuff) -#define INFO(stuff...) printf("INFO udc: " stuff) - extern void otg_phy_init(struct s3c_udc *dev); extern void otg_phy_off(struct s3c_udc *dev); @@ -171,5 +108,6 @@ struct s3c_plat_otg_data { unsigned int regs_otg; unsigned int usb_phy_ctrl; unsigned int usb_flags; + unsigned int usb_gusbcfg; }; #endif