magicpanelr2.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * include/asm-sh/magicpanelr2.h
  3. *
  4. * Copyright (C) 2007 Markus Brunner, Mark Jonas
  5. *
  6. * I/O addresses and bitmasks for Magic Panel Release 2 board
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. #ifndef __ASM_SH_MAGICPANELR2_H
  13. #define __ASM_SH_MAGICPANELR2_H
  14. #include <linux/gpio.h>
  15. #define __IO_PREFIX mpr2
  16. #include <asm/io_generic.h>
  17. #define SETBITS_OUTB(mask, reg) __raw_writeb(__raw_readb(reg) | mask, reg)
  18. #define SETBITS_OUTW(mask, reg) __raw_writew(__raw_readw(reg) | mask, reg)
  19. #define SETBITS_OUTL(mask, reg) __raw_writel(__raw_readl(reg) | mask, reg)
  20. #define CLRBITS_OUTB(mask, reg) __raw_writeb(__raw_readb(reg) & ~mask, reg)
  21. #define CLRBITS_OUTW(mask, reg) __raw_writew(__raw_readw(reg) & ~mask, reg)
  22. #define CLRBITS_OUTL(mask, reg) __raw_writel(__raw_readl(reg) & ~mask, reg)
  23. #define PA_LED PORT_PADR /* LED */
  24. /* BSC */
  25. #define CMNCR 0xA4FD0000UL
  26. #define CS0BCR 0xA4FD0004UL
  27. #define CS2BCR 0xA4FD0008UL
  28. #define CS3BCR 0xA4FD000CUL
  29. #define CS4BCR 0xA4FD0010UL
  30. #define CS5ABCR 0xA4FD0014UL
  31. #define CS5BBCR 0xA4FD0018UL
  32. #define CS6ABCR 0xA4FD001CUL
  33. #define CS6BBCR 0xA4FD0020UL
  34. #define CS0WCR 0xA4FD0024UL
  35. #define CS2WCR 0xA4FD0028UL
  36. #define CS3WCR 0xA4FD002CUL
  37. #define CS4WCR 0xA4FD0030UL
  38. #define CS5AWCR 0xA4FD0034UL
  39. #define CS5BWCR 0xA4FD0038UL
  40. #define CS6AWCR 0xA4FD003CUL
  41. #define CS6BWCR 0xA4FD0040UL
  42. /* usb */
  43. #define PORT_UTRCTL 0xA405012CUL
  44. #define PORT_UCLKCR_W 0xA40A0008UL
  45. #define INTC_ICR0 0xA414FEE0UL
  46. #define INTC_ICR1 0xA4140010UL
  47. #define INTC_ICR2 0xA4140012UL
  48. /* MTD */
  49. #define MPR2_MTD_BOOTLOADER_SIZE 0x00060000UL
  50. #define MPR2_MTD_KERNEL_SIZE 0x00200000UL
  51. #endif /* __ASM_SH_MAGICPANELR2_H */