mac80211: add missing locking in ieee80211_reconfig
[pandora-kernel.git] / arch / arm / mach-mxs / devices / platform-duart.c
1 /*
2  * Copyright (C) 2009-2010 Pengutronix
3  * Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
4  *
5  * Copyright 2010 Freescale Semiconductor, Inc. All Rights Reserved.
6  *
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License version 2 as published by the
9  * Free Software Foundation.
10  */
11 #include <mach/mx23.h>
12 #include <mach/mx28.h>
13 #include <mach/devices-common.h>
14
15 #define mxs_duart_data_entry(soc)                                       \
16         {                                                               \
17                 .iobase = soc ## _DUART_BASE_ADDR,                      \
18                 .irq = soc ## _INT_DUART,                               \
19         }
20
21 #ifdef CONFIG_SOC_IMX23
22 const struct mxs_duart_data mx23_duart_data __initconst =
23         mxs_duart_data_entry(MX23);
24 #endif
25
26 #ifdef CONFIG_SOC_IMX28
27 const struct mxs_duart_data mx28_duart_data __initconst =
28         mxs_duart_data_entry(MX28);
29 #endif
30
31 struct platform_device *__init mxs_add_duart(
32                 const struct mxs_duart_data *data)
33 {
34         struct resource res[] = {
35                 {
36                         .start = data->iobase,
37                         .end = data->iobase + SZ_8K - 1,
38                         .flags = IORESOURCE_MEM,
39                 }, {
40                         .start = data->irq,
41                         .end = data->irq,
42                         .flags = IORESOURCE_IRQ,
43                 },
44         };
45
46         return mxs_add_platform_device("mxs-duart", 0, res, ARRAY_SIZE(res),
47                                         NULL, 0);
48 }