home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / arch / arm / plat-mxc / include / mach / spba.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-09-09  |  1.7 KB  |  67 lines

  1.  
  2. /*
  3.  * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
  4.  */
  5.  
  6. /*
  7.  * The code contained herein is licensed under the GNU General Public
  8.  * License. You may obtain a copy of the GNU General Public License
  9.  * Version 2 or later at the following locations:
  10.  *
  11.  * http://www.opensource.org/licenses/gpl-license.html
  12.  * http://www.gnu.org/copyleft/gpl.html
  13.  */
  14.  
  15. /*!
  16.  * @defgroup SPBA Shared Peripheral Bus Arbiter (SPBA)
  17.  * @ingroup MSL_MX31 MSL_MX35 MSL_MX37 MSL_MX51 MSL_MXC91321
  18.  */
  19.  
  20. /*!
  21.  * @file arch-mxc/spba.h
  22.  * @brief This file contains the Shared Peripheral Bus Arbiter (spba) API.
  23.  *
  24.  * @ingroup SPBA
  25.  */
  26.  
  27. #ifndef __ASM_ARCH_MXC_SPBA_H__
  28. #define __ASM_ARCH_MXC_SPBA_H__
  29.  
  30. #ifdef __KERNEL__
  31.  
  32. #define MXC_SPBA_RAR_MASK       0x7
  33.  
  34. /*!
  35.  * Defines three SPBA masters: A - ARM, C - SDMA (no master B for MX31)
  36.  */
  37. enum spba_masters {
  38.     SPBA_MASTER_A = 1,
  39.     SPBA_MASTER_B = 2,
  40.     SPBA_MASTER_C = 4,
  41. };
  42.  
  43. /*!
  44.  * This function allows the three masters (A, B, C) to take ownership of a
  45.  * shared peripheral.
  46.  *
  47.  * @param  mod          specified module as defined in \b enum \b #spba_module
  48.  * @param  master       one of more (or-ed together) masters as defined in \b enum \b #spba_masters
  49.  *
  50.  * @return 0 if successful; -1 otherwise.
  51.  */
  52. int spba_take_ownership(int mod, int master);
  53.  
  54. /*!
  55.  * This function releases the ownership for a shared peripheral.
  56.  *
  57.  * @param  mod          specified module as defined in \b enum \b #spba_module
  58.  * @param  master       one of more (or-ed together) masters as defined in \b enum \b #spba_masters
  59.  *
  60.  * @return 0 if successful; -1 otherwise.
  61.  */
  62. int spba_rel_ownership(int mod, int master);
  63.  
  64. #endif                /* __KERNEL__ */
  65.  
  66. #endif                /* __ASM_ARCH_MXC_SPBA_H__ */
  67.