sm501.rst 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. .. include:: <isonum.txt>
  2. ============
  3. SM501 Driver
  4. ============
  5. :Copyright: |copy| 2006, 2007 Simtec Electronics
  6. The Silicon Motion SM501 multimedia companion chip is a multifunction device
  7. which may provide numerous interfaces including USB host controller USB gadget,
  8. asynchronous serial ports, audio functions, and a dual display video interface.
  9. The device may be connected by PCI or local bus with varying functions enabled.
  10. Core
  11. ----
  12. The core driver in drivers/mfd provides common services for the
  13. drivers which manage the specific hardware blocks. These services
  14. include locking for common registers, clock control and resource
  15. management.
  16. The core registers drivers for both PCI and generic bus based
  17. chips via the platform device and driver system.
  18. On detection of a device, the core initialises the chip (which may
  19. be specified by the platform data) and then exports the selected
  20. peripheral set as platform devices for the specific drivers.
  21. The core re-uses the platform device system as the platform device
  22. system provides enough features to support the drivers without the
  23. need to create a new bus-type and the associated code to go with it.
  24. Resources
  25. ---------
  26. Each peripheral has a view of the device which is implicitly narrowed to
  27. the specific set of resources that peripheral requires in order to
  28. function correctly.
  29. The centralised memory allocation allows the driver to ensure that the
  30. maximum possible resource allocation can be made to the video subsystem
  31. as this is by-far the most resource-sensitive of the on-chip functions.
  32. The primary issue with memory allocation is that of moving the video
  33. buffers once a display mode is chosen. Indeed when a video mode change
  34. occurs the memory footprint of the video subsystem changes.
  35. Since video memory is difficult to move without changing the display
  36. (unless sufficient contiguous memory can be provided for the old and new
  37. modes simultaneously) the video driver fully utilises the memory area
  38. given to it by aligning fb0 to the start of the area and fb1 to the end
  39. of it. Any memory left over in the middle is used for the acceleration
  40. functions, which are transient and thus their location is less critical
  41. as it can be moved.
  42. Configuration
  43. -------------
  44. The platform device driver uses a set of platform data to pass
  45. configurations through to the core and the subsidiary drivers
  46. so that there can be support for more than one system carrying
  47. an SM501 built into a single kernel image.
  48. The PCI driver assumes that the PCI card behaves as per the Silicon
  49. Motion reference design.
  50. There is an errata (AB-5) affecting the selection of the
  51. of the M1XCLK and M1CLK frequencies. These two clocks
  52. must be sourced from the same PLL, although they can then
  53. be divided down individually. If this is not set, then SM501 may
  54. lock and hang the whole system. The driver will refuse to
  55. attach if the PLL selection is different.