Path: blob/master/arch/avr32/include/asm/addrspace.h
10818 views
/*1* Defitions for the address spaces of the AVR32 CPUs. Heavily based on2* include/asm-sh/addrspace.h3*4* Copyright (C) 2004-2006 Atmel Corporation5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License version 2 as8* published by the Free Software Foundation.9*/10#ifndef __ASM_AVR32_ADDRSPACE_H11#define __ASM_AVR32_ADDRSPACE_H1213#ifdef CONFIG_MMU1415/* Memory segments when segmentation is enabled */16#define P0SEG 0x0000000017#define P1SEG 0x8000000018#define P2SEG 0xa000000019#define P3SEG 0xc000000020#define P4SEG 0xe00000002122/* Returns the privileged segment base of a given address */23#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000)2425/* Returns the physical address of a PnSEG (n=1,2) address */26#define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff)2728/*29* Map an address to a certain privileged segment30*/31#define P1SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) \32| P1SEG))33#define P2SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) \34| P2SEG))35#define P3SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) \36| P3SEG))37#define P4SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) \38| P4SEG))3940#endif /* CONFIG_MMU */4142#endif /* __ASM_AVR32_ADDRSPACE_H */434445