disable sstrip when using musl
[lede.git] / target / linux / ubicom32 / files / arch / ubicom32 / mach-ip5k / board-ip5160rgw.c
1 /*
2  * arch/ubicom32/mach-ip5k/board-ip5160rgw.c
3  *   Platform initialization for ip5160rgw board.
4  *
5  * (C) Copyright 2009, Ubicom, Inc.
6  *
7  * This file is part of the Ubicom32 Linux Kernel Port.
8  *
9  * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10  * it and/or modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation, either version 2 of the
12  * License, or (at your option) any later version.
13  *
14  * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15  * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
17  * the GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with the Ubicom32 Linux Kernel Port.  If not,
21  * see <http://www.gnu.org/licenses/>.
22  *
23  * Ubicom32 implementation derived from (with many thanks):
24  *   arch/m68knommu
25  *   arch/blackfin
26  *   arch/parisc
27  */
28 #include <linux/device.h>
29 #include <linux/platform_device.h>
30 #include <linux/gpio.h>
31 #include <asm/board.h>
32 #include <asm/machdep.h>
33
34 /*
35  * Factory Default Button on the board at PXn
36  * TODO: This is just a placeholder and it needs to include proper header files
37  */
38 struct ubicom32fdb_platform_data {
39         int             fdb_gpio;
40         bool            fdb_polarity;
41 };
42
43 static struct ubicom32fdb_platform_data ip5160rgw_fdb_data = {
44         .fdb_gpio               = 0,
45         .fdb_polarity           = true,
46 };
47
48 static struct platform_device ip5160rgw_fdb_device = {
49         .name   = "ubicom32fdb",
50         .id     = -1,
51         .dev    = {
52                 .platform_data = &ip5160rgw_fdb_data,
53         },
54 };
55
56 /*
57  * List of all devices in our system
58  */
59 static struct platform_device *ip5160rgw_devices[] __initdata = {
60         &ip5160rgw_fdb_device,
61 };
62
63 /*
64  * ip5160rgw_init
65  *      Called to add the devices which we have on this board
66  */
67 static int __init ip5160rgw_init(void)
68 {
69         ubi_gpio_init();
70         printk(KERN_INFO "%s: registering device resources\n", __FUNCTION__);
71         platform_add_devices(ip5160rgw_devices, ARRAY_SIZE(ip5160rgw_devices));
72         return 0;
73 }
74
75 arch_initcall(ip5160rgw_init);