Skip to content

Commit

Permalink
Staging: add West Bridge Astoria Driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Cross authored and Greg Kroah-Hartman committed Aug 31, 2010
1 parent 760ffce commit 81eb669
Show file tree
Hide file tree
Showing 68 changed files with 42,113 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,7 @@ source "drivers/staging/tidspbridge/Kconfig"

source "drivers/staging/quickstart/Kconfig"

source "drivers/staging/westbridge/Kconfig"

endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
1 change: 1 addition & 0 deletions drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ obj-$(CONFIG_EASYCAP) += easycap/
obj-$(CONFIG_SOLO6X10) += solo6x10/
obj-$(CONFIG_TIDSPBRIDGE) += tidspbridge/
obj-$(CONFIG_ACPI_QUICKSTART) += quickstart/
obj-$(CONFIG_WESTBRIDGE_ASTORIA) += westbridge/astoria/
34 changes: 34 additions & 0 deletions drivers/staging/westbridge/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# West Bridge configuration
#

menuconfig WESTBRIDGE
tristate "West Bridge support"
depends on HAS_IOMEM
help
This selects West Bridge Peripheral controller support.

If you want West Bridge support, you should say Y here.

menuconfig WESTBRIDGE_ASTORIA
bool "West Bridge Astoria support"
depends on WESTBRIDGE != n
help
This option enables support for West Bridge Astoria

if WESTBRIDGE_ASTORIA
source "drivers/staging/westbridge/astoria/Kconfig"
endif #WESTBRIDGE_ASTORIA

menuconfig MACH_OMAP3_WESTBRIDGE_AST_PNAND_HAL
bool "WESTBRIDGE OMAP3430 Astoria PNAND HAL"
depends on ARCH_OMAP3 && WESTBRIDGE_ASTORIA
help
Include the OMAP3430 Linux Based HAL

config WESTBRIDGE_DEBUG
bool "West Bridge debugging"
depends on WESTBRIDGE != n
help
This is an option for use by developers; most people should
say N here. This enables WESTBRIDGE core and driver debugging.
7 changes: 7 additions & 0 deletions drivers/staging/westbridge/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TODO:
- checkpatch.pl fixes
- determine where to put the hal and common api code
- modify the driver directory structure in an intuitive way

Please send any patches to Greg Kroah-Hartman <gregkh@suse.de>
and David Cross <david.cross@cypress.com>.
9 changes: 9 additions & 0 deletions drivers/staging/westbridge/astoria/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# West Bridge configuration
#
source "drivers/staging/westbridge/astoria/device/Kconfig"

source "drivers/staging/westbridge/astoria/block/Kconfig"

source "drivers/staging/westbridge/astoria/gadget/Kconfig"

11 changes: 11 additions & 0 deletions drivers/staging/westbridge/astoria/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Makefile for the kernel westbridge device drivers.
#

ifneq ($(CONFIG_WESTBRIDGE_DEBUG),y)
EXTRA_CFLAGS += -WESTBRIDGE_NDEBUG
endif

obj-$(CONFIG_WESTBRIDGE) += device/
obj-$(CONFIG_WESTBRIDGE) += block/
obj-$(CONFIG_WESTBRIDGE) += gadget/
14 changes: 14 additions & 0 deletions drivers/staging/westbridge/astoria/api/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Makefile for the kernel westbridge core.
#

ifeq ($(CONFIG_WESTBRIDGE_DEBUG),n)
EXTRA_CFLAGS += -NDEBUG
endif

obj-$(CONFIG_WESTBRIDGE_DEVICE_DRIVER) += cyasapi.o
cyasapi-y := src/cyasdma.o src/cyasintr.o src/cyaslep2pep.o \
src/cyaslowlevel.o src/cyasmisc.o src/cyasmtp.o \
src/cyasstorage.o src/cyasusb.o


Loading

0 comments on commit 81eb669

Please sign in to comment.