ENGR00142679 SCC2 and SAHARA: changes to support loadable modules
authorAnish Trivedi <anish@freescale.com>
Sun, 3 Jul 2011 20:58:18 +0000 (15:58 -0500)
committerMatt Sealey <matt@genesi-usa.com>
Sun, 3 Jul 2011 20:58:18 +0000 (15:58 -0500)
commitfea4e4245d35416f7a11a8277071165e8b8e8973
tree65d8989d67afa3b77ded639f90a36c70b781bd4c
parentcbd383b0027fc88d4ca31fb115be934a2559845d
ENGR00142679 SCC2 and SAHARA: changes to support loadable modules

To allow SCC2 and SAHARA drivers to work as loadable modules, needed
to add GPL license to SAHARA driver, export a couple of functions
from SCC2 driver, and the following data buffer mapping change in
SAHARA driver:

When compiled as a loadable module, a data buffer to be DMA'ed in the
SAHARA driver may not be in the kernel direct-mapped region but in
the "Kernel module space" between TASK_SIZE and high_memory-1
(see http://www.arm.linux.org.uk/developer/memory.txt). In this
scenario, the driver canno simply use the __pa macro to obtain
the physical address. It must walk the page tables to find the
page and use the page_to_phys function to find the physical
address that corresponds to the data buffer.

Signed-off-by: Anish Trivedi <anish@freescale.com>
drivers/mxc/security/sahara2/sah_driver_interface.c
drivers/mxc/security/sahara2/sah_memory_mapper.c
drivers/mxc/security/scc2_driver.c
drivers/mxc/security/scc2_internals.h