usb: gadget: at91_udc: Rework for multi-platform kernel support
cpu_is_at91xxx are a set of macros defined in mach/cpu.h and are here used to detect the SoC we are booting on. Use compatible string + a caps structure to replace those cpu_is_xxx tests. Remove all mach and asm headers (which are now unused). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Этот коммит содержится в:

коммит произвёл
Nicolas Ferre

родитель
422cde259a
Коммит
f0bceab4e3
@@ -107,6 +107,11 @@ struct at91_ep {
|
||||
unsigned fifo_bank:1;
|
||||
};
|
||||
|
||||
struct at91_udc_caps {
|
||||
int (*init)(struct at91_udc *udc);
|
||||
void (*pullup)(struct at91_udc *udc, int is_on);
|
||||
};
|
||||
|
||||
/*
|
||||
* driver is non-SMP, and just blocks IRQs whenever it needs
|
||||
* access protection for chip registers or driver state
|
||||
@@ -115,6 +120,7 @@ struct at91_udc {
|
||||
struct usb_gadget gadget;
|
||||
struct at91_ep ep[NUM_ENDPOINTS];
|
||||
struct usb_gadget_driver *driver;
|
||||
const struct at91_udc_caps *caps;
|
||||
unsigned vbus:1;
|
||||
unsigned enabled:1;
|
||||
unsigned clocked:1;
|
||||
@@ -134,6 +140,7 @@ struct at91_udc {
|
||||
spinlock_t lock;
|
||||
struct timer_list vbus_timer;
|
||||
struct work_struct vbus_timer_work;
|
||||
struct regmap *matrix;
|
||||
};
|
||||
|
||||
static inline struct at91_udc *to_udc(struct usb_gadget *g)
|
||||
|
Ссылка в новой задаче
Block a user