Back to home page

OSCL-LXR

 
 

    


0001 .. include:: <isonum.txt>
0002 
0003 ============
0004 SM501 Driver
0005 ============
0006 
0007 :Copyright: |copy| 2006, 2007 Simtec Electronics
0008 
0009 The Silicon Motion SM501 multimedia companion chip is a multifunction device
0010 which may provide numerous interfaces including USB host controller USB gadget,
0011 asynchronous serial ports, audio functions, and a dual display video interface.
0012 The device may be connected by PCI or local bus with varying functions enabled.
0013 
0014 Core
0015 ----
0016 
0017 The core driver in drivers/mfd provides common services for the
0018 drivers which manage the specific hardware blocks. These services
0019 include locking for common registers, clock control and resource
0020 management.
0021 
0022 The core registers drivers for both PCI and generic bus based
0023 chips via the platform device and driver system.
0024 
0025 On detection of a device, the core initialises the chip (which may
0026 be specified by the platform data) and then exports the selected
0027 peripheral set as platform devices for the specific drivers.
0028 
0029 The core re-uses the platform device system as the platform device
0030 system provides enough features to support the drivers without the
0031 need to create a new bus-type and the associated code to go with it.
0032 
0033 
0034 Resources
0035 ---------
0036 
0037 Each peripheral has a view of the device which is implicitly narrowed to
0038 the specific set of resources that peripheral requires in order to
0039 function correctly.
0040 
0041 The centralised memory allocation allows the driver to ensure that the
0042 maximum possible resource allocation can be made to the video subsystem
0043 as this is by-far the most resource-sensitive of the on-chip functions.
0044 
0045 The primary issue with memory allocation is that of moving the video
0046 buffers once a display mode is chosen. Indeed when a video mode change
0047 occurs the memory footprint of the video subsystem changes.
0048 
0049 Since video memory is difficult to move without changing the display
0050 (unless sufficient contiguous memory can be provided for the old and new
0051 modes simultaneously) the video driver fully utilises the memory area
0052 given to it by aligning fb0 to the start of the area and fb1 to the end
0053 of it. Any memory left over in the middle is used for the acceleration
0054 functions, which are transient and thus their location is less critical
0055 as it can be moved.
0056 
0057 
0058 Configuration
0059 -------------
0060 
0061 The platform device driver uses a set of platform data to pass
0062 configurations through to the core and the subsidiary drivers
0063 so that there can be support for more than one system carrying
0064 an SM501 built into a single kernel image.
0065 
0066 The PCI driver assumes that the PCI card behaves as per the Silicon
0067 Motion reference design.
0068 
0069 There is an errata (AB-5) affecting the selection of the
0070 of the M1XCLK and M1CLK frequencies. These two clocks
0071 must be sourced from the same PLL, although they can then
0072 be divided down individually. If this is not set, then SM501 may
0073 lock and hang the whole system. The driver will refuse to
0074 attach if the PLL selection is different.