Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-kirkwood/board-iconnect.c |
| 3 | * |
| 4 | * Iomega i-connect Board Setup |
| 5 | * |
| 6 | * This file is licensed under the terms of the GNU General Public |
| 7 | * License version 2. This program is licensed "as is" without any |
| 8 | * warranty of any kind, whether express or implied. |
| 9 | */ |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/init.h> |
| 13 | #include <linux/platform_device.h> |
| 14 | #include <linux/of.h> |
| 15 | #include <linux/of_address.h> |
| 16 | #include <linux/of_fdt.h> |
| 17 | #include <linux/of_irq.h> |
| 18 | #include <linux/of_platform.h> |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 19 | #include <linux/mv643xx_eth.h> |
| 20 | #include <linux/gpio.h> |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 21 | #include <asm/mach/arch.h> |
| 22 | #include <mach/kirkwood.h> |
| 23 | #include "common.h" |
| 24 | #include "mpp.h" |
| 25 | |
| 26 | static struct mv643xx_eth_platform_data iconnect_ge00_data = { |
| 27 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), |
| 28 | }; |
| 29 | |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 30 | static unsigned int iconnect_mpp_config[] __initdata = { |
| 31 | MPP12_GPIO, |
| 32 | MPP35_GPIO, |
| 33 | MPP41_GPIO, |
| 34 | MPP42_GPIO, |
| 35 | MPP43_GPIO, |
| 36 | MPP44_GPIO, |
| 37 | MPP45_GPIO, |
| 38 | MPP46_GPIO, |
| 39 | MPP47_GPIO, |
| 40 | MPP48_GPIO, |
| 41 | 0 |
| 42 | }; |
| 43 | |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 44 | void __init iconnect_init(void) |
| 45 | { |
| 46 | kirkwood_mpp_conf(iconnect_mpp_config); |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 47 | |
| 48 | kirkwood_ehci_init(); |
| 49 | kirkwood_ge00_init(&iconnect_ge00_data); |
Arnaud Patard (Rtp) | c06cd9b | 2012-04-18 23:16:41 +0200 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | static int __init iconnect_pci_init(void) |
| 53 | { |
| 54 | if (of_machine_is_compatible("iom,iconnect")) |
| 55 | kirkwood_pcie_init(KW_PCIE0); |
| 56 | return 0; |
| 57 | } |
| 58 | subsys_initcall(iconnect_pci_init); |