aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/532x/config.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 18:54:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 18:54:36 -0400
commit13220a94d35708d5378114e96ffcc88d0a74fe99 (patch)
treebe6530677d5f9536c7211e05ba012923e4c0b307 /arch/m68knommu/platform/532x/config.c
parent8690d8a9f6c2d5728a9c9f68231f1bb4de109e3a (diff)
parent08abe18af1f78ee80c3c3a5ac47c3e0ae0beadf6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1750 commits) ixgbe: Allow Priority Flow Control settings to survive a device reset net: core: remove unneeded include in net/core/utils.c. e1000e: update version number e1000e: fix close interrupt race e1000e: fix loss of multicast packets e1000e: commonize tx cleanup routine to match e1000 & igb netfilter: fix nf_logger name in ebt_ulog. netfilter: fix warning in ebt_ulog init function. netfilter: fix warning about invalid const usage e1000: fix close race with interrupt e1000: cleanup clean_tx_irq routine so that it completely cleans ring e1000: fix tx hang detect logic and address dma mapping issues bridge: bad error handling when adding invalid ether address bonding: select current active slave when enslaving device for mode tlb and alb gianfar: reallocate skb when headroom is not enough for fcb Bump release date to 25Mar2009 and version to 0.22 r6040: Fix second PHY address qeth: fix wait_event_timeout handling qeth: check for completion of a running recovery qeth: unregister MAC addresses during recovery. ... Manually fixed up conflicts in: drivers/infiniband/hw/cxgb3/cxio_hal.h drivers/infiniband/hw/nes/nes_nic.c
Diffstat (limited to 'arch/m68knommu/platform/532x/config.c')
-rw-r--r--arch/m68knommu/platform/532x/config.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index a347623d6ee6..591f2f801134 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -61,8 +61,38 @@ static struct platform_device m532x_uart = {
61 .dev.platform_data = m532x_uart_platform, 61 .dev.platform_data = m532x_uart_platform,
62}; 62};
63 63
64static struct resource m532x_fec_resources[] = {
65 {
66 .start = 0xfc030000,
67 .end = 0xfc0307ff,
68 .flags = IORESOURCE_MEM,
69 },
70 {
71 .start = 64 + 36,
72 .end = 64 + 36,
73 .flags = IORESOURCE_IRQ,
74 },
75 {
76 .start = 64 + 40,
77 .end = 64 + 40,
78 .flags = IORESOURCE_IRQ,
79 },
80 {
81 .start = 64 + 42,
82 .end = 64 + 42,
83 .flags = IORESOURCE_IRQ,
84 },
85};
86
87static struct platform_device m532x_fec = {
88 .name = "fec",
89 .id = 0,
90 .num_resources = ARRAY_SIZE(m532x_fec_resources),
91 .resource = m532x_fec_resources,
92};
64static struct platform_device *m532x_devices[] __initdata = { 93static struct platform_device *m532x_devices[] __initdata = {
65 &m532x_uart, 94 &m532x_uart,
95 &m532x_fec,
66}; 96};
67 97
68/***************************************************************************/ 98/***************************************************************************/
@@ -93,6 +123,24 @@ static void __init m532x_uarts_init(void)
93 for (line = 0; (line < nrlines); line++) 123 for (line = 0; (line < nrlines); line++)
94 m532x_uart_init_line(line, m532x_uart_platform[line].irq); 124 m532x_uart_init_line(line, m532x_uart_platform[line].irq);
95} 125}
126/***************************************************************************/
127
128static void __init m532x_fec_init(void)
129{
130 /* Unmask FEC interrupts at ColdFire interrupt controller */
131 MCF_INTC0_ICR36 = 0x2;
132 MCF_INTC0_ICR40 = 0x2;
133 MCF_INTC0_ICR42 = 0x2;
134
135 MCF_INTC0_IMRH &= ~(MCF_INTC_IMRH_INT_MASK36 |
136 MCF_INTC_IMRH_INT_MASK40 | MCF_INTC_IMRH_INT_MASK42);
137
138 /* Set multi-function pins to ethernet mode for fec0 */
139 MCF_GPIO_PAR_FECI2C |= (MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC |
140 MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO);
141 MCF_GPIO_PAR_FEC = (MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC |
142 MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC);
143}
96 144
97/***************************************************************************/ 145/***************************************************************************/
98 146
@@ -150,6 +198,7 @@ void __init config_BSP(char *commandp, int size)
150static int __init init_BSP(void) 198static int __init init_BSP(void)
151{ 199{
152 m532x_uarts_init(); 200 m532x_uarts_init();
201 m532x_fec_init();
153 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices)); 202 platform_add_devices(m532x_devices, ARRAY_SIZE(m532x_devices));
154 return 0; 203 return 0;
155} 204}