x86/mm/pat: Don't report PAT on CPUs that don't support it
[linux/fpc-iii.git] / arch / tile / kernel / usb.c
blob9f1e05e12255b84d94d59f67ecbc7cc9330d889a
1 /*
2 * Copyright 2012 Tilera Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation, version 2.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
11 * NON INFRINGEMENT. See the GNU General Public License for
12 * more details.
14 * Register the Tile-Gx USB interfaces as platform devices.
16 * The actual USB driver is just some glue (in
17 * drivers/usb/host/[eo]hci-tilegx.c) which makes the registers available
18 * to the standard kernel EHCI and OHCI drivers.
21 #include <linux/dma-mapping.h>
22 #include <linux/platform_device.h>
23 #include <linux/usb/tilegx.h>
24 #include <linux/init.h>
25 #include <linux/module.h>
26 #include <linux/types.h>
28 static u64 ehci_dmamask = DMA_BIT_MASK(32);
30 #define USB_HOST_DEF(unit, type, dmamask) \
31 static struct \
32 tilegx_usb_platform_data tilegx_usb_platform_data_ ## type ## \
33 hci ## unit = { \
34 .dev_index = unit, \
35 }; \
37 static struct platform_device tilegx_usb_ ## type ## hci ## unit = { \
38 .name = "tilegx-" #type "hci", \
39 .id = unit, \
40 .dev = { \
41 .dma_mask = dmamask, \
42 .coherent_dma_mask = DMA_BIT_MASK(32), \
43 .platform_data = \
44 &tilegx_usb_platform_data_ ## type ## hci ## \
45 unit, \
46 }, \
49 USB_HOST_DEF(0, e, &ehci_dmamask)
50 USB_HOST_DEF(0, o, NULL)
51 USB_HOST_DEF(1, e, &ehci_dmamask)
52 USB_HOST_DEF(1, o, NULL)
54 #undef USB_HOST_DEF
56 static struct platform_device *tilegx_usb_devices[] __initdata = {
57 &tilegx_usb_ehci0,
58 &tilegx_usb_ehci1,
59 &tilegx_usb_ohci0,
60 &tilegx_usb_ohci1,
63 /** Add our set of possible USB devices. */
64 static int __init tilegx_usb_init(void)
66 platform_add_devices(tilegx_usb_devices,
67 ARRAY_SIZE(tilegx_usb_devices));
69 return 0;
71 arch_initcall(tilegx_usb_init);