Patch: USB Host update for MPC8220
USB Host update for MPC8220 using generic USB OHCI driver
Regards,
TsiChung
Signed-off by TsiChung Liew<[email protected]>
drivers/usb_ohci.c +3 -2
@@ -66,7 +66,8 @@defined (CONFIG_S3C2400 ) || \defined (CONFIG_S3C2410 ) || \defined (CONFIG_440EP ) || \ - defined(CONFIG_MPC5200) +defined (CONFIG_MPC5200 ) || \ + defined(CONFIG_MPC8220)# define OHCI_USE_NPS /* force NoPowerSwitching mode */ #endif
@@ -98,7 +99,7 @@ #define info(format, arg...) do {} while(0)#endif -#if defined(CONFIG_440EP ) || defined(CONFIG_MPC5200 ) +#if defined(CONFIG_440EP) || defined(CONFIG_MPC5200) || defined
(CONFIG_MPC8220)
# define m16_swap(x) (x)
# define m32_swap(x) (x)
#else
@@ -832,7 +833,7 @@ static td_t * dl_reverse_done_list (ohci
} else
td_list->ed->hwHeadP &= m32_swap (0xfffffff2);
}
-#ifdef CONFIG_MPC5200
+#if defined(CONFIG_MPC5200) || defined(CONFIG_MPC8220)
td_list->hwNextTD = 0;
#endif
}
@@ -882,13 +883,14 @@ static int dl_done_list (ohci_t *ohci, t
(lurb_priv->state != URB_DEL))
#else
if ((ed->state & (ED_OPER | ED_UNLINK)))
+#endif
urb_finished = 1;
else
dbg("dl_done_list: strange.., ED state %x, ed->state\n");
} else
dbg("dl_done_list: processing TD %x, len %x\n", lurb_priv->td_cnt,
lurb_priv->length);
-#endif
+
if (ed->state != ED_NEW) {
edHeadP = m32_swap (ed->hwHeadP) & 0xfffffff0;
edTailP = m32_swap (ed->hwTailP);
@@ -1074,7 +1076,7 @@ pkt_print(dev, pipe, buffer, transfer_le
} bmRType_bReq = cmd->requesttype | (cmd->request << 8);
-#if defined(CONFIG_440EP) || defined(CONFIG_MPC5200) +#if defined(CONFIG_440EP) || defined(CONFIG_MPC5200) || defined
(CONFIG_MPC8220)
wValue = __swap_16(cmd->value);
wIndex = __swap_16(cmd->index);
wLength = __swap_16(cmd->length);
@@ -1082,7 +1084,7 @@ pkt_print(dev, pipe, buffer, transfer_le
wValue = m16_swap (cmd->value);
wIndex = m16_swap (cmd->index);
wLength = m16_swap (cmd->length);
-#endif /* CONFIG_440EP || CONFIG_MPC5200 */ +#endif /* CONFIG_440EP || CONFIG_MPC5200 || CONFIG_MPC8220 */
info("Root-Hub: adr: %2x cmd(%1x): %08x %04x %04x %04x",
dev->devnum, 8, bmRType_bReq, wValue, wIndex, wLength);
@@ -1096,7 +1098,7 @@ pkt_print(dev, pipe, buffer, transfer_le
RH_OTHER | RH_CLASS almost ever means HUB_PORT here
*/
-#if defined(CONFIG_440EP) || defined(CONFIG_MPC5200) +#if defined(CONFIG_440EP) || defined(CONFIG_MPC5200) || defined
(CONFIG_MPC8220)
case RH_GET_STATUS:
*(__u16 *) data_buf = __swap_16(1); OK (2);
case RH_GET_STATUS | RH_INTERFACE:
@@ -1122,7 +1124,7 @@ pkt_print(dev, pipe, buffer, transfer_le
OK (4);
case RH_GET_STATUS | RH_OTHER | RH_CLASS:
*(__u32 *) data_buf = m32_swap (RD_RH_PORTSTAT); OK (4);
-#endif /* CONFIG_440EP || CONFIG_MPC5200 */ +#endif /* CONFIG_440EP || CONFIG_MPC5200 || CONFIG_MPC8220 */
case RH_CLEAR_FEATURE | RH_ENDPOINT:
switch (wValue) {
drivers/usb_ohci.h +1 -1
@@ -10,7 +10,7 @@/* functions for doing board or CPU specific setup/cleanup */ extern int usb_board_init (void );extern int usb_board_stop (void ); -extern int usb_cpu_init_fail (void ); +extern int usb_board_init_fail (void );extern int usb_cpu_init (void );extern int usb_cpu_stop (void );