diff options
-rw-r--r-- | arch/arm/mach-dove/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-dove/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-dove/cm-a510.c | 95 |
3 files changed, 102 insertions, 0 deletions
diff --git a/arch/arm/mach-dove/Kconfig b/arch/arm/mach-dove/Kconfig index 3b9a32ace909..a4ed3900912a 100644 --- a/arch/arm/mach-dove/Kconfig +++ b/arch/arm/mach-dove/Kconfig | |||
@@ -9,6 +9,12 @@ config MACH_DOVE_DB | |||
9 | Say 'Y' here if you want your kernel to support the | 9 | Say 'Y' here if you want your kernel to support the |
10 | Marvell DB-MV88AP510 Development Board. | 10 | Marvell DB-MV88AP510 Development Board. |
11 | 11 | ||
12 | config MACH_CM_A510 | ||
13 | bool "CompuLab CM-A510 Board" | ||
14 | help | ||
15 | Say 'Y' here if you want your kernel to support the | ||
16 | CompuLab CM-A510 Board. | ||
17 | |||
12 | endmenu | 18 | endmenu |
13 | 19 | ||
14 | endif | 20 | endif |
diff --git a/arch/arm/mach-dove/Makefile b/arch/arm/mach-dove/Makefile index 7ab3be53f642..f74f5495425e 100644 --- a/arch/arm/mach-dove/Makefile +++ b/arch/arm/mach-dove/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | obj-y += common.o addr-map.o irq.o pcie.o | 1 | obj-y += common.o addr-map.o irq.o pcie.o |
2 | 2 | ||
3 | obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o | 3 | obj-$(CONFIG_MACH_DOVE_DB) += dove-db-setup.o |
4 | obj-$(CONFIG_MACH_CM_A510) += cm-a510.o | ||
diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c new file mode 100644 index 000000000000..96e0e94e5fa9 --- /dev/null +++ b/arch/arm/mach-dove/cm-a510.c | |||
@@ -0,0 +1,95 @@ | |||
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 <mach/dove.h> | ||
26 | |||
27 | #include "common.h" | ||
28 | |||
29 | static struct mv643xx_eth_platform_data cm_a510_ge00_data = { | ||
30 | .phy_addr = MV643XX_ETH_PHY_ADDR_DEFAULT, | ||
31 | }; | ||
32 | |||
33 | static struct mv_sata_platform_data cm_a510_sata_data = { | ||
34 | .n_ports = 1, | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * SPI Devices: | ||
39 | * SPI0: 1M Flash Winbond w25q32bv | ||
40 | */ | ||
41 | static const struct flash_platform_data cm_a510_spi_flash_data = { | ||
42 | .type = "w25q32bv", | ||
43 | }; | ||
44 | |||
45 | static struct spi_board_info __initdata cm_a510_spi_flash_info[] = { | ||
46 | { | ||
47 | .modalias = "m25p80", | ||
48 | .platform_data = &cm_a510_spi_flash_data, | ||
49 | .irq = -1, | ||
50 | .max_speed_hz = 20000000, | ||
51 | .bus_num = 0, | ||
52 | .chip_select = 0, | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | static int __init cm_a510_pci_init(void) | ||
57 | { | ||
58 | if (machine_is_cm_a510()) | ||
59 | dove_pcie_init(1, 1); | ||
60 | |||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | subsys_initcall(cm_a510_pci_init); | ||
65 | |||
66 | /* Board Init */ | ||
67 | static void __init cm_a510_init(void) | ||
68 | { | ||
69 | /* | ||
70 | * Basic Dove setup. Needs to be called early. | ||
71 | */ | ||
72 | dove_init(); | ||
73 | |||
74 | dove_ge00_init(&cm_a510_ge00_data); | ||
75 | dove_ehci0_init(); | ||
76 | dove_ehci1_init(); | ||
77 | dove_sata_init(&cm_a510_sata_data); | ||
78 | dove_sdio0_init(); | ||
79 | dove_sdio1_init(); | ||
80 | dove_spi0_init(); | ||
81 | dove_spi1_init(); | ||
82 | dove_uart0_init(); | ||
83 | dove_uart1_init(); | ||
84 | dove_i2c_init(); | ||
85 | spi_register_board_info(cm_a510_spi_flash_info, | ||
86 | ARRAY_SIZE(cm_a510_spi_flash_info)); | ||
87 | } | ||
88 | |||
89 | MACHINE_START(CM_A510, "Compulab CM-A510 Board") | ||
90 | .boot_params = 0x00000100, | ||
91 | .init_machine = cm_a510_init, | ||
92 | .map_io = dove_map_io, | ||
93 | .init_irq = dove_init_irq, | ||
94 | .timer = &dove_timer, | ||
95 | MACHINE_END | ||