2 * arch/ppc/syslib/mv64x60_ocp.c
4 * Common OCP definitions for the Marvell GT64260/MV64360/MV64460/...
5 * line of host bridges.
7 * Author: Mark A. Greer <mgreer@mvista.com>
9 * 2004 (c) MontaVista, Software, Inc. This file is licensed under
10 * the terms of the GNU General Public License version 2. This program
11 * is licensed "as is" without any warranty of any kind, whether express
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <asm/mv64x60.h>
20 static mv64x60_ocp_mpsc_data_t mv64x60_ocp_mpsc0_def = {
26 .default_parity = 'n',
28 .chr_1_val = 0x00000000,
29 .chr_2_val = 0x00000000,
30 .chr_10_val = 0x00000003,
32 .mrr_val = 0x3ffffe38,
37 .sdma_irq = MV64x60_IRQ_SDMA_0,
39 .brg_clk_src = 8, /* Default to TCLK */
40 .brg_clk_freq = 100000000, /* Default to 100 MHz */
42 static mv64x60_ocp_mpsc_data_t mv64x60_ocp_mpsc1_def = {
48 .default_parity = 'n',
50 .chr_1_val = 0x00000000,
51 .chr_1_val = 0x00000000,
52 .chr_2_val = 0x00000000,
53 .chr_10_val = 0x00000003,
55 .mrr_val = 0x3ffffe38,
60 .sdma_irq = MV64x60_IRQ_SDMA_1,
62 .brg_clk_src = 8, /* Default to TCLK */
63 .brg_clk_freq = 100000000, /* Default to 100 MHz */
65 MV64x60_OCP_SYSFS_MPSC_DATA()
67 struct ocp_def core_ocp[] = {
68 /* Base address for the block of bridge's regs */
69 { .vendor = OCP_VENDOR_MARVELL, /* 0x00 */
70 .function = OCP_FUNC_HB,
75 /* 10/100 Ethernet controller */
76 { .vendor = OCP_VENDOR_MARVELL, /* 0x01 */
77 .function = OCP_FUNC_EMAC,
79 .paddr = GT64260_ENET_0_OFFSET,
80 .irq = MV64x60_IRQ_ETH_0,
83 { .vendor = OCP_VENDOR_MARVELL, /* 0x02 */
84 .function = OCP_FUNC_EMAC,
86 .paddr = GT64260_ENET_1_OFFSET,
87 .irq = MV64x60_IRQ_ETH_1,
90 { .vendor = OCP_VENDOR_MARVELL, /* 0x03 */
91 .function = OCP_FUNC_EMAC,
93 .paddr = GT64260_ENET_2_OFFSET,
94 .irq = MV64x60_IRQ_ETH_2,
97 /* Multi-Protocol Serial Controller (MPSC) */
98 { .vendor = OCP_VENDOR_MARVELL, /* 0x04 */
99 .function = OCP_FUNC_MPSC,
101 .paddr = MV64x60_MPSC_0_OFFSET,
102 .irq = MV64x60_IRQ_MPSC_0,
104 .additions = &mv64x60_ocp_mpsc0_def,
105 .show = &mv64x60_ocp_show_mpsc
107 { .vendor = OCP_VENDOR_MARVELL, /* 0x05 */
108 .function = OCP_FUNC_MPSC,
110 .paddr = MV64x60_MPSC_1_OFFSET,
111 .irq = MV64x60_IRQ_MPSC_1,
113 .additions = &mv64x60_ocp_mpsc1_def,
114 .show = &mv64x60_ocp_show_mpsc
116 /* Inter-Integrated Circuit Controller */
117 { .vendor = OCP_VENDOR_MARVELL, /* 0x06 */
118 .function = OCP_FUNC_I2C,
120 .paddr = GT64260_I2C_OFFSET,
121 .irq = MV64x60_IRQ_I2C,
124 /* Programmable Interrupt Controller */
125 { .vendor = OCP_VENDOR_MARVELL, /* 0x07 */
126 .function = OCP_FUNC_PIC,
128 .paddr = GT64260_IC_OFFSET,
131 { .vendor = OCP_VENDOR_INVALID