void c67x00_ll_husb_init_host_port(struct c67x00_sie *sie) { /* Set port into host mode */ hpi_set_bits(sie->dev, USB_CTL_REG(sie->sie_num), HOST_MODE); c67x00_ll_husb_sie_init(sie); /* Clear interrupts */ c67x00_ll_usb_clear_status(sie, HOST_STAT_MASK); /* Check */ if (!(hpi_read_word(sie->dev, USB_CTL_REG(sie->sie_num)) & HOST_MODE)) dev_warn(sie_dev(sie), "SIE %d not set to host mode\n", sie->sie_num); }
void c67x00_ll_husb_reset_port(struct c67x00_sie *sie, int port) { /* Clear connect change */ c67x00_ll_usb_clear_status(sie, PORT_CONNECT_CHANGE(port)); /* Enable interrupts */ hpi_set_bits(sie->dev, HPI_IRQ_ROUTING_REG, SOFEOP_TO_CPU_EN(sie->sie_num)); hpi_set_bits(sie->dev, HOST_IRQ_EN_REG(sie->sie_num), SOF_EOP_IRQ_EN | DONE_IRQ_EN); /* Enable pull down transistors */ hpi_set_bits(sie->dev, USB_CTL_REG(sie->sie_num), PORT_RES_EN(port)); }
void c67x00_ll_husb_reset_port(struct c67x00_sie *sie, int port) { c67x00_ll_usb_clear_status(sie, PORT_CONNECT_CHANGE(port)); hpi_set_bits(sie->dev, HPI_IRQ_ROUTING_REG, SOFEOP_TO_CPU_EN(sie->sie_num)); hpi_set_bits(sie->dev, HOST_IRQ_EN_REG(sie->sie_num), SOF_EOP_IRQ_EN | DONE_IRQ_EN); hpi_set_bits(sie->dev, USB_CTL_REG(sie->sie_num), PORT_RES_EN(port)); }
u16 c67x00_ll_get_usb_ctl(struct c67x00_sie *sie) { return hpi_read_word(sie->dev, USB_CTL_REG(sie->sie_num)); }