75 lines · plain
1.. include:: <isonum.txt>2 3============4SM501 Driver5============6 7:Copyright: |copy| 2006, 2007 Simtec Electronics8 9The Silicon Motion SM501 multimedia companion chip is a multifunction device10which may provide numerous interfaces including USB host controller USB gadget,11asynchronous serial ports, audio functions, and a dual display video interface.12The device may be connected by PCI or local bus with varying functions enabled.13 14Core15----16 17The core driver in drivers/mfd provides common services for the18drivers which manage the specific hardware blocks. These services19include locking for common registers, clock control and resource20management.21 22The core registers drivers for both PCI and generic bus based23chips via the platform device and driver system.24 25On detection of a device, the core initialises the chip (which may26be specified by the platform data) and then exports the selected27peripheral set as platform devices for the specific drivers.28 29The core re-uses the platform device system as the platform device30system provides enough features to support the drivers without the31need to create a new bus-type and the associated code to go with it.32 33 34Resources35---------36 37Each peripheral has a view of the device which is implicitly narrowed to38the specific set of resources that peripheral requires in order to39function correctly.40 41The centralised memory allocation allows the driver to ensure that the42maximum possible resource allocation can be made to the video subsystem43as this is by-far the most resource-sensitive of the on-chip functions.44 45The primary issue with memory allocation is that of moving the video46buffers once a display mode is chosen. Indeed when a video mode change47occurs the memory footprint of the video subsystem changes.48 49Since video memory is difficult to move without changing the display50(unless sufficient contiguous memory can be provided for the old and new51modes simultaneously) the video driver fully utilises the memory area52given to it by aligning fb0 to the start of the area and fb1 to the end53of it. Any memory left over in the middle is used for the acceleration54functions, which are transient and thus their location is less critical55as it can be moved.56 57 58Configuration59-------------60 61The platform device driver uses a set of platform data to pass62configurations through to the core and the subsidiary drivers63so that there can be support for more than one system carrying64an SM501 built into a single kernel image.65 66The PCI driver assumes that the PCI card behaves as per the Silicon67Motion reference design.68 69There is an errata (AB-5) affecting the selection of the70of the M1XCLK and M1CLK frequencies. These two clocks71must be sourced from the same PLL, although they can then72be divided down individually. If this is not set, then SM501 may73lock and hang the whole system. The driver will refuse to74attach if the PLL selection is different.75