Linux Audio

Check our new training course

Loading...
v6.13.7
 1// SPDX-License-Identifier: GPL-2.0-only
 2/*
 3 * arch/arm/mach-dove/cm-a510.c
 4 *
 5 * Copyright (C) 2010 CompuLab, Ltd.
 6 * Konstantin Sinyuk <kostyas@compulab.co.il>
 7 *
 8 * Based on Marvell DB-MV88AP510-BP Development Board Setup
 
 
 
 
 9 */
10
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>
18
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21
22#include "dove.h"
23#include "common.h"
24
25static struct mv643xx_eth_platform_data cm_a510_ge00_data = {
26	.phy_addr	= MV643XX_ETH_PHY_ADDR_DEFAULT,
27};
28
29static struct mv_sata_platform_data cm_a510_sata_data = {
30	.n_ports        = 1,
31};
32
33/*
34 * SPI Devices:
35 * SPI0: 1M Flash Winbond w25q32bv
36 */
37static const struct flash_platform_data cm_a510_spi_flash_data = {
38	.type		= "w25q32bv",
39};
40
41static struct spi_board_info __initdata cm_a510_spi_flash_info[] = {
42	{
43		.modalias       = "m25p80",
44		.platform_data  = &cm_a510_spi_flash_data,
45		.irq            = -1,
46		.max_speed_hz   = 20000000,
47		.bus_num        = 0,
48		.chip_select    = 0,
49	},
50};
51
52static int __init cm_a510_pci_init(void)
53{
54	if (machine_is_cm_a510())
55		dove_pcie_init(1, 1);
56
57	return 0;
58}
59
60subsys_initcall(cm_a510_pci_init);
61
62/* Board Init */
63static void __init cm_a510_init(void)
64{
65	/*
66	 * Basic Dove setup. Needs to be called early.
67	 */
68	dove_init();
69
70	dove_ge00_init(&cm_a510_ge00_data);
71	dove_ehci0_init();
72	dove_ehci1_init();
73	dove_sata_init(&cm_a510_sata_data);
74	dove_sdio0_init();
75	dove_sdio1_init();
76	dove_spi0_init();
77	dove_spi1_init();
78	dove_uart0_init();
79	dove_uart1_init();
80	dove_i2c_init();
81	spi_register_board_info(cm_a510_spi_flash_info,
82				ARRAY_SIZE(cm_a510_spi_flash_info));
83}
84
85MACHINE_START(CM_A510, "Compulab CM-A510 Board")
86	.atag_offset	= 0x100,
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,
94MACHINE_END
v5.14.15
 
 1/*
 2 * arch/arm/mach-dove/cm-a510.c
 3 *
 4 * Copyright (C) 2010 CompuLab, Ltd.
 5 * Konstantin Sinyuk <kostyas@compulab.co.il>
 6 *
 7 * Based on Marvell DB-MV88AP510-BP Development Board Setup
 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/ata_platform.h>
18#include <linux/mv643xx_eth.h>
19#include <linux/spi/spi.h>
20#include <linux/spi/flash.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24
25#include "dove.h"
26#include "common.h"
27
28static struct mv643xx_eth_platform_data cm_a510_ge00_data = {
29	.phy_addr	= MV643XX_ETH_PHY_ADDR_DEFAULT,
30};
31
32static struct mv_sata_platform_data cm_a510_sata_data = {
33	.n_ports        = 1,
34};
35
36/*
37 * SPI Devices:
38 * SPI0: 1M Flash Winbond w25q32bv
39 */
40static const struct flash_platform_data cm_a510_spi_flash_data = {
41	.type		= "w25q32bv",
42};
43
44static struct spi_board_info __initdata cm_a510_spi_flash_info[] = {
45	{
46		.modalias       = "m25p80",
47		.platform_data  = &cm_a510_spi_flash_data,
48		.irq            = -1,
49		.max_speed_hz   = 20000000,
50		.bus_num        = 0,
51		.chip_select    = 0,
52	},
53};
54
55static int __init cm_a510_pci_init(void)
56{
57	if (machine_is_cm_a510())
58		dove_pcie_init(1, 1);
59
60	return 0;
61}
62
63subsys_initcall(cm_a510_pci_init);
64
65/* Board Init */
66static void __init cm_a510_init(void)
67{
68	/*
69	 * Basic Dove setup. Needs to be called early.
70	 */
71	dove_init();
72
73	dove_ge00_init(&cm_a510_ge00_data);
74	dove_ehci0_init();
75	dove_ehci1_init();
76	dove_sata_init(&cm_a510_sata_data);
77	dove_sdio0_init();
78	dove_sdio1_init();
79	dove_spi0_init();
80	dove_spi1_init();
81	dove_uart0_init();
82	dove_uart1_init();
83	dove_i2c_init();
84	spi_register_board_info(cm_a510_spi_flash_info,
85				ARRAY_SIZE(cm_a510_spi_flash_info));
86}
87
88MACHINE_START(CM_A510, "Compulab CM-A510 Board")
89	.atag_offset	= 0x100,
90	.nr_irqs	= DOVE_NR_IRQS,
91	.init_machine	= cm_a510_init,
92	.map_io		= dove_map_io,
93	.init_early	= dove_init_early,
94	.init_irq	= dove_init_irq,
95	.init_time	= dove_timer_init,
96	.restart	= dove_restart,
97MACHINE_END