Subversion Repositories freemyipod

Rev

Rev 85 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 85 Rev 87
Line 30... Line 30...
30
#include "usb.h"
30
#include "usb.h"
31
#include "usb_ch9.h"
31
#include "usb_ch9.h"
32
#include "synopsysotg.h"
32
#include "synopsysotg.h"
33
#include "util.h"
33
#include "util.h"
34
#include "interrupt.h"
34
#include "interrupt.h"
-
 
35
#include "clockgates.h"
35
 
36
 
36
 
37
 
37
struct ep_type
38
struct ep_type
38
{
39
{
39
    bool active;
40
    bool active;
Line 355... Line 356...
355
    unsigned int i;
356
    unsigned int i;
356
    for (i = 0; i < sizeof(endpoints)/sizeof(struct ep_type); i++)
357
    for (i = 0; i < sizeof(endpoints)/sizeof(struct ep_type); i++)
357
        wakeup_init(&endpoints[i].complete);
358
        wakeup_init(&endpoints[i].complete);
358
 
359
 
359
    /* Enable USB clock */
360
    /* Enable USB clock */
360
    PWRCON &= ~0x4000;
361
    clockgate_enable(CLOCKGATE_USB_1, true);
361
    PWRCONEXT &= ~0x800;
362
    clockgate_enable(CLOCKGATE_USB_2, true);
362
    PCGCCTL = 0;
363
    PCGCCTL = 0;
363
 
364
 
364
    /* unmask irq */
365
    /* unmask irq */
365
    interrupt_enable(IRQ_USB_FUNC, true);
366
    interrupt_enable(IRQ_USB_FUNC, true);
366
 
367