mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
[POWERPC] cpm2: Infrastructure code cleanup.
Mostly sparse fixes (__iomem annotations, etc); also, cpm2_immr is used rather than creating many temporary mappings. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
544cdabe64
commit
449012daa9
5 changed files with 49 additions and 34 deletions
|
|
@ -107,7 +107,7 @@
|
|||
/* Export the base address of the communication processor registers
|
||||
* and dual port ram.
|
||||
*/
|
||||
extern cpm_cpm2_t *cpmp; /* Pointer to comm processor */
|
||||
extern cpm_cpm2_t __iomem *cpmp; /* Pointer to comm processor */
|
||||
|
||||
extern unsigned long cpm_dpalloc(uint size, uint align);
|
||||
extern int cpm_dpfree(unsigned long offset);
|
||||
|
|
|
|||
|
|
@ -23,22 +23,9 @@
|
|||
#include <asm/mpc85xx.h>
|
||||
#endif
|
||||
|
||||
#define cpm2_map(member) \
|
||||
({ \
|
||||
u32 offset = offsetof(cpm2_map_t, member); \
|
||||
void *addr = ioremap (CPM_MAP_ADDR + offset, \
|
||||
sizeof( ((cpm2_map_t*)0)->member)); \
|
||||
addr; \
|
||||
})
|
||||
|
||||
#define cpm2_map_size(member, size) \
|
||||
({ \
|
||||
u32 offset = offsetof(cpm2_map_t, member); \
|
||||
void *addr = ioremap (CPM_MAP_ADDR + offset, size); \
|
||||
addr; \
|
||||
})
|
||||
|
||||
#define cpm2_unmap(addr) iounmap(addr)
|
||||
#define cpm2_map(member) (&cpm2_immr->member)
|
||||
#define cpm2_map_size(member, size) (&cpm2_immr->member)
|
||||
#define cpm2_unmap(addr) do {} while(0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_8xx
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#ifndef __IMMAP_CPM2__
|
||||
#define __IMMAP_CPM2__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* System configuration registers.
|
||||
*/
|
||||
typedef struct sys_82xx_conf {
|
||||
|
|
@ -642,7 +644,7 @@ typedef struct immap {
|
|||
u8 res11[4096];
|
||||
} cpm2_map_t;
|
||||
|
||||
extern cpm2_map_t *cpm2_immr;
|
||||
extern cpm2_map_t __iomem *cpm2_immr;
|
||||
|
||||
#endif /* __IMMAP_CPM2__ */
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue