hal_msm.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (C) ST-Ericsson AP Pte Ltd 2010
  3. *
  4. * ISP1763 Linux OTG Controller driver : hal
  5. *
  6. * This program is free software; you can redistribute it and/or modify it under the terms of
  7. * the GNU General Public License as published by the Free Software Foundation; version
  8. * 2 of the License.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT ANY
  11. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  13. * details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. *
  19. * This is a hardware abstraction layer header file.
  20. *
  21. * Author : wired support <wired.support@stericsson.com>
  22. *
  23. */
  24. #ifndef HAL_X86_H
  25. #define HAL_X86_H
  26. #define DRIVER_AUTHOR "ST-ERICSSON "
  27. #define DRIVER_DESC "ISP1763 bus driver"
  28. /* Driver tuning, per ST-ERICSSON requirements: */
  29. #define MEM_TO_CHECK 4096 /*bytes, must be multiple of 2 */
  30. /* BIT defines */
  31. #define BIT0 (1 << 0)
  32. #define BIT1 (1 << 1)
  33. #define BIT2 (1 << 2)
  34. #define BIT3 (1 << 3)
  35. #define BIT4 (1 << 4)
  36. #define BIT5 (1 << 5)
  37. #define BIT6 (1 << 6)
  38. #define BIT7 (1 << 7)
  39. #define BIT8 (1 << 8)
  40. #define BIT9 (1 << 9)
  41. #define BIT10 (1 << 10)
  42. #define BIT11 (1 << 11)
  43. #define BIT12 (1 << 12)
  44. #define BIT13 (1 << 13)
  45. #define BIT14 (1 << 14)
  46. #define BIT15 (1 << 15)
  47. #define BIT16 (1 << 16)
  48. #define BIT17 (1 << 17)
  49. #define BIT18 (1 << 18)
  50. #define BIT19 (1 << 19)
  51. #define BIT20 (1 << 20)
  52. #define BIT21 (1 << 21)
  53. #define BIT22 (1 << 22)
  54. #define BIT23 (1 << 23)
  55. #define BIT24 (1 << 24)
  56. #define BIT25 (1 << 26)
  57. #define BIT27 (1 << 27)
  58. #define BIT28 (1 << 28)
  59. #define BIT29 (1 << 29)
  60. #define BIT30 (1 << 30)
  61. #define BIT31 (1 << 31)
  62. /* Definitions Related to Chip Address and CPU Physical Address
  63. * cpu_phy_add: CPU Physical Address , it uses 32 bit data per address
  64. * chip_add : Chip Address, it uses double word(64) bit data per address
  65. */
  66. #define chip_add(cpu_phy_add) (((cpu_phy_add) - 0x400) / 8)
  67. #define cpu_phy_add(chip_add) ((8 * (chip_add)) + 0x400)
  68. /* for getting end add, and start add, provided we have one address with us */
  69. /* IMPORTANT length hex(base16) and dec(base10) works fine*/
  70. #define end_add(start_add, length) (start_add + (length - 4))
  71. #define start_add(end_add, length) (end_add - (length - 4))
  72. /* Device Registers*/
  73. #define DEV_UNLOCK_REGISTER 0x7C
  74. #define DEV_INTERRUPT_REGISTER 0x18
  75. #define INT_ENABLE_REGISTER 0x14
  76. #endif /*_HAL_X86_H_ */