Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net> |
| 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> |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 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> |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 25 | #include <linux/mtd/physmap.h> |
| 26 | #include <linux/spi/flash.h> |
| 27 | #include <linux/spi/spi.h> |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 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> |
| 33 | #include <plat/mvsdio.h> |
| 34 | #include "common.h" |
| 35 | #include "mpp.h" |
| 36 | |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 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 | |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 45 | static struct mvsdio_platform_data dreamplug_mvsdio_data = { |
| 46 | /* unfortunately the CD signal has not been connected */ |
| 47 | }; |
| 48 | |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 49 | static unsigned int dreamplug_mpp_config[] __initdata = { |
| 50 | MPP0_SPI_SCn, |
| 51 | MPP1_SPI_MOSI, |
| 52 | MPP2_SPI_SCK, |
| 53 | MPP3_SPI_MISO, |
| 54 | MPP47_GPIO, /* Bluetooth LED */ |
| 55 | MPP48_GPIO, /* Wifi LED */ |
| 56 | MPP49_GPIO, /* Wifi AP LED */ |
| 57 | 0 |
| 58 | }; |
| 59 | |
| 60 | void __init dreamplug_init(void) |
| 61 | { |
| 62 | /* |
| 63 | * Basic setup. Needs to be called early. |
| 64 | */ |
| 65 | kirkwood_mpp_conf(dreamplug_mpp_config); |
| 66 | |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 67 | kirkwood_ehci_init(); |
| 68 | kirkwood_ge00_init(&dreamplug_ge00_data); |
| 69 | kirkwood_ge01_init(&dreamplug_ge01_data); |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 70 | kirkwood_sdio_init(&dreamplug_mvsdio_data); |
Jason Cooper | 6fa6b87 | 2012-03-15 00:52:31 +0000 | [diff] [blame] | 71 | } |