aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms
diff options
context:
space:
mode:
authorAndrei Konovalov <akonovalov@ru.mvista.com>2005-07-05 21:54:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-05 22:18:59 -0400
commite6b6239f8e8e5bd9ba0192a854652abf14e28ce4 (patch)
tree8cb580d70757ee3ef3231be410ad35917f0fadb7 /arch/ppc/platforms
parent5432ebb5f67f0be3264feb646f6f8f6c326899c9 (diff)
[PATCH] ppc32: add Freescale MPC885ADS board support
This patch adds the Freescale MPC86xADS board support. The supported devices are SMC UART and 10Mbit ethernet on SCC1. The manual for the board says that it "is compatible with the MPC8xxFADS for software point of view". That's why this patch extends FADS instead of introducing a new platform. FEC is not supported as the "combined FCC/FEC ethernet driver" driver by Pantelis Antoniou should replace the current FEC driver. Signed-off-by: Gennadiy Kurtsman <gkurtsman@ru.mvista.com> Signed-off-by: Andrei Konovalov <akonovalov@ru.mvista.com> Acked-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc/platforms')
-rw-r--r--arch/ppc/platforms/fads.h109
-rw-r--r--arch/ppc/platforms/mpc885ads.h92
2 files changed, 195 insertions, 6 deletions
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h
index 632b8178ce66..b60c56450b67 100644
--- a/arch/ppc/platforms/fads.h
+++ b/arch/ppc/platforms/fads.h
@@ -3,7 +3,18 @@
3 * the Motorola 860T FADS board. Copied from the MBX stuff. 3 * the Motorola 860T FADS board. Copied from the MBX stuff.
4 * 4 *
5 * Copyright (c) 1998 Dan Malek (dmalek@jlc.net) 5 * Copyright (c) 1998 Dan Malek (dmalek@jlc.net)
6 *
7 * Added MPC86XADS support.
8 * The MPC86xADS manual says the board "is compatible with the MPC8xxFADS
9 * for SW point of view". This is 99% correct.
10 *
11 * Author: MontaVista Software, Inc.
12 * source@mvista.com
13 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
14 * terms of the GNU General Public License version 2. This program is licensed
15 * "as is" without any warranty of any kind, whether express or implied.
6 */ 16 */
17
7#ifdef __KERNEL__ 18#ifdef __KERNEL__
8#ifndef __ASM_FADS_H__ 19#ifndef __ASM_FADS_H__
9#define __ASM_FADS_H__ 20#define __ASM_FADS_H__
@@ -12,18 +23,45 @@
12 23
13#include <asm/ppcboot.h> 24#include <asm/ppcboot.h>
14 25
26#if defined(CONFIG_MPC86XADS)
27
28/* U-Boot maps BCSR to 0xff080000 */
29#define BCSR_ADDR ((uint)0xff080000)
30
31/* MPC86XADS has one more CPLD and an additional BCSR.
32 */
33#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
34#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
35
36#define BCSR5_T1_RST 0x10
37#define BCSR5_ATM155_RST 0x08
38#define BCSR5_ATM25_RST 0x04
39#define BCSR5_MII1_EN 0x02
40#define BCSR5_MII1_RST 0x01
41
42/* There is no PHY link change interrupt */
43#define PHY_INTERRUPT (-1)
44
45#else /* FADS */
46
15/* Memory map is configured by the PROM startup. 47/* Memory map is configured by the PROM startup.
16 * I tried to follow the FADS manual, although the startup PROM 48 * I tried to follow the FADS manual, although the startup PROM
17 * dictates this and we simply have to move some of the physical 49 * dictates this and we simply have to move some of the physical
18 * addresses for Linux. 50 * addresses for Linux.
19 */ 51 */
20#define BCSR_ADDR ((uint)0xff010000) 52#define BCSR_ADDR ((uint)0xff010000)
53
54/* PHY link change interrupt */
55#define PHY_INTERRUPT SIU_IRQ2
56
57#endif /* CONFIG_MPC86XADS */
58
21#define BCSR_SIZE ((uint)(64 * 1024)) 59#define BCSR_SIZE ((uint)(64 * 1024))
22#define BCSR0 ((uint)0xff010000) 60#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
23#define BCSR1 ((uint)0xff010004) 61#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
24#define BCSR2 ((uint)0xff010008) 62#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
25#define BCSR3 ((uint)0xff01000c) 63#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
26#define BCSR4 ((uint)0xff010010) 64#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
27 65
28#define IMAP_ADDR ((uint)0xff000000) 66#define IMAP_ADDR ((uint)0xff000000)
29#define IMAP_SIZE ((uint)(64 * 1024)) 67#define IMAP_SIZE ((uint)(64 * 1024))
@@ -34,8 +72,17 @@
34/* Bits of interest in the BCSRs. 72/* Bits of interest in the BCSRs.
35 */ 73 */
36#define BCSR1_ETHEN ((uint)0x20000000) 74#define BCSR1_ETHEN ((uint)0x20000000)
75#define BCSR1_IRDAEN ((uint)0x10000000)
37#define BCSR1_RS232EN_1 ((uint)0x01000000) 76#define BCSR1_RS232EN_1 ((uint)0x01000000)
77#define BCSR1_PCCEN ((uint)0x00800000)
78#define BCSR1_PCCVCC0 ((uint)0x00400000)
79#define BCSR1_PCCVPP0 ((uint)0x00200000)
80#define BCSR1_PCCVPP1 ((uint)0x00100000)
81#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
38#define BCSR1_RS232EN_2 ((uint)0x00040000) 82#define BCSR1_RS232EN_2 ((uint)0x00040000)
83#define BCSR1_PCCVCC1 ((uint)0x00010000)
84#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
85
39#define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */ 86#define BCSR4_ETHLOOP ((uint)0x80000000) /* EEST Loopback */
40#define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */ 87#define BCSR4_EEFDX ((uint)0x40000000) /* EEST FDX enable */
41#define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */ 88#define BCSR4_FETH_EN ((uint)0x08000000) /* PHY enable */
@@ -44,14 +91,64 @@
44#define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */ 91#define BCSR4_FETHFDE ((uint)0x02000000) /* PHY FDX advertise */
45#define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */ 92#define BCSR4_FETHRST ((uint)0x00200000) /* PHY Reset */
46 93
94/* IO_BASE definition for pcmcia.
95 */
96#define _IO_BASE 0x80000000
97#define _IO_BASE_SIZE 0x1000
98
99#ifdef CONFIG_IDE
100#define MAX_HWIFS 1
101#endif
102
47/* Interrupt level assignments. 103/* Interrupt level assignments.
48 */ 104 */
49#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */ 105#define FEC_INTERRUPT SIU_LEVEL1 /* FEC interrupt */
50#define PHY_INTERRUPT SIU_IRQ2 /* PHY link change interrupt */
51 106
52/* We don't use the 8259. 107/* We don't use the 8259.
53 */ 108 */
54#define NR_8259_INTS 0 109#define NR_8259_INTS 0
55 110
111/* CPM Ethernet through SCC1 or SCC2 */
112
113#ifdef CONFIG_SCC1_ENET /* Probably 860 variant */
114/* Bits in parallel I/O port registers that have to be set/cleared
115 * to configure the pins for SCC1 use.
116 * TCLK - CLK1, RCLK - CLK2.
117 */
118#define PA_ENET_RXD ((ushort)0x0001)
119#define PA_ENET_TXD ((ushort)0x0002)
120#define PA_ENET_TCLK ((ushort)0x0100)
121#define PA_ENET_RCLK ((ushort)0x0200)
122#define PB_ENET_TENA ((uint)0x00001000)
123#define PC_ENET_CLSN ((ushort)0x0010)
124#define PC_ENET_RENA ((ushort)0x0020)
125
126/* Control bits in the SICR to route TCLK (CLK1) and RCLK (CLK2) to
127 * SCC1. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
128 */
129#define SICR_ENET_MASK ((uint)0x000000ff)
130#define SICR_ENET_CLKRT ((uint)0x0000002c)
131#endif /* CONFIG_SCC1_ENET */
132
133#ifdef CONFIG_SCC2_ENET /* Probably 823/850 variant */
134/* Bits in parallel I/O port registers that have to be set/cleared
135 * to configure the pins for SCC1 use.
136 * TCLK - CLK1, RCLK - CLK2.
137 */
138#define PA_ENET_RXD ((ushort)0x0004)
139#define PA_ENET_TXD ((ushort)0x0008)
140#define PA_ENET_TCLK ((ushort)0x0400)
141#define PA_ENET_RCLK ((ushort)0x0200)
142#define PB_ENET_TENA ((uint)0x00002000)
143#define PC_ENET_CLSN ((ushort)0x0040)
144#define PC_ENET_RENA ((ushort)0x0080)
145
146/* Control bits in the SICR to route TCLK and RCLK to
147 * SCC2. Also, make sure GR1 (bit 24) and SC1 (bit 25) are zero.
148 */
149#define SICR_ENET_MASK ((uint)0x0000ff00)
150#define SICR_ENET_CLKRT ((uint)0x00002e00)
151#endif /* CONFIG_SCC2_ENET */
152
56#endif /* __ASM_FADS_H__ */ 153#endif /* __ASM_FADS_H__ */
57#endif /* __KERNEL__ */ 154#endif /* __KERNEL__ */
diff --git a/arch/ppc/platforms/mpc885ads.h b/arch/ppc/platforms/mpc885ads.h
new file mode 100644
index 000000000000..eb386635b0fd
--- /dev/null
+++ b/arch/ppc/platforms/mpc885ads.h
@@ -0,0 +1,92 @@
1/*
2 * A collection of structures, addresses, and values associated with
3 * the Freescale MPC885ADS board.
4 * Copied from the FADS stuff.
5 *
6 * Author: MontaVista Software, Inc.
7 * source@mvista.com
8 *
9 * 2005 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is licensed
11 * "as is" without any warranty of any kind, whether express or implied.
12 */
13
14#ifdef __KERNEL__
15#ifndef __ASM_MPC885ADS_H__
16#define __ASM_MPC885ADS_H__
17
18#include <linux/config.h>
19
20#include <asm/ppcboot.h>
21
22/* U-Boot maps BCSR to 0xff080000 */
23#define BCSR_ADDR ((uint)0xff080000)
24#define BCSR_SIZE ((uint)32)
25#define BCSR0 ((uint)(BCSR_ADDR + 0x00))
26#define BCSR1 ((uint)(BCSR_ADDR + 0x04))
27#define BCSR2 ((uint)(BCSR_ADDR + 0x08))
28#define BCSR3 ((uint)(BCSR_ADDR + 0x0c))
29#define BCSR4 ((uint)(BCSR_ADDR + 0x10))
30
31#define CFG_PHYDEV_ADDR ((uint)0xff0a0000)
32#define BCSR5 ((uint)(CFG_PHYDEV_ADDR + 0x300))
33
34#define IMAP_ADDR ((uint)0xff000000)
35#define IMAP_SIZE ((uint)(64 * 1024))
36
37#define PCMCIA_MEM_ADDR ((uint)0xff020000)
38#define PCMCIA_MEM_SIZE ((uint)(64 * 1024))
39
40/* Bits of interest in the BCSRs.
41 */
42#define BCSR1_ETHEN ((uint)0x20000000)
43#define BCSR1_IRDAEN ((uint)0x10000000)
44#define BCSR1_RS232EN_1 ((uint)0x01000000)
45#define BCSR1_PCCEN ((uint)0x00800000)
46#define BCSR1_PCCVCC0 ((uint)0x00400000)
47#define BCSR1_PCCVPP0 ((uint)0x00200000)
48#define BCSR1_PCCVPP1 ((uint)0x00100000)
49#define BCSR1_PCCVPP_MASK (BCSR1_PCCVPP0 | BCSR1_PCCVPP1)
50#define BCSR1_RS232EN_2 ((uint)0x00040000)
51#define BCSR1_PCCVCC1 ((uint)0x00010000)
52#define BCSR1_PCCVCC_MASK (BCSR1_PCCVCC0 | BCSR1_PCCVCC1)
53
54#define BCSR4_ETH10_RST ((uint)0x80000000) /* 10Base-T PHY reset*/
55#define BCSR4_USB_LO_SPD ((uint)0x04000000)
56#define BCSR4_USB_VCC ((uint)0x02000000)
57#define BCSR4_USB_FULL_SPD ((uint)0x00040000)
58#define BCSR4_USB_EN ((uint)0x00020000)
59
60#define BCSR5_MII2_EN 0x40
61#define BCSR5_MII2_RST 0x20
62#define BCSR5_T1_RST 0x10
63#define BCSR5_ATM155_RST 0x08
64#define BCSR5_ATM25_RST 0x04
65#define BCSR5_MII1_EN 0x02
66#define BCSR5_MII1_RST 0x01
67
68/* Interrupt level assignments */
69#define PHY_INTERRUPT SIU_IRQ7 /* PHY link change interrupt */
70#define SIU_INT_FEC1 SIU_LEVEL1 /* FEC1 interrupt */
71#define SIU_INT_FEC2 SIU_LEVEL3 /* FEC2 interrupt */
72#define FEC_INTERRUPT SIU_INT_FEC1 /* FEC interrupt */
73
74/* We don't use the 8259 */
75#define NR_8259_INTS 0
76
77/* CPM Ethernet through SCC3 */
78#define PA_ENET_RXD ((ushort)0x0040)
79#define PA_ENET_TXD ((ushort)0x0080)
80#define PE_ENET_TCLK ((uint)0x00004000)
81#define PE_ENET_RCLK ((uint)0x00008000)
82#define PE_ENET_TENA ((uint)0x00000010)
83#define PC_ENET_CLSN ((ushort)0x0400)
84#define PC_ENET_RENA ((ushort)0x0800)
85
86/* Control bits in the SICR to route TCLK (CLK5) and RCLK (CLK6) to
87 * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero */
88#define SICR_ENET_MASK ((uint)0x00ff0000)
89#define SICR_ENET_CLKRT ((uint)0x002c0000)
90
91#endif /* __ASM_MPC885ADS_H__ */
92#endif /* __KERNEL__ */