aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
diff options
context:
space:
mode:
authorStanislav Samsonov <samsonov@marvell.com>2008-06-22 16:45:10 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-06-22 16:45:10 -0400
commit794d15b25df5dda10efba600d6dd6cd74a7aa9cb (patch)
tree10797e90295895994ea3f2363e84e555e40abb97 /arch/arm/mach-mv78xx0/db78x00-bp-setup.c
parenta9311cfed241ebcd6b5f9be5c8c6d519bf22f9e7 (diff)
[ARM] add Marvell 78xx0 ARM SoC support
The Marvell Discovery Duo (MV78xx0) is a family of ARM SoCs featuring (depending on the model) one or two Feroceon CPU cores with 512K of L2 cache and VFP coprocessors running at (depending on the model) between 800 MHz and 1.2 GHz, and features a DDR2 controller, two PCIe interfaces that can each run either in x4 or quad x1 mode, three USB 2.0 interfaces, two 3Gb/s SATA II interfaces, a SPI interface, two TWSI interfaces, a crypto accelerator, IDMA/XOR engines, a SPI interface, four UARTs, and depending on the model, two or four gigabit ethernet interfaces. This patch adds basic support for the platform, and allows booting on the MV78x00 development board, with functional UARTs, SATA, PCIe, GigE and USB ports. Signed-off-by: Stanislav Samsonov <samsonov@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-mv78xx0/db78x00-bp-setup.c')
-rw-r--r--arch/arm/mach-mv78xx0/db78x00-bp-setup.c94
1 files changed, 94 insertions, 0 deletions
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
new file mode 100644
index 000000000000..0c93d19193df
--- /dev/null
+++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
@@ -0,0 +1,94 @@
1/*
2 * arch/arm/mach-mv78xx0/db78x00-bp-setup.c
3 *
4 * Marvell DB-78x00-BP Development Board Setup
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
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 <asm/arch/mv78xx0.h>
17#include <asm/mach-types.h>
18#include <asm/mach/arch.h>
19#include "common.h"
20
21static struct mv643xx_eth_platform_data db78x00_ge00_data = {
22 .phy_addr = 8,
23};
24
25static struct mv643xx_eth_platform_data db78x00_ge01_data = {
26 .phy_addr = 9,
27};
28
29static struct mv643xx_eth_platform_data db78x00_ge10_data = {
30 .phy_addr = -1,
31};
32
33static struct mv643xx_eth_platform_data db78x00_ge11_data = {
34 .phy_addr = -1,
35};
36
37static struct mv_sata_platform_data db78x00_sata_data = {
38 .n_ports = 2,
39};
40
41static void __init db78x00_init(void)
42{
43 /*
44 * Basic MV78xx0 setup. Needs to be called early.
45 */
46 mv78xx0_init();
47
48 /*
49 * Partition on-chip peripherals between the two CPU cores.
50 */
51 if (mv78xx0_core_index() == 0) {
52 mv78xx0_ehci0_init();
53 mv78xx0_ehci1_init();
54 mv78xx0_ehci2_init();
55 mv78xx0_ge00_init(&db78x00_ge00_data);
56 mv78xx0_ge01_init(&db78x00_ge01_data);
57 mv78xx0_ge10_init(&db78x00_ge10_data);
58 mv78xx0_ge11_init(&db78x00_ge11_data);
59 mv78xx0_sata_init(&db78x00_sata_data);
60 mv78xx0_uart0_init();
61 mv78xx0_uart2_init();
62 } else {
63 mv78xx0_uart1_init();
64 mv78xx0_uart3_init();
65 }
66}
67
68static int __init db78x00_pci_init(void)
69{
70 if (machine_is_db78x00_bp()) {
71 /*
72 * Assign the x16 PCIe slot on the board to CPU core
73 * #0, and let CPU core #1 have the four x1 slots.
74 */
75 if (mv78xx0_core_index() == 0)
76 mv78xx0_pcie_init(0, 1);
77 else
78 mv78xx0_pcie_init(1, 0);
79 }
80
81 return 0;
82}
83subsys_initcall(db78x00_pci_init);
84
85MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
86 /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
87 .phys_io = MV78XX0_REGS_PHYS_BASE,
88 .io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc,
89 .boot_params = 0x00000100,
90 .init_machine = db78x00_init,
91 .map_io = mv78xx0_map_io,
92 .init_irq = mv78xx0_init_irq,
93 .timer = &mv78xx0_timer,
94MACHINE_END