diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2007-04-10 13:52:04 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-04-12 13:39:51 -0400 |
commit | 7a6491dffb5bf86ae86c90895c0f40aacceb7083 (patch) | |
tree | 66b3610d0af09860858acbcd2e71b049b620179f /arch/ppc | |
parent | fa76abac9271e314c02aff9b407116b783e0ccbb (diff) |
[PPC] Fix compilation and linking errors of mpc86xads build.
Fix compilation of mpc866ads_setup.c
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/8xx_io/commproc.c | 26 | ||||
-rw-r--r-- | arch/ppc/platforms/mpc866ads_setup.c | 17 |
2 files changed, 35 insertions, 8 deletions
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c index 3b23bcb35b7a..7a8722beac12 100644 --- a/arch/ppc/8xx_io/commproc.c +++ b/arch/ppc/8xx_io/commproc.c | |||
@@ -39,6 +39,21 @@ | |||
39 | #include <asm/tlbflush.h> | 39 | #include <asm/tlbflush.h> |
40 | #include <asm/rheap.h> | 40 | #include <asm/rheap.h> |
41 | 41 | ||
42 | #define immr_map(member) \ | ||
43 | ({ \ | ||
44 | u32 offset = offsetof(immap_t, member); \ | ||
45 | void *addr = ioremap (IMAP_ADDR + offset, \ | ||
46 | sizeof( ((immap_t*)0)->member)); \ | ||
47 | addr; \ | ||
48 | }) | ||
49 | |||
50 | #define immr_map_size(member, size) \ | ||
51 | ({ \ | ||
52 | u32 offset = offsetof(immap_t, member); \ | ||
53 | void *addr = ioremap (IMAP_ADDR + offset, size); \ | ||
54 | addr; \ | ||
55 | }) | ||
56 | |||
42 | static void m8xx_cpm_dpinit(void); | 57 | static void m8xx_cpm_dpinit(void); |
43 | static uint host_buffer; /* One page of host buffer */ | 58 | static uint host_buffer; /* One page of host buffer */ |
44 | static uint host_end; /* end + 1 */ | 59 | static uint host_end; /* end + 1 */ |
@@ -364,11 +379,16 @@ static rh_block_t cpm_boot_dpmem_rh_block[16]; | |||
364 | static rh_info_t cpm_dpmem_info; | 379 | static rh_info_t cpm_dpmem_info; |
365 | 380 | ||
366 | #define CPM_DPMEM_ALIGNMENT 8 | 381 | #define CPM_DPMEM_ALIGNMENT 8 |
382 | static u8* dpram_vbase; | ||
383 | static uint dpram_pbase; | ||
367 | 384 | ||
368 | void m8xx_cpm_dpinit(void) | 385 | void m8xx_cpm_dpinit(void) |
369 | { | 386 | { |
370 | spin_lock_init(&cpm_dpmem_lock); | 387 | spin_lock_init(&cpm_dpmem_lock); |
371 | 388 | ||
389 | dpram_vbase = immr_map_size(im_cpm.cp_dpmem, CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE); | ||
390 | dpram_pbase = (uint)&((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem; | ||
391 | |||
372 | /* Initialize the info header */ | 392 | /* Initialize the info header */ |
373 | rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT, | 393 | rh_init(&cpm_dpmem_info, CPM_DPMEM_ALIGNMENT, |
374 | sizeof(cpm_boot_dpmem_rh_block) / | 394 | sizeof(cpm_boot_dpmem_rh_block) / |
@@ -442,3 +462,9 @@ void *cpm_dpram_addr(uint offset) | |||
442 | return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset; | 462 | return ((immap_t *)IMAP_ADDR)->im_cpm.cp_dpmem + offset; |
443 | } | 463 | } |
444 | EXPORT_SYMBOL(cpm_dpram_addr); | 464 | EXPORT_SYMBOL(cpm_dpram_addr); |
465 | |||
466 | uint cpm_dpram_phys(u8* addr) | ||
467 | { | ||
468 | return (dpram_pbase + (uint)(addr - dpram_vbase)); | ||
469 | } | ||
470 | EXPORT_SYMBOL(cpm_dpram_phys); | ||
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c index 5b05d4bd0df7..7ce5364fdb3b 100644 --- a/arch/ppc/platforms/mpc866ads_setup.c +++ b/arch/ppc/platforms/mpc866ads_setup.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/fs_enet_pd.h> | 21 | #include <linux/fs_enet_pd.h> |
22 | #include <linux/fs_uart_pd.h> | 22 | #include <linux/fs_uart_pd.h> |
23 | #include <linux/mii.h> | 23 | #include <linux/mii.h> |
24 | #include <linux/phy.h> | ||
24 | 25 | ||
25 | #include <asm/delay.h> | 26 | #include <asm/delay.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
@@ -37,10 +38,10 @@ | |||
37 | 38 | ||
38 | extern unsigned char __res[]; | 39 | extern unsigned char __res[]; |
39 | 40 | ||
40 | static void setup_fec1_ioports(void); | 41 | static void setup_fec1_ioports(struct fs_platform_info*); |
41 | static void setup_scc1_ioports(void); | 42 | static void setup_scc1_ioports(struct fs_platform_info*); |
42 | static void setup_smc1_ioports(void); | 43 | static void setup_smc1_ioports(struct fs_uart_platform_info*); |
43 | static void setup_smc2_ioports(void); | 44 | static void setup_smc2_ioports(struct fs_uart_platform_info*); |
44 | 45 | ||
45 | static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata; | 46 | static struct fs_mii_fec_platform_info mpc8xx_mdio_fec_pdata; |
46 | 47 | ||
@@ -137,7 +138,7 @@ void __init board_init(void) | |||
137 | iounmap(bcsr_io); | 138 | iounmap(bcsr_io); |
138 | } | 139 | } |
139 | 140 | ||
140 | static void setup_fec1_ioports(struct fs_platform_info*) | 141 | static void setup_fec1_ioports(struct fs_platform_info* pdata) |
141 | { | 142 | { |
142 | immap_t *immap = (immap_t *) IMAP_ADDR; | 143 | immap_t *immap = (immap_t *) IMAP_ADDR; |
143 | 144 | ||
@@ -145,7 +146,7 @@ static void setup_fec1_ioports(struct fs_platform_info*) | |||
145 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); | 146 | setbits16(&immap->im_ioport.iop_pddir, 0x1fff); |
146 | } | 147 | } |
147 | 148 | ||
148 | static void setup_scc1_ioports(struct fs_platform_info*) | 149 | static void setup_scc1_ioports(struct fs_platform_info* pdata) |
149 | { | 150 | { |
150 | immap_t *immap = (immap_t *) IMAP_ADDR; | 151 | immap_t *immap = (immap_t *) IMAP_ADDR; |
151 | unsigned *bcsr_io; | 152 | unsigned *bcsr_io; |
@@ -194,7 +195,7 @@ static void setup_scc1_ioports(struct fs_platform_info*) | |||
194 | 195 | ||
195 | } | 196 | } |
196 | 197 | ||
197 | static void setup_smc1_ioports(struct fs_uart_platform_info*) | 198 | static void setup_smc1_ioports(struct fs_uart_platform_info* pdata) |
198 | { | 199 | { |
199 | immap_t *immap = (immap_t *) IMAP_ADDR; | 200 | immap_t *immap = (immap_t *) IMAP_ADDR; |
200 | unsigned *bcsr_io; | 201 | unsigned *bcsr_io; |
@@ -216,7 +217,7 @@ static void setup_smc1_ioports(struct fs_uart_platform_info*) | |||
216 | 217 | ||
217 | } | 218 | } |
218 | 219 | ||
219 | static void setup_smc2_ioports(struct fs_uart_platform_info*) | 220 | static void setup_smc2_ioports(struct fs_uart_platform_info* pdata) |
220 | { | 221 | { |
221 | immap_t *immap = (immap_t *) IMAP_ADDR; | 222 | immap_t *immap = (immap_t *) IMAP_ADDR; |
222 | unsigned *bcsr_io; | 223 | unsigned *bcsr_io; |