sitara-epos/sitara-epos-kernel.git
10 years agomusb: select fifo_mode at runtime
Ravi B [Mon, 6 Dec 2010 13:01:08 +0000 (18:31 +0530)]
musb: select fifo_mode at runtime

OMAP35x han an errata restricting active endpoints to use either
first 8K or next 8K of FIFO space while this issue has been
fixed in OMAP3630.

This issue requires the OMAP35x platform to use fifo_mode=5 but
OMAP3630 and AM35x can use fifo_mode=4 which utilises entire 16K
of FIFO.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agomusb: Fixes for DTM tests.
Ravi B [Mon, 6 Dec 2010 12:56:05 +0000 (18:26 +0530)]
musb: Fixes for DTM tests.

Fixes all the DTM tests except mini6sendrecv tests.

Signed-off-by: Ravi B <ravibabu@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agomusb: kill unwanted messages
Ajay Kumar Gupta [Tue, 29 Sep 2009 11:16:52 +0000 (16:46 +0530)]
musb: kill unwanted messages

Remives below messages:
musb_bus_suspend 2285: trying to suspend as a_wait_bcon while active
....
....

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agomusb: Add back old musb procfs file
Ajay Kumar Gupta [Mon, 22 Nov 2010 11:23:26 +0000 (16:53 +0530)]
musb: Add back old musb procfs file

Procfs file is removed from musb and an equivalent debugfs is
expected to replace it.

Adding the old file back to retain the debug functionalities untill
we get debugfs equivalent in mainline.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agomusb: Inform user when gadget cable is disconnected
Ajay Kumar Gupta [Fri, 28 May 2010 12:31:30 +0000 (18:01 +0530)]
musb: Inform user when gadget cable is disconnected

Currently we don't see any message to inform user that gadget cable is
successfully disconnected leading to suspicion if everything is fine at
driver therefore adding an informative print message in gadget
disconnect path.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agomusb: disable PING on status phase of control transfer
Ajay Kumar Gupta [Fri, 12 Jun 2009 13:37:13 +0000 (19:07 +0530)]
musb: disable PING on status phase of control transfer

PING token is not mandatory in status phase of control transfer
so some high speed USB sticks doesn't support this.If such devices
are connected to MUSB then they would not respond to PING token
causing delayed or failed enumeration.

Fixing this issue by disabling PING token in status phase of control
transfers.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoRevert: "musb: otg timer cleanup"
Ajay Kumar Gupta [Mon, 22 Nov 2010 11:17:22 +0000 (16:47 +0530)]
Revert: "musb: otg timer cleanup"

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoRevert "musb: make initial HNP roleswitch work (v2)"
Ajay Kumar Gupta [Fri, 28 May 2010 11:32:58 +0000 (17:02 +0530)]
Revert "musb: make initial HNP roleswitch work (v2)"

This reverts commit 1de00dae8036dfee44ebea2c38f942fb6072e0b7.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoRevert: "musb: support disconnect after HNP roleswitch"
Ajay Kumar Gupta [Fri, 28 May 2010 11:32:00 +0000 (17:02 +0530)]
Revert: "musb: support disconnect after HNP roleswitch"

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: implement runtime is_inventra_dma/is_cppi_enabled/tusb_dma_omap
Ming Lei [Thu, 23 Dec 2010 15:14:03 +0000 (23:14 +0800)]
usb: musb: implement runtime is_inventra_dma/is_cppi_enabled/tusb_dma_omap

Now we can implement the three helpers below in runtime method:

is_inventra_dma/is_cppi_enabled/tusb_dma_omap

so we can build all hw glue drivers, dma drivers and musb_hdrc into
one single binary image to support musb on mulitple machines.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: pass musb pointer to is_cppi_enabled helper
Ming Lei [Thu, 23 Dec 2010 15:14:02 +0000 (23:14 +0800)]
usb: musb: pass musb pointer to is_cppi_enabled helper

This patch passes musb pointer to is_cppi_enabled to
prepare for support of runtime is_cppi_enabled.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: pass musb pointer to tusb_dma_omap helper
Ravi B [Tue, 14 Jun 2011 09:36:25 +0000 (15:06 +0530)]
usb: musb: pass musb pointer to tusb_dma_omap helper

This patch passes musb pointer to tusb_dma_omap to
prepare for support of runtime tusb_dma_omap.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: pass musb pointer to is_inventra_dma helper
Ravi B [Tue, 14 Jun 2011 09:34:19 +0000 (15:04 +0530)]
usb: musb: pass musb pointer to is_inventra_dma helper

This patch passes musb pointer to is_inventra_dma to
prepare for support runtime is_inventra_dma.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove CONFIG_USB_*_DMA in source code of musb core driver
Ming Lei [Thu, 23 Dec 2010 15:13:59 +0000 (23:13 +0800)]
usb: musb: remove CONFIG_USB_*_DMA in source code of musb core driver

This patch uses the three helpers below:
is_inventra_dma/is_cppi_enabled/tusb_dma_omap
to replace the options of CONFIG_USB_*_DMA.

The method was applied in musb_host.c before(using
is_cppi_enabled & tusb_dma_omap to replace using
'ifdef CONFIG_USB_*_DMA',  and don't introduce any
performance loss since compiler is smart enough to
handle this cases.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: introduce is_inventra_dma helper
Ming Lei [Thu, 23 Dec 2010 15:13:58 +0000 (23:13 +0800)]
usb: musb: introduce is_inventra_dma helper

This patch introduces is_inventra_dma helper, so that
we can remove dependency on CONFIG_USB_INVENTRA_DMA
in source file of musb core driver in later patches.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: print dma type in runtime way
Ming Lei [Thu, 23 Dec 2010 15:13:57 +0000 (23:13 +0800)]
usb: musb: print dma type in runtime way

We will support multiple dma controller type in one single
musb core driver(binary), so print dma type by the
information from hw glue driver.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove 'ifdef CONFIG_USB_INVENTRA_DMA' for comments only
Ming Lei [Thu, 23 Dec 2010 15:13:56 +0000 (23:13 +0800)]
usb: musb: remove 'ifdef CONFIG_USB_INVENTRA_DMA' for comments only

This comments has said clearly that they are for Mentor(INVENTRA) DMA
controller, so remove this unnecessary ifdef to make code more clean.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove exit symbol to avoid using of ifdef in musb_g_rx
Ming Lei [Thu, 23 Dec 2010 15:13:55 +0000 (23:13 +0800)]
usb: musb: remove exit symbol to avoid using of ifdef in musb_g_rx

Remove one 'ifdef' and one 'exit' symbol to make code more cleaner.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove duplicated define of tusb_dma_omap
Ming Lei [Thu, 23 Dec 2010 15:13:54 +0000 (23:13 +0800)]
usb: musb: remove duplicated define of tusb_dma_omap

tusb_dma_omap is defined in musb_dma.h already and same with
it in tusb6010.h, so remove the definition in tusb6010.h.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: support each dma controller driver built as module
Ravi B [Tue, 14 Jun 2011 08:57:52 +0000 (14:27 +0530)]
usb: musb: support each dma controller driver built as module

This patch provides support for building each dma controller driver
as standalone module, and this modules can be built into one same
image and can be used by each hw glue driver.

HW glue driver has the knowledge of which type of dma controller will
be used, and can pass the knowledge into musb core driver via glue ops,
so we can take runtime method to support all hw controller and its dma
controller in one binary musb driver.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: define DMA controller related flags and callbacks in glue ops
Ming Lei [Thu, 23 Dec 2010 15:13:52 +0000 (23:13 +0800)]
usb: musb: define DMA controller related flags and callbacks in glue ops

Each musb hw controller may use different DMA controller, so we
introduce dma controller related flags and callbacks in glue ops.
HW glue driver can provide its dma controller information to
musb core with this flags and callbacks, so we can make musb core
more generic and avoid to depend on the ugly macro below as far as
possible:

CONFIG_USB_INVENTRA_DMA
CONFIG_USB_TUSB_OMAP_DMA
CONFIG_USB_TI_CPPI_DMA

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: same MUSB_OFFSET/musb_ep_select for all controller
Ravi B [Tue, 14 Jun 2011 08:53:22 +0000 (14:23 +0530)]
usb: musb: same MUSB_OFFSET/musb_ep_select for all controller

The patch uses the information about hw endpoint register address
mapping from hw glue driver to implement MUSB_OFFSET/musb_ep_select
for different cases.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: pass musb pointer into musb_ep_select & MUSB_EP_OFFSET
Ming Lei [Thu, 23 Dec 2010 15:13:50 +0000 (23:13 +0800)]
usb: musb: pass musb pointer into musb_ep_select & MUSB_EP_OFFSET

This patche adds the paramer of musb pointer to musb_ep_select
and MUSB_EP_OFFSET, then we can pass musb into this two helpers
and can give corresponding implementation for flat mappings and
indexed mappings of hw endpoint register address using the information
from hw glue driver.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: simplify musb_ep_select&MUSB_EP_OFFSET for different hardware
Ming Lei [Thu, 23 Dec 2010 15:13:49 +0000 (23:13 +0800)]
usb: musb: simplify musb_ep_select&MUSB_EP_OFFSET for different hardware

In fact, for tusb, musb_ep_select and MUSB_EP_OFFSET are same with
that for indexed mapping, so merge the two cases to simplify
definition of the two helpers.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: same musb_readb/musb_writeb in single image to support multiple machines
Ming Lei [Thu, 23 Dec 2010 15:13:48 +0000 (23:13 +0800)]
usb: musb: same musb_readb/musb_writeb in single image to support multiple machines

This patch introduces musb_readb/musb_writeb function pointer,
so that we can use same musb_readb/musb_writeb in one single
binary image to help to support multiple machines.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove musb_in_tusb
Ming Lei [Thu, 23 Dec 2010 15:13:47 +0000 (23:13 +0800)]
usb: musb: remove musb_in_tusb

Remove musb_in_tusb since no one may use it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: handle tusb fifo style by runtime method
Ming Lei [Thu, 23 Dec 2010 15:13:46 +0000 (23:13 +0800)]
usb: musb: handle tusb fifo style by runtime method

This patch introduces MUSB_GLUE_TUSB_STYLE flag, which
can be used to handle tusb dependent things by runtime
method instead of previous static method.

This patch handles tusb fifo style according to the flag
of MUSB_GLUE_TUSB_STYLE passed from hw glue drivers.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: introduce flags field into musb_platform_ops
Ming Lei [Thu, 23 Dec 2010 15:13:45 +0000 (23:13 +0800)]
usb: musb: introduce flags field into musb_platform_ops

This patch introduces flags field into musb_platform_ops,
so we can handle hw glue difference in musb core driver
from the information of .flags, then we can remove the
ugly macros of hw glue related to help to make one image
working for multiple machines in later patches.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: pass fifo_mode from hw glue driver
Ming Lei [Thu, 23 Dec 2010 15:13:44 +0000 (23:13 +0800)]
usb: musb: pass fifo_mode from hw glue driver

Each hw controller may have different fifo configuraion,
so passing fifo_mode from hw glue is very reasonable.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: use platform_driver_register to register musb_hdrc driver
Ming Lei [Thu, 23 Dec 2010 15:13:43 +0000 (23:13 +0800)]
usb: musb: use platform_driver_register to register musb_hdrc driver

Since hw glue drivers may depend on musb_hdrc and musb_init will return
failure if no glue device is registered, this patch fixes the issue
by registering musb_hdrc driver first.

Also this patch replaces most of __init with __devinit to support
platform_driver_register.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: use native read_fifo/write_fifo for each hw glue driver
Ming Lei [Thu, 23 Dec 2010 15:13:41 +0000 (23:13 +0800)]
usb: musb: use native read_fifo/write_fifo for each hw glue driver

This patch uses native read_fifo/write_fifo for each hw glue driver.
Musb core can always use musb->ops->*_fifo to do PIO, also removes
some ugly ifdef for musb_read_fifo/musb_write_fifo.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: introduce read_fifo/write_fifo callback in glue ops
Ming Lei [Thu, 23 Dec 2010 15:13:40 +0000 (23:13 +0800)]
usb: musb: introduce read_fifo/write_fifo callback in glue ops

This patch introduces read_fifo/write_fifo callback in glue ops,
so that we can make musb in one single images working on multiple
boards.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: support to compile hw glue layer driver as module
Ming Lei [Thu, 23 Dec 2010 15:13:39 +0000 (23:13 +0800)]
usb: musb: support to compile hw glue layer driver as module

Obviously hw glue layer driver should be compiled as module,
which can help to build one single image to support multiple machines.

also merged
usb: musb: allow all hw glue modules built into one single image

This patch allows all hw glue drivers to be built into one single
image, so that we can support one single image to be run in multiple
machines.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Sriramakrishnan A G <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: export some symbols for glue driver access
Ming Lei [Thu, 23 Dec 2010 15:13:38 +0000 (23:13 +0800)]
usb: musb: export some symbols for glue driver access

Export this functions so that glue drivers can see them if glue drivers
are built as modules.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
10 years agousb: musb: introduce get_hw_revision callback in glue ops
Ming Lei [Thu, 23 Dec 2010 15:13:37 +0000 (23:13 +0800)]
usb: musb: introduce get_hw_revision callback in glue ops

This patch introduces get_hw_revision callback in glue_ops,
and implement it in tusb glue driver, so tusb dma code can
get tusb revision via .get_hw_revision callback and we can
make glue drivers built as module easyly in later patches.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agousb: musb: remove extern qualifier from musb_debug.h header
Vladimir Zapolskiy [Mon, 19 Dec 2011 14:54:02 +0000 (16:54 +0200)]
usb: musb: remove extern qualifier from musb_debug.h header

This change removes confusing extern qualifier, which doesn't have any practical
sense there.

Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@nokia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: cleanup kconfig
Felipe Contreras [Tue, 20 Dec 2011 00:42:27 +0000 (02:42 +0200)]
usb: musb: cleanup kconfig

The whole thing depends on USB_MUSB_HDRC, just add an 'if'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: trivial Kconfig cleanups
Felipe Contreras [Tue, 20 Dec 2011 00:42:22 +0000 (02:42 +0200)]
usb: musb: trivial Kconfig cleanups

Shuffle the code a bit so the description is at the top.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agomusb: omap2430: avoid pm_runtime_disable()
Felipe Contreras [Mon, 19 Dec 2011 20:17:51 +0000 (22:17 +0200)]
musb: omap2430: avoid pm_runtime_disable()

These are handled by drivers core, and in a way that doesn't wake up the
devices.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: remove a bit of indentation
Felipe Contreras [Mon, 19 Dec 2011 20:17:50 +0000 (22:17 +0200)]
usb: musb: remove a bit of indentation

And use dev instead of musb->controller.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: trivial cleanup
Felipe Contreras [Mon, 19 Dec 2011 20:17:49 +0000 (22:17 +0200)]
usb: musb: trivial cleanup

enabled && driver || !enabled can be simplified to !enabled || driver.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: fix pm_runtime mismatch
Felipe Contreras [Mon, 19 Dec 2011 20:01:54 +0000 (22:01 +0200)]
usb: musb: fix pm_runtime mismatch

In musb_init_controller() there's a pm_runtime_put(), but there's no
pm_runtime_get(), which creates a mismatch that causes the driver to
sleep when it shouldn't.

This was introduced in 7acc619[1], but it wasn't triggered in my setup
until 18a2689[2] was merged to Linus' branch at point df0914[3]. IOW;
when PM is working as it was supposed to.

However, it seems most of the time this is used in a way that keeps the
counter above 0, so nobody noticed. Also, it seems to depend on the
configuration used in versions before 3.1, but not later (or in it).

I found the problem by loading isp1704_charger before any usb gadgets:
http://article.gmane.org/gmane.linux.kernel/1226122

All versions after 2.6.39 are affected.

[1] usb: musb: Idle path retention and offmode support for OMAP3
[2] OMAP2+: musb: hwmod adaptation for musb registration
[3] Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

Cc: stable@vger.kernel.org
Cc: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: omap2430: fix compile warning
Felipe Balbi [Thu, 24 Nov 2011 13:42:10 +0000 (15:42 +0200)]
usb: musb: omap2430: fix compile warning

fix the following compile warning:

drivers/usb/musb/omap2430.c: In function 'musb_otg_notifier_work':
drivers/usb/musb/omap2430.c:279:3: warning: 'return' with a value, in
function returning void
drivers/usb/musb/omap2430.c:282:2: warning: 'return' with a value, in
function returning void

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: fix pm_runtime calls while atomic
Vikram Pandita [Fri, 12 Aug 2011 14:38:51 +0000 (07:38 -0700)]
usb: musb: fix pm_runtime calls while atomic

musb pm_runtime_get_sync call happens in intrrupt context on cable attach case
That can result in re-enabling the interrupts and cause side affects.

So move the code to a work queue.

Following is the error path hit on cable attach:

BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:802
in_atomic(): 0, irqs_disabled(): 0, pid: 18, name: irq/378-twl6030

Backtrace:
[<c00520f0>] (dump_backtrace+0x0/0x110) from [<c054f454>] (dump_stack+0x18/0x1c)
[<c054f43c>] (dump_stack+0x0/0x1c) from [<c007f59c>] (__might_sleep+0x130/0x134)
[<c007f46c>] (__might_sleep+0x0/0x134) from [<c02c2794>] (__pm_runtime_resume+0x94/0x98)
[<c02c2700>] (__pm_runtime_resume+0x0/0x98) from [<c033e7e4>] (musb_otg_notifications+0x9c/0x164)
[<c033e748>] (musb_otg_notifications+0x0/0x164) from [<c00b3df0>] (notifier_call_chain+0x4c/0x8c)
[<c00b3da4>] (notifier_call_chain+0x0/0x8c) from [<c00b44a8>] (__atomic_notifier_call_chain+0x40/0x54)
[<c00b4468>] (__atomic_notifier_call_chain+0x0/0x54) from [<c00b44dc>] (atomic_notifier_call_chain+0x20/0x28)
[<c00b44bc>] (atomic_notifier_call_chain+0x0/0x28) from [<c033f124>] (twl6030_usb_irq+0xc8/0xdc)
[<c033f05c>] (twl6030_usb_irq+0x0/0xdc) from [<c00d79f8>] (irq_thread_fn+0x24/0x40)
[<c00d79d4>] (irq_thread_fn+0x0/0x40) from [<c00d7b64>] (irq_thread+0x150/0x1d8)
[<c00d7a14>] (irq_thread+0x0/0x1d8) from [<c00adf70>] (kthread+0x94/0x98)
[<c00adedc>] (kthread+0x0/0x98) from [<c0094388>] (do_exit+0x0/0x720)

Tested with:
MUSB Device mode: Cold boot / Hot plug
MUSB Host mode: Cold boot / Hot plug

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: drop ARCH dependency
Felipe Balbi [Fri, 14 Oct 2011 07:22:29 +0000 (10:22 +0300)]
usb: musb: drop ARCH dependency

musb core driver and tusb6010 glue layer don't
depend on anything which is ARCH-specific. It
builds fine on x86 and ARM. Dropping the dependency
so we can compile-test on linux-next.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: headers cleanup
Felipe Balbi [Fri, 14 Oct 2011 07:45:15 +0000 (10:45 +0300)]
usb: musb: headers cleanup

Remove a few unnecessary headers from a
few files.

Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: allow building USB_MUSB_TUSB6010 as a module
Arnd Bergmann [Sun, 2 Oct 2011 14:45:47 +0000 (16:45 +0200)]
usb: musb: allow building USB_MUSB_TUSB6010 as a module

Commit 1376d92f9 "usb: musb: allow musb and glue layers to be modules"
made the USB_MUSB_TUSB6010 option modular, but actually building
the driver as a module does not work, so various randconfig builds
actually fail. This changes all code that depends on the
option to also check for modular builds, and exports the necessary
symbols.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: use a Kconfig choice to pick the right DMA method
Arnd Bergmann [Sun, 2 Oct 2011 14:45:45 +0000 (16:45 +0200)]
usb: musb: use a Kconfig choice to pick the right DMA method

The logic to allow only one DMA driver in MUSB is currently
flawed, because it also allows picking no DMA driver at all
and also not selecting PIO mode.

Using a choice statement makes this foolproof for now and
also simplifies the Makefile.

Unfortunately, we will have to revisit this when we start
supporting multiple ARM platforms in a single kernel binary,
because at that point we will actually need to select
multiple DMA drivers and pick the right one at run-time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: omap2+: save and restore OTG_INTERFSEL
Hema HK [Wed, 7 Sep 2011 16:19:24 +0000 (09:19 -0700)]
usb: musb: omap2+: save and restore OTG_INTERFSEL

we need to save and restore OTG_INTERFSEL register
else we will be unable to function on resume after
OFF mode.

Reported-by: Devaraj Rangasamy <dev@ti.com>
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: omap2+: fix context api's
Vikram Pandita [Wed, 7 Sep 2011 16:19:23 +0000 (09:19 -0700)]
usb: musb: omap2+: fix context api's

RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr
are all indexed registers.

So before doing a context save or restore, INDEX register
should be set, then only one gets to the right register offset.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: musb: ux500: optimize DMA callback routine
Per Forlin [Wed, 17 Aug 2011 09:03:40 +0000 (11:03 +0200)]
usb: musb: ux500: optimize DMA callback routine

Skip the use of work queue and call musb_dma_completion() directly from
DMA callback context.

Here follows measurements on a Snowball board with ondemand governor active.

Performance using work queue:
(105 MB) copied, 6.23758 s, 16.8 MB/s
(105 MB) copied, 5.7151 s, 18.3 MB/s
(105 MB) copied, 5.83583 s, 18.0 MB/s
(105 MB) copied, 5.93611 s, 17.7 MB/s

Performance without work queue
(105 MB) copied, 5.62173 s, 18.7 MB/s
(105 MB) copied, 5.61811 s, 18.7 MB/s
(105 MB) copied, 5.57817 s, 18.8 MB/s
(105 MB) copied, 5.58549 s, 18.8 MB/s

Signed-off-by: Per Forlin <per.forlin@linaro.org>
Acked-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: rename usb_gadget_driver::speed to max_speed
Michal Nazarewicz [Sat, 19 Nov 2011 17:27:38 +0000 (18:27 +0100)]
usb: gadget: rename usb_gadget_driver::speed to max_speed

This commit renames the “speed” field of the usb_gadget_driver
structure to “max_speed”.  This is so that to make it more
apparent that the field represents the maximum speed gadget
driver can support.

This also make the field look more like fields with the same
name in usb_gadget and usb_composite_driver structures.  All
of those represent the *maximal* speed given entity supports.

After this commit, there are the following fields in various
structures:
* usb_gadget::speed - the current connection speed,
* usb_gadget::max_speed - maximal speed UDC supports,
* usb_gadget_driver::max_speed - maximal speed gadget driver
  supports, and
* usb_composite_driver::max_speed - maximal speed composite
  gadget supports.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: replace usb_gadget::is_dualspeed with max_speed
Michal Nazarewicz [Sat, 19 Nov 2011 17:27:37 +0000 (18:27 +0100)]
usb: gadget: replace usb_gadget::is_dualspeed with max_speed

This commit replaces usb_gadget's is_dualspeed field with
a max_speed field.

[ balbi@ti.com : Fixed DWC3 driver ]

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agotreewide: Fix comment and string typo 'bufer'
Paul Bolle [Mon, 5 Dec 2011 12:00:34 +0000 (13:00 +0100)]
treewide: Fix comment and string typo 'bufer'

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
10 years agoarm:omap:am33xx: Add TSC driver board hookup
Patil, Rachna [Tue, 4 Oct 2011 14:39:58 +0000 (20:09 +0530)]
arm:omap:am33xx: Add TSC driver board hookup

Also enable the driver config option in defconfig

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335X: add touchscreen driver of AM335X
Patil, Rachna [Tue, 4 Oct 2011 14:38:57 +0000 (20:08 +0530)]
AM335X: add touchscreen driver of AM335X

This patch adds all the necessary changes to
add touchscreen driver present inside am335x.
The controller is a 4/5/8 wire resistive panel that is
directly fed to the ADC.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335X: CPSW fix for recursive locking
Chandan Nath [Thu, 22 Sep 2011 05:51:52 +0000 (11:21 +0530)]
AM335X: CPSW fix for recursive locking

This patch is added to remove recursive locking seen in
cpsw deinitializing function. spin_lock_irqsave() is called
recursively with same resource in both cpdma_chan_stop and
__cpdma_chan_process functions which leads to recursive locking
and so multiple locking is removed.

Signed-off-by: Chandan Nath <chandan.nath@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335X: CPSW pinmux configuration. (SOC related)
Chandan Nath [Tue, 4 Oct 2011 14:34:56 +0000 (20:04 +0530)]
AM335X: CPSW pinmux configuration. (SOC related)

This patch adds cpsw pinmux configuration for different boards

Signed-off-by: Chandan Nath <chandan.nath@ti.com>
Conflicts:

arch/arm/mach-omap2/devices.c
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: reset support
Afzal Mohammed [Tue, 4 Oct 2011 14:24:19 +0000 (19:54 +0530)]
arm:omap:am33xx: reset support

Global cold reset on machine reboot

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335X: Enable frame buffer and backlight driver in default EVM defconfig
Manjunathappa, Prakash [Wed, 14 Sep 2011 07:04:19 +0000 (12:34 +0530)]
AM335X: Enable frame buffer and backlight driver in default EVM defconfig

This patch enables the da8xx-fb frame buffer device, frame buffer console
and backlight driver.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agobacklight: Add TLC59108 backlight control driver
Manjunathappa, Prakash [Mon, 1 Aug 2011 12:55:11 +0000 (18:25 +0530)]
backlight: Add TLC59108 backlight control driver

This patch adds support for I2C configurable TLC59108 backlight
control driver.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agovideo: da8xx-fb: Add API to register wait for vsync callback
Manjunathappa, Prakash [Tue, 23 Aug 2011 09:42:36 +0000 (15:12 +0530)]
video: da8xx-fb: Add API to register wait for vsync callback

This patch adds APIs to register and unregister wait for vsync
callback.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoda850/omap-l138: Correct the information returned by fbset
Sudhakar Rajashekhara [Thu, 13 Jan 2011 11:12:00 +0000 (16:42 +0530)]
da850/omap-l138: Correct the information returned by fbset

This patch corrects the wrong information reported by fbset
command. This was reported by Martin Ambrose.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoda8xxfb.c: Corrected the da8xx FB parameters for da850/omap-l138
Madhvapathi Sriram [Thu, 13 Jan 2011 10:57:45 +0000 (16:27 +0530)]
da8xxfb.c: Corrected the da8xx FB parameters for da850/omap-l138

The vfp and the vbp parameters were needed to be modified for
LK043T1DG01 display panel. Without this modification, the first
line would be cropped and not be visible on the display.

Signed-off-by: Madhvapathi Sriram <sriram.m@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agofb: da8xx: fix LCD becoming non-responsive after multiple suspends
Sekhar Nori [Thu, 13 Jan 2011 10:21:28 +0000 (15:51 +0530)]
fb: da8xx: fix LCD becoming non-responsive after multiple suspends

It is observed that LCD becomes non-responsive (does not
take new data) after multiple suspend resume operations.
This patch fixes that issue.

In suspend:
1) After disabling raster, wait for current frame to finish
   before disabling LCD module clock.
2) Power down the panel after raster is disabled.

On resume, enable the LCD module before panel is powered up.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoda850: GLCD: Workaround for LCDC Underflow During Initialization
Rajashekhara, Sudhakar [Thu, 13 Jan 2011 10:10:05 +0000 (15:40 +0530)]
da850: GLCD: Workaround for LCDC Underflow During Initialization

During LCDC initialization, there is the potential for a FIFO
underflow condition to occur. A FIFO underflow condition
occurs when the input FIFO is completely empty and the LCDC
raster controller logic that drives data to the output pins
attempts to fetch data from the FIFO. When a FIFO underflow
condition occurs, incorrect data will be driven out on the
LCDC data pins.

Software should poll the FUF bit field in the LCD_STAT register
to check if an error condition has occurred or service the
interrupt if FUF_EN is enabled when FUF occurs. If the FUF bit
field has been set to 1, this will indicate an underflow
condition has occurred and then the software should execute a
reset of the LCDC via the LPSC.

This problem may occur if the LCDC FIFO threshold size
(LCDDMA_CTRL[TH_FIFO_READY]) is left at its default value after
reset. Increasing the FIFO threshold size will reduce or
eliminate underflows. Setting the threshold size to 256 double
words or larger is recommended.

Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoda8xx: Fix GLCD initialization sequence
Vaibhav Hiremath [Sat, 26 Nov 2011 18:30:41 +0000 (00:00 +0530)]
da8xx: Fix GLCD initialization sequence

Sometimes system comes up with a 'white screen' on the LCD after
boot, and nothing is ever displayed. This was consistent with the
'reset' button (or linux reboot). This is fixed by switching off
and switching on the panel power and backlight after enabling
raster. Earlier this sequence was done before enabling the raster.

Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335X: Enable LCDC on AM335X
Vaibhav Hiremath [Sat, 26 Nov 2011 17:41:04 +0000 (23:11 +0530)]
AM335X: Enable LCDC on AM335X

Adding pinmux, platform resource information. Also add
AM335X panel inforamtion.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add LCDC platform hookup and init code
Vaibhav Hiremath [Sat, 26 Nov 2011 16:41:01 +0000 (22:11 +0530)]
arm:omap:am33xx: Add LCDC platform hookup and init code

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agovideo:da8xx-fb: Add 24bpp LCD configuration support
Manjunathappa, Prakash [Tue, 13 Sep 2011 11:16:42 +0000 (16:46 +0530)]
video:da8xx-fb: Add 24bpp LCD configuration support

LCD controller on am335x supports 24bpp raster configuration in addition
to ones on da850. LCDC also supports 24bpp in unpacked format having
ARGB:8888 32bpp format data in DDR, but it doesn't interpret Alpha
component of the data.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
10 years agogpio:omap: Handle am33xx gpio
Vaibhav Hiremath [Sat, 26 Nov 2011 11:30:33 +0000 (17:00 +0530)]
gpio:omap: Handle am33xx gpio

gpio for am33xx is similar to that of omap4, add cpu_is_am33xx()
so that driver handles am33xx gpio similar to that of omap4.

Also, cpu_is_omap34xx() is true for am335x. However, not all gpio
code is common between omap34xx & am335x. So take care accordingly when
similar code overlaps.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add separate defconfig for AM335X
Hebbar, Gururaja [Mon, 19 Sep 2011 14:45:36 +0000 (20:15 +0530)]
arm:omap:am33xx: Add separate defconfig for AM335X

Since am335x involves drivers different from other OMAP Variants, add
separate defconfig

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: register edma platform
Hebbar, Gururaja [Tue, 4 Oct 2011 12:45:12 +0000 (18:15 +0530)]
arm:omap:am33xx: register edma platform

Chnages
- AM33XX has Three Transfer Controllers. Platform data added for am33xx
- Add xbar mapping for MMCHS2. Since MMCHS edma Event is xbar mapped,
  proper mapping is added when registering xbar structure. This mapping
  uses edma event 12 & 13 which is not used on AM33xx SOC

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:Kconfig: Add edma option
Vaibhav Hiremath [Thu, 15 Dec 2011 06:16:15 +0000 (11:46 +0530)]
arm:omap:Kconfig: Add edma option

This allows tp enable EDMA support.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoTI81xx: (cust) Add SDMA to EDMA wrapper.
Sriramakrishnan [Fri, 11 Feb 2011 06:36:23 +0000 (12:06 +0530)]
TI81xx: (cust) Add SDMA to EDMA wrapper.

Some of the modules are common between OMAP3 and TI81xx. These
modules use SDMA on OMAP3 and EDMA on TI81xx. Add a wrapper for
translating between the SDMA to EDMA API. Need to migrate to a common
DMA interface in the future for co-existence

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Sriramakrishnan <srk@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add support for EDMA
Sundaram Raju [Tue, 27 Apr 2010 05:49:30 +0000 (11:19 +0530)]
arm:omap:am33xx: Add support for EDMA

Base from
- edma.c is dma.c from arch/arm/mach-davinci
- edma.h is edma.h from arch/arm/mach-davinci/include/mach
- both the files are copied to new locations

Changes
- to account for change in header file location
- added more callback functions to service upto 4 TCs
- Changed edma_init into a subsys call to ensure that edma is registered
  before it is probed
- Code added to support the crossbar
- Certain definitions and functions in edma.c moved to header file
  edma.h so that they can be used in the platform specific file devices.c
- Removed dead code that services non existing TC IRQs

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Sundaram Raju <sundaram@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: LCD backlight support
Afzal Mohammed [Wed, 21 Dec 2011 08:10:14 +0000 (13:40 +0530)]
arm:omap:am33xx: LCD backlight support

Turn on LCD backlight based on board and
profile detected (i.e if LCD is present)

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
10 years agoarm:omap:am33xx: add CPSW platform hookup support
Chandan Nath [Tue, 4 Oct 2011 11:21:53 +0000 (16:51 +0530)]
arm:omap:am33xx: add CPSW platform hookup support

Signed-off-by: Chandan Nath <chandan.nath@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap2plus: Enable ethernet driver (CPDMA, MDIO and CPSW)
Vaibhav Hiremath [Sat, 26 Nov 2011 10:56:24 +0000 (16:26 +0530)]
arm:omap2plus: Enable ethernet driver (CPDMA, MDIO and CPSW)

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agodriver:ethernet: Add CPSW driver
Vaibhav Hiremath [Sat, 26 Nov 2011 10:54:40 +0000 (16:24 +0530)]
driver:ethernet: Add CPSW driver

This patch adds support for TI's CPSW driver along with
CPSW ALE driver.

Signed-off-by: Chandan Nath <chandan.nath@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Update EVM Detection and handling
Vaibhav Hiremath [Sat, 26 Nov 2011 10:34:01 +0000 (16:04 +0530)]
arm:omap:am33xx: Update EVM Detection and handling

AM335X EVM comes in 4 flavours. The type of EVM is encoded in the EEPROM
on the Baseboard.

This patch provides api to read this data from eeprom & setup/configure
the evm/devices accordingly. Also, Profile data is retrieved by reading
the CPLD on the daughter board.

In case the eeprom read fails or if thh data is invalid, the fallback
option selects General Purpose EVM with Daughter board connected in
Profile 0.

Also, This patch adds support for BETA EVM.
BETA EVM is set as the default configuration.
Since the peripherals were supported only in profile 0 for
alpha EVM, It makes use of the exisiting GP EVM structure.

Flag gp_evm_revision can be used to differentiate between the
revisions of the GP EVM.

Also, there exist Alpha EVMs with a version string of 1.0B as
well as 1.0A.
Make our revision detection logic check for just 1.0 and rename
defines to match.

Signed-off-by: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
10 years agoarm:omap:am33xx: board_init pin mux initialization
Afzal Mohammed [Tue, 4 Oct 2011 10:06:25 +0000 (15:36 +0530)]
arm:omap:am33xx: board_init pin mux initialization

Configure I2C0 pin mux in board init, required for
board detection (read eeprom). Also add function
for dynamic pin mux.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx:TEMP: Create board support and enable build for AM335XEVM
Vaibhav Hiremath [Sat, 26 Nov 2011 10:28:03 +0000 (15:58 +0530)]
arm:omap:am33xx:TEMP: Create board support and enable build for AM335XEVM

This patch adds minimal support and build configuration for
AM335X EVM.

Also, remove and cleanup AM3517EVM approach, so that we don't end up
polluting board-am3517evm.c file for all AM335x related code.

NOTE: Patch is not for upstream, since upstream approach is completely
      in different direction as far as board changes is concerned.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add pin mux helpers
Afzal Mohammed [Tue, 4 Oct 2011 10:02:45 +0000 (15:32 +0530)]
arm:omap:am33xx: Add pin mux helpers

Add pin mux table, macros for pin mux

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:omap2plus: Enable AT24 EEPROM in defconfig
Vaibhav Hiremath [Sat, 26 Nov 2011 10:35:56 +0000 (16:05 +0530)]
arm:omap:omap2plus: Enable AT24 EEPROM in defconfig

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:clock Remove duplicate macros from DPLL state
Vaibhav Hiremath [Fri, 25 Nov 2011 06:39:37 +0000 (12:09 +0530)]
arm:omap:clock Remove duplicate macros from DPLL state

Irrespective of cpu-type, aren't we supposed to do
same thing for any bypass cases (LPBYPASS/FRBYPASS/MNBYPASS),

     - dpll clock reparenting
     - get dpll rate

This patch cleans up the code and removes the unneccessary cpu check.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Update defconfig to disable 32K_TIMER and RESET_CLOCKS
Vaibhav Hiremath [Wed, 14 Dec 2011 11:59:49 +0000 (17:29 +0530)]
arm:omap:am33xx: Update defconfig to disable 32K_TIMER and RESET_CLOCKS

Also enable DEBUG_LL option

10 years agoarm:omap:am33xx: SoC type detection
Afzal Mohammed [Tue, 11 Oct 2011 11:54:05 +0000 (17:24 +0530)]
arm:omap:am33xx: SoC type detection

Determine SoC type

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: add control_status register addr & bit offsets
Vaibhav Hiremath [Fri, 18 Nov 2011 14:09:46 +0000 (19:39 +0530)]
arm:omap:am33xx: add control_status register addr & bit offsets

This information is required for clock tree data,
where we need to read the control_status register
to detect the input Osc freq.
Here control_status register is used for .clksel_reg.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Skip parts where cpu_is_omap34xx() is true but NA for AM33XX
Afzal Mohammed [Thu, 8 Sep 2011 10:59:39 +0000 (16:29 +0530)]
arm:omap:am33xx: Skip parts where cpu_is_omap34xx() is true but NA for AM33XX

Add an explicit check for cpu_is_am33xx() to prevent the block inside
cpu_is_omap34xx() from executing which would otherwise fail/cause
aborts on AM33XX.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add am335x support in generic omap_hwmod
Vaibhav Hiremath [Tue, 4 Oct 2011 12:23:49 +0000 (17:53 +0530)]
arm:omap:am33xx: Add am335x support in generic omap_hwmod

AM335X is bit different than OMAP3/4 architecture when it comes to
PRCM module, for example, the way module is enabled/disabled.
Although it is closer to OMAP4 architecure but the register offset
and PRCM partitions won't match, so we need to seperate API's
for AM335X.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add clock control api's
Vaibhav Hiremath [Tue, 4 Oct 2011 12:00:35 +0000 (17:30 +0530)]
arm:omap:am33xx: Add clock control api's

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add HWMOD data
Vaibhav Hiremath [Wed, 14 Dec 2011 11:04:41 +0000 (16:34 +0530)]
arm:omap:am33xx: Add HWMOD data

This patch adds HWMOD data for all the peripherals of AM335X and
also hooks up to the existing OMAP framework.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add irq, dma and module base addr to SoC header files
Vaibhav Hiremath [Sun, 20 Nov 2011 09:38:30 +0000 (15:08 +0530)]
arm:omap:am33xx: Add irq, dma and module base addr to SoC header files

This patch creats seperate irq and dma defination header file
and updates the module base addresses required for HWMOD data.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx:CUSTOM: Add CK_AM33XX temporary
Vaibhav Hiremath [Wed, 14 Dec 2011 10:43:21 +0000 (16:13 +0530)]
arm:omap:am33xx:CUSTOM: Add CK_AM33XX temporary

With new clock framework we don't need this, but required now
to get AM335x existing code to build.

10 years agoarm:omap:am33xx: Add Clock & clockdomain data
Vaibhav Hiremath [Wed, 14 Dec 2011 10:41:07 +0000 (16:11 +0530)]
arm:omap:am33xx: Add Clock & clockdomain data

This patch adds support for AM33XX clock & clock domain data,
corresponding API's to access CM module and
CM register offsets & bit fields.

Signed-off-by: Rachna Patil <rachna@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Afzal Mohammed <afzal@ti.com>
10 years agoarm:omap:am33xx: Add power domain data
Vaibhav Hiremath [Fri, 9 Dec 2011 11:28:19 +0000 (16:58 +0530)]
arm:omap:am33xx: Add power domain data

This patch adds AM33XX power domain data (powerdomains33xx_data.c),
corresponding API's to access PRM module and
PRM register offsets & bit fields.

Also, hook up AM33XX power domain to OMAP framework.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add voltage domain data
Vaibhav Hiremath [Thu, 1 Dec 2011 13:53:23 +0000 (19:23 +0530)]
arm:omap:am33xx: Add voltage domain data

Currently dummy voltage domain data is being created
in order to succeed boot process.
Nothing has been done w.r.t actual hardware (voltage control).

Also, hook up AM33XX voltage domain to OMAP framework.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoAM335XEVM: Update mach-types
Vaibhav Hiremath [Mon, 7 Nov 2011 11:16:56 +0000 (16:46 +0530)]
AM335XEVM: Update mach-types

New machine-id added, obtained from RMK.

Note: Please note that, the allocated mach-type has typo-mistake
(am335evm => am335xevm) which needs to be corrected. This is going
to be custom patch, since this will get enrolled by Russell automatically.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
10 years agoarm:omap:am33xx: Add low level debugging support
Afzal Mohammed [Fri, 2 Dec 2011 06:14:00 +0000 (11:44 +0530)]
arm:omap:am33xx: Add low level debugging support

Add support for low level debugging on AM335X EVM (AM33XX family).
Currently only support for UART1 console, which is used on AM335X EVM
is added.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>