<sys/socket.h>: turn off MSG_NOSIGNAL
[minix3.git] / drivers / usbd / base / earm / usbd_earm.c
blob79d8df3fe4397034338325bd49f00f67398617e5
1 /*
2 * EARM USBD setup
3 */
5 #include <minix/board.h>
6 #include <minix/syslib.h>
8 #include <usb/hcd_platforms.h>
9 #include <usb/usb_common.h>
10 #include <usb/usbd_interface.h>
13 /*===========================================================================*
14 * usbd_init_hcd *
15 *===========================================================================*/
16 int
17 usbd_init_hcd(void)
19 /* More specific platform type than just EARM */
20 static struct machine platform;
22 DEBUG_DUMP;
24 if (sys_getmachine(&platform)) {
25 USB_MSG("Getting machine type, failed");
26 return EXIT_FAILURE;
29 if (BOARD_IS_BB(platform.board_id)) {
30 USB_MSG("Using AM335x driver");
31 return musb_am335x_init();
32 } else {
33 USB_MSG("Only AM335x driver available");
34 return EXIT_FAILURE;
39 /*===========================================================================*
40 * usbd_deinit_hcd *
41 *===========================================================================*/
42 void
43 usbd_deinit_hcd(void)
45 /* More specific platform type than just EARM */
46 static struct machine platform;
48 DEBUG_DUMP;
50 if (sys_getmachine(&platform)) {
51 USB_MSG("Getting machine type, failed");
52 return;
55 if (BOARD_IS_BB(platform.board_id))
56 musb_am335x_deinit();
57 else
58 USB_MSG("Only AM335x driver available");