scm.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * (C) Copyright 2001
  3. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __SCM_H
  24. #define __SCM_H
  25. /*----------------*/
  26. /* CAN Structures */
  27. /*----------------*/
  28. /* Message */
  29. struct can_msg {
  30. uchar ctrl_0;
  31. uchar ctrl_1;
  32. uchar arbit_0;
  33. uchar arbit_1;
  34. uchar arbit_2;
  35. uchar arbit_3;
  36. uchar config;
  37. uchar data[8];
  38. } __attribute__ ((packed));
  39. typedef struct can_msg can_msg_t;
  40. /* CAN Register */
  41. typedef struct can_reg {
  42. uchar ctrl;
  43. uchar status;
  44. uchar cpu_interface;
  45. uchar resv0;
  46. ushort high_speed_rd;
  47. ushort gbl_mask_std;
  48. uint gbl_mask_extd;
  49. uint msg15_mask;
  50. can_msg_t msg1;
  51. uchar clkout;
  52. can_msg_t msg2;
  53. uchar bus_config;
  54. can_msg_t msg3;
  55. uchar bit_timing_0;
  56. can_msg_t msg4;
  57. uchar bit_timing_1;
  58. can_msg_t msg5;
  59. uchar interrupt;
  60. can_msg_t msg6;
  61. uchar resv1;
  62. can_msg_t msg7;
  63. uchar resv2;
  64. can_msg_t msg8;
  65. uchar resv3;
  66. can_msg_t msg9;
  67. uchar p1conf;
  68. can_msg_t msg10;
  69. uchar p2conf;
  70. can_msg_t msg11;
  71. uchar p1in;
  72. can_msg_t msg12;
  73. uchar p2in;
  74. can_msg_t msg13;
  75. uchar p1out;
  76. can_msg_t msg14;
  77. uchar p2out;
  78. can_msg_t msg15;
  79. uchar ser_res_addr;
  80. uchar resv_cs[0x8000-0x100]; /* 0x8000 is the min size for CS */
  81. } can_reg_t;
  82. #endif /* __SCM_H */