1 // SPDX-License-Identifier: GPL-2.0-only
3 * arch/arm/mach-dove/cm-a510.c
5 * Copyright (C) 2010 CompuLab, Ltd.
6 * Konstantin Sinyuk <kostyas@compulab.co.il>
8 * Based on Marvell DB-MV88AP510-BP Development Board Setup
11 #include <linux/kernel.h>
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/ata_platform.h>
15 #include <linux/mv643xx_eth.h>
16 #include <linux/spi/spi.h>
17 #include <linux/spi/flash.h>
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
25 static struct mv643xx_eth_platform_data cm_a510_ge00_data
= {
26 .phy_addr
= MV643XX_ETH_PHY_ADDR_DEFAULT
,
29 static struct mv_sata_platform_data cm_a510_sata_data
= {
35 * SPI0: 1M Flash Winbond w25q32bv
37 static const struct flash_platform_data cm_a510_spi_flash_data
= {
41 static struct spi_board_info __initdata cm_a510_spi_flash_info
[] = {
44 .platform_data
= &cm_a510_spi_flash_data
,
46 .max_speed_hz
= 20000000,
52 static int __init
cm_a510_pci_init(void)
54 if (machine_is_cm_a510())
60 subsys_initcall(cm_a510_pci_init
);
63 static void __init
cm_a510_init(void)
66 * Basic Dove setup. Needs to be called early.
70 dove_ge00_init(&cm_a510_ge00_data
);
73 dove_sata_init(&cm_a510_sata_data
);
81 spi_register_board_info(cm_a510_spi_flash_info
,
82 ARRAY_SIZE(cm_a510_spi_flash_info
));
85 MACHINE_START(CM_A510
, "Compulab CM-A510 Board")
87 .nr_irqs
= DOVE_NR_IRQS
,
88 .init_machine
= cm_a510_init
,
89 .map_io
= dove_map_io
,
90 .init_early
= dove_init_early
,
91 .init_irq
= dove_init_irq
,
92 .init_time
= dove_timer_init
,
93 .restart
= dove_restart
,