1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-mv78x00/rd78x00-masa-setup.c
5 * Marvell RD-78x00-mASA Development Board Setup
8 #include <linux/kernel.h>
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/ata_platform.h>
12 #include <linux/mv643xx_eth.h>
13 #include <linux/ethtool.h>
14 #include <asm/mach-types.h>
15 #include <asm/mach/arch.h>
19 static struct mv643xx_eth_platform_data rd78x00_masa_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
23 static struct mv643xx_eth_platform_data rd78x00_masa_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(9),
27 static struct mv643xx_eth_platform_data rd78x00_masa_ge10_data = {
30 static struct mv643xx_eth_platform_data rd78x00_masa_ge11_data = {
33 static struct mv_sata_platform_data rd78x00_masa_sata_data = {
37 static void __init rd78x00_masa_init(void)
40 * Basic MV78x00 setup. Needs to be called early.
45 * Partition on-chip peripherals between the two CPU cores.
47 if (mv78xx0_core_index() == 0) {
50 mv78xx0_ge00_init(&rd78x00_masa_ge00_data);
51 mv78xx0_ge10_init(&rd78x00_masa_ge10_data);
52 mv78xx0_sata_init(&rd78x00_masa_sata_data);
57 mv78xx0_ge01_init(&rd78x00_masa_ge01_data);
58 mv78xx0_ge11_init(&rd78x00_masa_ge11_data);
64 static int __init rd78x00_pci_init(void)
67 * Assign all PCIe devices to CPU core #0.
69 if (machine_is_rd78x00_masa() && mv78xx0_core_index() == 0)
70 mv78xx0_pcie_init(1, 1);
74 subsys_initcall(rd78x00_pci_init);
76 MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
77 /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
79 .nr_irqs = MV78XX0_NR_IRQS,
80 .init_machine = rd78x00_masa_init,
81 .map_io = mv78xx0_map_io,
82 .init_early = mv78xx0_init_early,
83 .init_irq = mv78xx0_init_irq,
84 .init_time = mv78xx0_timer_init,
85 .restart = mv78xx0_restart,