1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
5 * Marvell DB-78x00-BP 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 <linux/i2c.h>
15 #include <asm/mach-types.h>
16 #include <asm/mach/arch.h>
20 static struct mv643xx_eth_platform_data db78x00_ge00_data = {
21 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
24 static struct mv643xx_eth_platform_data db78x00_ge01_data = {
25 .phy_addr = MV643XX_ETH_PHY_ADDR(9),
28 static struct mv643xx_eth_platform_data db78x00_ge10_data = {
29 .phy_addr = MV643XX_ETH_PHY_ADDR(10),
32 static struct mv643xx_eth_platform_data db78x00_ge11_data = {
33 .phy_addr = MV643XX_ETH_PHY_ADDR(11),
36 static struct mv_sata_platform_data db78x00_sata_data = {
40 static struct i2c_board_info __initdata db78x00_i2c_rtc = {
41 I2C_BOARD_INFO("ds1338", 0x68),
45 static void __init db78x00_init(void)
48 * Basic MV78xx0 setup. Needs to be called early.
53 * Partition on-chip peripherals between the two CPU cores.
55 if (mv78xx0_core_index() == 0) {
59 mv78xx0_ge00_init(&db78x00_ge00_data);
60 mv78xx0_ge01_init(&db78x00_ge01_data);
61 mv78xx0_ge10_init(&db78x00_ge10_data);
62 mv78xx0_ge11_init(&db78x00_ge11_data);
63 mv78xx0_sata_init(&db78x00_sata_data);
67 i2c_register_board_info(0, &db78x00_i2c_rtc, 1);
74 static int __init db78x00_pci_init(void)
76 if (machine_is_db78x00_bp()) {
78 * Assign the x16 PCIe slot on the board to CPU core
79 * #0, and let CPU core #1 have the four x1 slots.
81 if (mv78xx0_core_index() == 0)
82 mv78xx0_pcie_init(0, 1);
84 mv78xx0_pcie_init(1, 0);
89 subsys_initcall(db78x00_pci_init);
91 MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
92 /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
94 .nr_irqs = MV78XX0_NR_IRQS,
95 .init_machine = db78x00_init,
96 .map_io = mv78xx0_map_io,
97 .init_early = mv78xx0_init_early,
98 .init_irq = mv78xx0_init_irq,
99 .init_time = mv78xx0_timer_init,
100 .restart = mv78xx0_restart,