rb.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * Copyright (C) 2004 IDT Inc.
  13. * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
  14. */
  15. #ifndef __ASM_RC32434_RB_H
  16. #define __ASM_RC32434_RB_H
  17. #include <linux/genhd.h>
  18. #define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(0x18000000))
  19. #define DEV0BASE 0x010000
  20. #define DEV0MASK 0x010004
  21. #define DEV0C 0x010008
  22. #define DEV0T 0x01000C
  23. #define DEV1BASE 0x010010
  24. #define DEV1MASK 0x010014
  25. #define DEV1C 0x010018
  26. #define DEV1TC 0x01001C
  27. #define DEV2BASE 0x010020
  28. #define DEV2MASK 0x010024
  29. #define DEV2C 0x010028
  30. #define DEV2TC 0x01002C
  31. #define DEV3BASE 0x010030
  32. #define DEV3MASK 0x010034
  33. #define DEV3C 0x010038
  34. #define DEV3TC 0x01003C
  35. #define BTCS 0x010040
  36. #define BTCOMPARE 0x010044
  37. #define GPIOBASE 0x050000
  38. #define GPIOCFG 0x050004
  39. #define GPIOD 0x050008
  40. #define GPIOILEVEL 0x05000C
  41. #define GPIOISTAT 0x050010
  42. #define GPIONMIEN 0x050014
  43. #define IMASK6 0x038038
  44. #define LO_WPX (1 << 0)
  45. #define LO_ALE (1 << 1)
  46. #define LO_CLE (1 << 2)
  47. #define LO_CEX (1 << 3)
  48. #define LO_FOFF (1 << 5)
  49. #define LO_SPICS (1 << 6)
  50. #define LO_ULED (1 << 7)
  51. #define BIT_TO_MASK(x) (1 << x)
  52. struct dev_reg {
  53. u32 base;
  54. u32 mask;
  55. u32 ctl;
  56. u32 timing;
  57. };
  58. struct korina_device {
  59. char *name;
  60. unsigned char mac[6];
  61. struct net_device *dev;
  62. };
  63. struct cf_device {
  64. int gpio_pin;
  65. void *dev;
  66. struct gendisk *gd;
  67. };
  68. struct mpmc_device {
  69. unsigned char state;
  70. spinlock_t lock;
  71. void __iomem *base;
  72. };
  73. #endif /* __ASM_RC32434_RB_H */