diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-03-28 16:29:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-03-28 16:29:51 -0400 |
commit | ed40d0c472b136682b2fcba05f89762859c7374f (patch) | |
tree | 076b83a26bcd63d6158463735dd34c10bbc591dc /arch/m68knommu/platform/523x/config.c | |
parent | 9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff) | |
parent | 5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff) |
Merge branch 'origin' into devel
Conflicts:
sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'arch/m68knommu/platform/523x/config.c')
-rw-r--r-- | arch/m68knommu/platform/523x/config.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c index 13f02611ea23..74133f27b30c 100644 --- a/arch/m68knommu/platform/523x/config.c +++ b/arch/m68knommu/platform/523x/config.c | |||
@@ -50,8 +50,39 @@ static struct platform_device m523x_uart = { | |||
50 | .dev.platform_data = m523x_uart_platform, | 50 | .dev.platform_data = m523x_uart_platform, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct resource m523x_fec_resources[] = { | ||
54 | { | ||
55 | .start = MCF_MBAR + 0x1000, | ||
56 | .end = MCF_MBAR + 0x1000 + 0x7ff, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | { | ||
60 | .start = 64 + 23, | ||
61 | .end = 64 + 23, | ||
62 | .flags = IORESOURCE_IRQ, | ||
63 | }, | ||
64 | { | ||
65 | .start = 64 + 27, | ||
66 | .end = 64 + 27, | ||
67 | .flags = IORESOURCE_IRQ, | ||
68 | }, | ||
69 | { | ||
70 | .start = 64 + 29, | ||
71 | .end = 64 + 29, | ||
72 | .flags = IORESOURCE_IRQ, | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | static struct platform_device m523x_fec = { | ||
77 | .name = "fec", | ||
78 | .id = 0, | ||
79 | .num_resources = ARRAY_SIZE(m523x_fec_resources), | ||
80 | .resource = m523x_fec_resources, | ||
81 | }; | ||
82 | |||
53 | static struct platform_device *m523x_devices[] __initdata = { | 83 | static struct platform_device *m523x_devices[] __initdata = { |
54 | &m523x_uart, | 84 | &m523x_uart, |
85 | &m523x_fec, | ||
55 | }; | 86 | }; |
56 | 87 | ||
57 | /***************************************************************************/ | 88 | /***************************************************************************/ |
@@ -83,6 +114,25 @@ static void __init m523x_uarts_init(void) | |||
83 | 114 | ||
84 | /***************************************************************************/ | 115 | /***************************************************************************/ |
85 | 116 | ||
117 | static void __init m523x_fec_init(void) | ||
118 | { | ||
119 | u32 imr; | ||
120 | |||
121 | /* Unmask FEC interrupts at ColdFire interrupt controller */ | ||
122 | writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23); | ||
123 | writeb(0x27, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 27); | ||
124 | writeb(0x26, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 29); | ||
125 | |||
126 | imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); | ||
127 | imr &= ~0xf; | ||
128 | writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH); | ||
129 | imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL); | ||
130 | imr &= ~0xff800001; | ||
131 | writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL); | ||
132 | } | ||
133 | |||
134 | /***************************************************************************/ | ||
135 | |||
86 | void mcf_disableall(void) | 136 | void mcf_disableall(void) |
87 | { | 137 | { |
88 | *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; | 138 | *((volatile unsigned long *) (MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRH)) = 0xffffffff; |
@@ -103,6 +153,7 @@ void __init config_BSP(char *commandp, int size) | |||
103 | mcf_disableall(); | 153 | mcf_disableall(); |
104 | mach_reset = coldfire_reset; | 154 | mach_reset = coldfire_reset; |
105 | m523x_uarts_init(); | 155 | m523x_uarts_init(); |
156 | m523x_fec_init(); | ||
106 | } | 157 | } |
107 | 158 | ||
108 | /***************************************************************************/ | 159 | /***************************************************************************/ |