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>
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>
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>
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>
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>
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>
Revert: "musb: otg timer cleanup"
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
And use dev instead of musb->controller.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
usb: musb: headers cleanup
Remove a few unnecessary headers from a
few files.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Remove a few unnecessary headers from a
few files.
Signed-off-by: Felipe Balbi <balbi@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
treewide: Fix comment and string typo 'bufer'
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
arm:omap:am33xx: Add TSC driver board hookup
Also enable the driver config option in defconfig
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Also enable the driver config option in defconfig
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
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>
Global cold reset on machine reboot
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: Chandan Nath <chandan.nath@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
arm:omap2plus: Enable ethernet driver (CPDMA, MDIO and CPSW)
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
arm:omap:omap2plus: Enable AT24 EEPROM in defconfig
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
arm:omap:am33xx: Update defconfig to disable 32K_TIMER and RESET_CLOCKS
Also enable DEBUG_LL option
Also enable DEBUG_LL option
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>
Determine SoC type
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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>
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>
arm:omap:am33xx: Add clock control api's
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
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>
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>
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>
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>
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.
With new clock framework we don't need this, but required now
to get AM335x existing code to build.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
arm:omap:am33xx: Add AM335XEVM machine support
This patch adds minimal support for AM335X EVM.
The approach taken here is to add AM335X EVM support
to AM3517EVM, considering the fact that with device tree
developement we will get rid of board-*.c.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[Changed ti816x_init_irq=>ti81xx_init_irq, due to recent acceptance of patches]
Reviewed-by: Kevin Hilman <khilman@ti.com>
This patch adds minimal support for AM335X EVM.
The approach taken here is to add AM335X EVM support
to AM3517EVM, considering the fact that with device tree
developement we will get rid of board-*.c.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
[Changed ti816x_init_irq=>ti81xx_init_irq, due to recent acceptance of patches]
Reviewed-by: Kevin Hilman <khilman@ti.com>
Merge v3.2 stable kernel here
Conflicts:
arch/arm/mach-shmobile/board-kota2.c
Conflicts:
arch/arm/mach-shmobile/board-kota2.c
Linux 3.2