~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/fsl/bestcomm/sram.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/fsl/bestcomm/sram.h (Architecture mips) and /include/linux/fsl/bestcomm/sram.h (Architecture ppc)


  1 /*                                                  1 /*
  2  * Handling of a sram zone for bestcomm             2  * Handling of a sram zone for bestcomm
  3  *                                                  3  *
  4  *                                                  4  *
  5  * Copyright (C) 2007 Sylvain Munaut <tnt@246t      5  * Copyright (C) 2007 Sylvain Munaut <tnt@246tNt.com>
  6  *                                                  6  *
  7  * This file is licensed under the terms of th      7  * This file is licensed under the terms of the GNU General Public License
  8  * version 2. This program is licensed "as is"      8  * version 2. This program is licensed "as is" without any warranty of any
  9  * kind, whether express or implied.                9  * kind, whether express or implied.
 10  */                                                10  */
 11                                                    11 
 12 #ifndef __BESTCOMM_SRAM_H__                        12 #ifndef __BESTCOMM_SRAM_H__
 13 #define __BESTCOMM_SRAM_H__                        13 #define __BESTCOMM_SRAM_H__
 14                                                    14 
 15 #include <asm/rheap.h>                             15 #include <asm/rheap.h>
 16 #include <asm/mmu.h>                               16 #include <asm/mmu.h>
 17 #include <linux/spinlock.h>                        17 #include <linux/spinlock.h>
 18                                                    18 
 19                                                    19 
 20 /* Structure used internally */                    20 /* Structure used internally */
 21         /* The internals are here for the inli     21         /* The internals are here for the inline functions
 22          * sake, certainly not for the user to     22          * sake, certainly not for the user to mess with !
 23          */                                        23          */
 24 struct bcom_sram {                                 24 struct bcom_sram {
 25         phys_addr_t              base_phys;        25         phys_addr_t              base_phys;
 26         void                    *base_virt;        26         void                    *base_virt;
 27         unsigned int             size;             27         unsigned int             size;
 28         rh_info_t               *rh;               28         rh_info_t               *rh;
 29         spinlock_t               lock;             29         spinlock_t               lock;
 30 };                                                 30 };
 31                                                    31 
 32 extern struct bcom_sram *bcom_sram;                32 extern struct bcom_sram *bcom_sram;
 33                                                    33 
 34                                                    34 
 35 /* Public API */                                   35 /* Public API */
 36 extern int  bcom_sram_init(struct device_node      36 extern int  bcom_sram_init(struct device_node *sram_node, char *owner);
 37 extern void bcom_sram_cleanup(void);               37 extern void bcom_sram_cleanup(void);
 38                                                    38 
 39 extern void* bcom_sram_alloc(int size, int ali     39 extern void* bcom_sram_alloc(int size, int align, phys_addr_t *phys);
 40 extern void  bcom_sram_free(void *ptr);            40 extern void  bcom_sram_free(void *ptr);
 41                                                    41 
 42 static inline phys_addr_t bcom_sram_va2pa(void     42 static inline phys_addr_t bcom_sram_va2pa(void *va) {
 43         return bcom_sram->base_phys +              43         return bcom_sram->base_phys +
 44                 (unsigned long)(va - bcom_sram     44                 (unsigned long)(va - bcom_sram->base_virt);
 45 }                                                  45 }
 46                                                    46 
 47 static inline void *bcom_sram_pa2va(phys_addr_     47 static inline void *bcom_sram_pa2va(phys_addr_t pa) {
 48         return bcom_sram->base_virt +              48         return bcom_sram->base_virt +
 49                 (unsigned long)(pa - bcom_sram     49                 (unsigned long)(pa - bcom_sram->base_phys);
 50 }                                                  50 }
 51                                                    51 
 52                                                    52 
 53 #endif  /* __BESTCOMM_SRAM_H__ */                  53 #endif  /* __BESTCOMM_SRAM_H__ */
 54                                                    54 
 55                                                    55 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php