Skip to content
Snippets Groups Projects
Commit 62019767 authored by Heiko Schocher's avatar Heiko Schocher Committed by Andreas Bießmann
Browse files

usb: gadget: at91_udc: add at91_udc into U-Boot


add U-Boot specific changes to the at91_udc linux driver,
so it works with U-Boot.

Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
parent 8ea1fbf7
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o ...@@ -10,6 +10,7 @@ obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
# new USB gadget layer dependencies # new USB gadget layer dependencies
ifdef CONFIG_USB_GADGET ifdef CONFIG_USB_GADGET
obj-$(CONFIG_USB_GADGET_AT91) += at91_udc.o
obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o obj-$(CONFIG_USB_GADGET_BCM_UDC_OTG_PHY) += bcm_udc_otg_phy.o
obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
......
This diff is collapsed.
...@@ -128,18 +128,14 @@ struct at91_udc { ...@@ -128,18 +128,14 @@ struct at91_udc {
unsigned req_pending:1; unsigned req_pending:1;
unsigned wait_for_addr_ack:1; unsigned wait_for_addr_ack:1;
unsigned wait_for_config_ack:1; unsigned wait_for_config_ack:1;
unsigned selfpowered:1;
unsigned active_suspend:1; unsigned active_suspend:1;
u8 addr; u8 addr;
struct at91_udc_data board; struct at91_udc_data board;
struct clk *iclk, *fclk;
struct platform_device *pdev;
struct proc_dir_entry *pde;
void __iomem *udp_baseaddr; void __iomem *udp_baseaddr;
int udp_irq; int udp_irq;
spinlock_t lock; spinlock_t lock;
struct timer_list vbus_timer; struct at91_matrix *matrix;
struct work_struct vbus_timer_work;
struct regmap *matrix;
}; };
static inline struct at91_udc *to_udc(struct usb_gadget *g) static inline struct at91_udc *to_udc(struct usb_gadget *g)
...@@ -166,10 +162,10 @@ struct at91_request { ...@@ -166,10 +162,10 @@ struct at91_request {
# define PACKET(stuff...) do{}while(0) # define PACKET(stuff...) do{}while(0)
#endif #endif
#define ERR(stuff...) pr_err("udc: " stuff) #define ERR(stuff...) debug("udc: " stuff)
#define WARNING(stuff...) pr_warning("udc: " stuff) #define WARNING(stuff...) debug("udc: " stuff)
#define INFO(stuff...) pr_info("udc: " stuff) #define INFO(stuff...) debug("udc: " stuff)
#define DBG(stuff...) pr_debug("udc: " stuff) #define DBG(stuff...) debug("udc: " stuff)
#endif #endif
/*
* Platform data definitions for Atmel USBA gadget driver
* pieces copied from linux:include/linux/platform_data/atmel.h
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __LINUX_USB_AT91_UDC_H__
#define __LINUX_USB_AT91_UDC_H__
struct at91_udc_data {
int vbus_pin; /* high == host powering us */
u8 vbus_active_low; /* vbus polarity */
u8 vbus_polled; /* Use polling, not interrupt */
int pullup_pin; /* active == D+ pulled up */
u8 pullup_active_low; /* true == pullup_pin is active low */
unsigned long baseaddr;
};
int at91_udc_probe(struct at91_udc_data *pdata);
#endif /* __LINUX_USB_AT91_UDC_H__ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment