/*
 *              Copyright (C) 2005, BroadOn Communications Corp.
 *
 * These coded instructions, statements, and computer programs contain
 * unpublished  proprietary information of BroadOn Communications Corp.,
 * and  are protected by Federal copyright law. They may not be disclosed
 * to  third  parties or copied or duplicated in any form, in whole or in
 * part, without the prior written consent of BroadOn Communications Corp.
 *
 */

#ifndef __NC_USB_HW_H_
#define __NC_USB_HW_H_

#define USB_CTRL_INFO_MASK   (USB_CTRL_ENA | USB_CTRL_MASK | \
                              USB_CTRL_CFG_DONE | USB_CTRL_PULLUP | \
                              USB_CTRL_PLL_PD | USB_CTRL_PLL_BP | \
                              USB_CTRL_BUF_PTR_MASK)


#define SETUP_PTR(r, a)      IO_WRITE(r##_REG, \
        r##_WE | r##_VALID | r##_VIOL | r##_ZERO | r##_SETUP | \
        CPU_TO_BUS_ADDR((a)))

int usbHwRestart(int noPullup);
int usbHwRead(int ep, u8 *buf, int len);
int usbHwWrite(int ep, u8 *buf, int len);
int usbHwUnplug();
void usbHwTurnonPullup(); 

#endif

