magicpanelr2.h 1.8 KB

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