Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> |
| 3 | * |
| 4 | * arch/arm/mach-kirkwood/board-ns2.c |
| 5 | * |
| 6 | * LaCie Network Space v2 board (and parents) initialization for drivers |
| 7 | * not converted to 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/mv643xx_eth.h> |
Simon Guinot | ca7d945 | 2012-10-17 12:09:05 +0200 | [diff] [blame] | 18 | #include <linux/of.h> |
Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 19 | #include "common.h" |
Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 20 | |
| 21 | static struct mv643xx_eth_platform_data ns2_ge00_data = { |
| 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), |
| 23 | }; |
| 24 | |
Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 25 | void __init ns2_init(void) |
| 26 | { |
| 27 | /* |
| 28 | * Basic setup. Needs to be called early. |
| 29 | */ |
Simon Guinot | 98d4f2a | 2013-04-09 00:41:28 +0200 | [diff] [blame] | 30 | if (of_machine_is_compatible("lacie,cloudbox") || |
| 31 | of_machine_is_compatible("lacie,netspace_lite_v2") || |
Simon Guinot | 7f9871d | 2012-10-17 12:09:06 +0200 | [diff] [blame] | 32 | of_machine_is_compatible("lacie,netspace_mini_v2")) |
Simon Guinot | ca7d945 | 2012-10-17 12:09:05 +0200 | [diff] [blame] | 33 | ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); |
Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 34 | kirkwood_ge00_init(&ns2_ge00_data); |
Simon Guinot | ecee1e4 | 2012-10-17 12:09:04 +0200 | [diff] [blame] | 35 | } |