Staging: add West Bridge Astoria Driver
authorDavid Cross <david.cross@cypress.com>
Sat, 7 Aug 2010 00:29:03 +0000 (17:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 00:20:53 +0000 (17:20 -0700)
commit81eb669b9516b85a2acf4c342db2322bed37d70c
treed5339b0c1d371b6bfeb0984678ca03054f3a8339
parent760ffce8ab13510bb1bf0af22f88df3f855bfa6b
Staging: add West Bridge Astoria Driver

This is a driver for the Cypress West Bridge companion chip. Its
function is analogous to the North/South Bridges of PC environments
applied to embedded devices, in that it expands I/O and storage
capabilities of an embedded processor. The Astoria version, which this
driver applies to, functions as a USB, embedded memory and SDIO
controller. The kernel that this patch was applied to is linux-2.6.35,
although it was tested using the android kernel 2.6.29 running on the
Zoom 2 platform. In this system, it was used primarily as a sideloading
accelerator enabling direct data transfers between a USB host PC and
embedded memory without system overheads.  Minor modifications were also
made to the kernel for this patch. These include changes such as
EXPORTing of fat_get_block in the kernel code. Another function,
mpage_cleardirty was also added to the memory management code. This
function is used to clear the dirty pages from a specific inode. This
allows for direct, file based DMA. None of these changes are believed to
have any negative impact on the kernel and may provide additional
benefit for other developers and drivers.

The driver, as submitted, was placed into the drivers/staging/westbridge
folder as the directory structure it will eventually reside in is not yet
defined. The driver, as placed in staging is divided into four parts:
1) gadget - this implements a gadget peripheral controller and includes IOCTLs
for MTP transfers
2) block -this implements a generic block device driver to enable access to
embedded memory
3) api -this is the Cypress SDK, and includes USB and Storage specific
functions. In addition, it includes common code for low level routines such as
message passing and common data transfer routines
4) hal - this should likely be included in the arch directory as it needs to
be modified for a given platform. The directory structure in the staging area
is meant to reflect the eventual location of where this code likely should be.
It is platform specific. In this case, the HAL included is for the Android
Zoom 2 platform. Here, West Bridge is connected to the GPMC (general purpose
memory controller) of the OMAP3. Specific timing needs to be enabled to ensure
reliable communication.
Many thanks to Greg KH for conducting initial reviews and providing pointers.
Please contact david.cross@cypress.com for questions, concerns or feedback.

Signed-off-by: David Cross <david.cross@cypress.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
68 files changed:
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/westbridge/Kconfig [new file with mode: 0644]
drivers/staging/westbridge/TODO [new file with mode: 0644]
drivers/staging/westbridge/astoria/Kconfig [new file with mode: 0644]
drivers/staging/westbridge/astoria/Makefile [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/Makefile [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasdma.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasintr.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyaslep2pep.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyaslowlevel.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasmisc.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasmtp.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasstorage.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/api/src/cyasusb.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/cyashaldef.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyashalomap_kernel.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasmemmap.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/arch/arm/plat-omap/include/mach/westbridge/westbridge-omap3-pnand-hal/cyasomapdev_kernel.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/block/Kconfig [new file with mode: 0644]
drivers/staging/westbridge/astoria/block/Makefile [new file with mode: 0644]
drivers/staging/westbridge/astoria/block/cyasblkdev_block.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/block/cyasblkdev_queue.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/block/cyasblkdev_queue.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/device/Kconfig [new file with mode: 0644]
drivers/staging/westbridge/astoria/device/Makefile [new file with mode: 0644]
drivers/staging/westbridge/astoria/device/cyandevice_export.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/device/cyasdevice.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/gadget/Kconfig [new file with mode: 0644]
drivers/staging/westbridge/astoria/gadget/Makefile [new file with mode: 0644]
drivers/staging/westbridge/astoria/gadget/cyasgadget.c [new file with mode: 0644]
drivers/staging/westbridge/astoria/gadget/cyasgadget.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/gadget/cyasgadget_ioctl.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanerr.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanmedia.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanmisc.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanregs.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyansdkversion.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanstorage.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyantioch.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyantypes.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyanusb.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyas_cplus_end.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyas_cplus_start.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyascast.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdevice.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasdma.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyaserr.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyashal.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyashalcb.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyashaldoc.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasintr.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyaslep2pep.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyaslowlevel.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmedia.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmisc_dep.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasmtp.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasprotocol.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasregs.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasstorage_dep.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyastoria.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyastsdkversion.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyastypes.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb.h [new file with mode: 0644]
drivers/staging/westbridge/astoria/include/linux/westbridge/cyasusb_dep.h [new file with mode: 0644]