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