alarmDataOperation.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * arch/arm/include/asm/hardware/iop3xx.h
  3. *
  4. * Intel IOP32X and IOP33X register definitions
  5. *
  6. * Author: Rory Bolt <rorybolt@pacbell.net>
  7. * Copyright (C) 2002 Rory Bolt
  8. * Copyright (C) 2004 Intel Corp.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef __IOP3XX_H
  15. #define __IOP3XX_H
  16. /*
  17. * IOP3XX GPIO handling
  18. */
  19. #define GPIO_IN 0
  20. #define GPIO_OUT 1
  21. #define GPIO_LOW 0
  22. #define GPIO_HIGH 1
  23. #define IOP3XX_GPIO_LINE(x) (x)
  24. #ifndef __ASSEMBLY__
  25. extern void gpio_line_config(int line, int direction);
  26. extern int gpio_line_get(int line);
  27. extern void gpio_line_set(int line, int value);
  28. extern int init_atu;
  29. extern int iop3xx_get_init_atu(void);
  30. #endif
  31. /*
  32. * IOP3XX processor registers
  33. */
  34. #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000
  35. #define IOP3XX_PERIPHERAL_VIRT_BASE 0xfeffe000
  36. #define IOP3XX_PERIPHERAL_SIZE 0x00002000
  37. #define IOP3XX_PERIPHERAL_UPPER_PA (IOP3XX_PERIPHERAL_PHYS_BASE +\
  38. IOP3XX_PERIPHERAL_SIZE - 1)
  39. #define IOP3XX_PERIPHERAL_UPPER_VA (IOP3XX_PERIPHERAL_VIRT_BASE +\
  40. IOP3XX_PERIPHERAL_SIZE - 1)
  41. #define IOP3XX_PMMR_PHYS_TO_VIRT(addr) (u32) ((u32) (addr) -\
  42. (IOP3XX_PERIPHERAL_PHYS_BASE\
  43. - IOP3XX_PERIPHERAL_VIRT_BASE))
  44. #define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg))
  45. /* Address Translation Unit */
  46. #define IOP3XX_ATUVID (volatile u16 *)IOP3XX_REG_ADDR(0x0100)