Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
board-dreamplug.c
Go to the documentation of this file.
1 /*
2  * Copyright 2012 (C), Jason Cooper <[email protected]>
3  *
4  * arch/arm/mach-kirkwood/board-dreamplug.c
5  *
6  * Marvell DreamPlug Reference Board Init for drivers not converted to
7  * flattened device tree yet.
8  *
9  * This file is licensed under the terms of the GNU General Public
10  * License version 2. This program is licensed "as is" without any
11  * warranty of any kind, whether express or implied.
12  */
13 
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/platform_device.h>
17 #include <linux/ata_platform.h>
18 #include <linux/mv643xx_eth.h>
19 #include <linux/of.h>
20 #include <linux/of_address.h>
21 #include <linux/of_fdt.h>
22 #include <linux/of_irq.h>
23 #include <linux/of_platform.h>
24 #include <linux/gpio.h>
25 #include <linux/mtd/physmap.h>
26 #include <linux/spi/flash.h>
27 #include <linux/spi/spi.h>
28 #include <asm/mach-types.h>
29 #include <asm/mach/arch.h>
30 #include <asm/mach/map.h>
31 #include <mach/kirkwood.h>
32 #include <mach/bridge-regs.h>
34 #include "common.h"
35 #include "mpp.h"
36 
37 static struct mv643xx_eth_platform_data dreamplug_ge00_data = {
38  .phy_addr = MV643XX_ETH_PHY_ADDR(0),
39 };
40 
41 static struct mv643xx_eth_platform_data dreamplug_ge01_data = {
42  .phy_addr = MV643XX_ETH_PHY_ADDR(1),
43 };
44 
45 static struct mvsdio_platform_data dreamplug_mvsdio_data = {
46  /* unfortunately the CD signal has not been connected */
47 };
48 
49 static unsigned int dreamplug_mpp_config[] __initdata = {
54  MPP47_GPIO, /* Bluetooth LED */
55  MPP48_GPIO, /* Wifi LED */
56  MPP49_GPIO, /* Wifi AP LED */
57  0
58 };
59 
61 {
62  /*
63  * Basic setup. Needs to be called early.
64  */
65  kirkwood_mpp_conf(dreamplug_mpp_config);
66 
68  kirkwood_ge00_init(&dreamplug_ge00_data);
69  kirkwood_ge01_init(&dreamplug_ge01_data);
70  kirkwood_sdio_init(&dreamplug_mvsdio_data);
71 }