diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2006-04-25 12:26:33 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-04-28 07:05:16 -0400 |
commit | a73c87bfe98f4d54c919e920a6efb0a116115722 (patch) | |
tree | 71aa6572fff1187133bd70e13e3dddd1a45c5859 /arch | |
parent | 2833c28aa0d0326780acfa61149a2a02dcb2c9b4 (diff) |
[PATCH] ppc32: odd fixes and improvements in ppc_sys
This consists of offsets fix in ..._devices.c, and update of
ppc_sys_fixup_mem_resource() function to prevent subsequent fixups
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/syslib/mpc8xx_devices.c | 25 | ||||
-rw-r--r-- | arch/ppc/syslib/ppc_sys.c | 4 | ||||
-rw-r--r-- | arch/ppc/syslib/pq2_sys.c | 8 |
3 files changed, 26 insertions, 11 deletions
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c index bd41ed83beb3..6f536383866e 100644 --- a/arch/ppc/syslib/mpc8xx_devices.c +++ b/arch/ppc/syslib/mpc8xx_devices.c | |||
@@ -170,12 +170,18 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
170 | [MPC8xx_CPM_SMC1] = { | 170 | [MPC8xx_CPM_SMC1] = { |
171 | .name = "fsl-cpm-smc", | 171 | .name = "fsl-cpm-smc", |
172 | .id = 1, | 172 | .id = 1, |
173 | .num_resources = 2, | 173 | .num_resources = 3, |
174 | .resource = (struct resource[]) { | 174 | .resource = (struct resource[]) { |
175 | { | 175 | { |
176 | .name = "regs", | 176 | .name = "regs", |
177 | .start = 0xa82, | 177 | .start = 0xa80, |
178 | .end = 0xa91, | 178 | .end = 0xa8f, |
179 | .flags = IORESOURCE_MEM, | ||
180 | }, | ||
181 | { | ||
182 | .name = "pram", | ||
183 | .start = 0x3e80, | ||
184 | .end = 0x3ebf, | ||
179 | .flags = IORESOURCE_MEM, | 185 | .flags = IORESOURCE_MEM, |
180 | }, | 186 | }, |
181 | { | 187 | { |
@@ -189,15 +195,22 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
189 | [MPC8xx_CPM_SMC2] = { | 195 | [MPC8xx_CPM_SMC2] = { |
190 | .name = "fsl-cpm-smc", | 196 | .name = "fsl-cpm-smc", |
191 | .id = 2, | 197 | .id = 2, |
192 | .num_resources = 2, | 198 | .num_resources = 3, |
193 | .resource = (struct resource[]) { | 199 | .resource = (struct resource[]) { |
194 | { | 200 | { |
195 | .name = "regs", | 201 | .name = "regs", |
196 | .start = 0xa92, | 202 | .start = 0xa90, |
197 | .end = 0xaa1, | 203 | .end = 0xa9f, |
198 | .flags = IORESOURCE_MEM, | 204 | .flags = IORESOURCE_MEM, |
199 | }, | 205 | }, |
200 | { | 206 | { |
207 | .name = "pram", | ||
208 | .start = 0x3f80, | ||
209 | .end = 0x3fbf, | ||
210 | .flags = IORESOURCE_MEM, | ||
211 | |||
212 | }, | ||
213 | { | ||
201 | .name = "interrupt", | 214 | .name = "interrupt", |
202 | .start = MPC8xx_INT_SMC2, | 215 | .start = MPC8xx_INT_SMC2, |
203 | .end = MPC8xx_INT_SMC2, | 216 | .end = MPC8xx_INT_SMC2, |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index 7662c4e6e7d6..2d48018b71d9 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -109,9 +109,11 @@ ppc_sys_fixup_mem_resource(struct platform_device *pdev, phys_addr_t paddr) | |||
109 | int i; | 109 | int i; |
110 | for (i = 0; i < pdev->num_resources; i++) { | 110 | for (i = 0; i < pdev->num_resources; i++) { |
111 | struct resource *r = &pdev->resource[i]; | 111 | struct resource *r = &pdev->resource[i]; |
112 | if ((r->flags & IORESOURCE_MEM) == IORESOURCE_MEM) { | 112 | if (((r->flags & IORESOURCE_MEM) == IORESOURCE_MEM) && |
113 | ((r->flags & PPC_SYS_IORESOURCE_FIXUPPED) != PPC_SYS_IORESOURCE_FIXUPPED)) { | ||
113 | r->start += paddr; | 114 | r->start += paddr; |
114 | r->end += paddr; | 115 | r->end += paddr; |
116 | r->flags |= PPC_SYS_IORESOURCE_FIXUPPED; | ||
115 | } | 117 | } |
116 | } | 118 | } |
117 | } | 119 | } |
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c index 75e64f1c144d..433b0fa203e1 100644 --- a/arch/ppc/syslib/pq2_sys.c +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -113,13 +113,13 @@ struct ppc_sys_spec ppc_sys_specs[] = { | |||
113 | .ppc_sys_name = "8248", | 113 | .ppc_sys_name = "8248", |
114 | .mask = 0x0000ff00, | 114 | .mask = 0x0000ff00, |
115 | .value = 0x00000c00, | 115 | .value = 0x00000c00, |
116 | .num_devices = 11, | 116 | .num_devices = 12, |
117 | .device_list = (enum ppc_sys_devices[]) | 117 | .device_list = (enum ppc_sys_devices[]) |
118 | { | 118 | { |
119 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | 119 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, |
120 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | 120 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, |
121 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | 121 | MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, |
122 | MPC82xx_CPM_USB, MPC82xx_SEC1, | 122 | MPC82xx_CPM_I2C, MPC82xx_CPM_USB, MPC82xx_SEC1, |
123 | }, | 123 | }, |
124 | }, | 124 | }, |
125 | { | 125 | { |