softing_platform.h 910 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #include <linux/platform_device.h>
  3. #ifndef _SOFTING_DEVICE_H_
  4. #define _SOFTING_DEVICE_H_
  5. /* softing firmware directory prefix */
  6. #define fw_dir "softing-4.6/"
  7. struct softing_platform_data {
  8. unsigned int manf;
  9. unsigned int prod;
  10. /*
  11. * generation
  12. * 1st with NEC or SJA1000
  13. * 8bit, exclusive interrupt, ...
  14. * 2nd only SJA1000
  15. * 16bit, shared interrupt
  16. */
  17. int generation;
  18. int nbus; /* # busses on device */
  19. unsigned int freq; /* operating frequency in Hz */
  20. unsigned int max_brp;
  21. unsigned int max_sjw;
  22. unsigned long dpram_size;
  23. const char *name;
  24. struct {
  25. unsigned long offs;
  26. unsigned long addr;
  27. const char *fw;
  28. } boot, load, app;
  29. /*
  30. * reset() function
  31. * bring pdev in or out of reset, depending on value
  32. */
  33. int (*reset)(struct platform_device *pdev, int value);
  34. int (*enable_irq)(struct platform_device *pdev, int value);
  35. };
  36. #endif