ARM: dts: split dra7xx lcd .dts files

We have two different display boards, one with 7" display and one with
10" display. The boards are also somewhat different in other aspects.

dra7-evm.dts has nodes for 7" display board, and dra72-evm.dts has nodes
for 10" display board. However, recent dra7-evm boards have 10" display
board, so the above setup doesn't work anymore.

This patch splits the display board support into smaller pieces. After
this patch, we'll have multiple .dts files from which to choose:

dra7-evm.dts - dra7-evm without display board (only HDMI)
dra7-evm-lcd7.dts - dra7-evm with 7" display (and HDMI)
dra7-evm-lcd10.dts - dra7-evm with 10" display (and HDMI)

And simiarly for dra72-evm.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
drm/tilcdc: make frame_done interrupt active at all times

The frame_done interrupt was only being enabled when the vsync
interrupts were being enabled by DRM.  However the frame_done is
used to determine if the LCD controller has successfully completed
the raster_enable, raster_disable commands and the vsync interrupts
are not always enabled during these operations.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Dave Gerlach <d-gerlach@ti.com>
drm/tilcdc: disable the lcd controller/dma engine when suspend invoked

The LCD controller must be deactivated and all DMA transactions stopped
when the suspend power state is entered otherwise the PRCM causes the L3
bus to get stuck in transition state.

This commit forces the lcdc to be shut down and waits for all pending DMA
transactions to complete as part of the suspend handler for this driver.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Dave Gerlach <d-gerlach@ti.com>
usb: dwc3: ep0: hold our lock in dwc3_gadget_ep0_set_halt

dwc3_gadget_ep0_set_halt() will be called without
locks held in some cases, so we must hold the lock
on our own. While at that, also add a version without
locks to be called in certain conditions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: move isoc endpoint check to unlocked set_halt

__dwc3_gadget_ep_set_halt() is the function which
handles the actual halt feature. In order to cope
with some extra cleanup comming as a follow-up patch
let's move the isochronous endpoint check there too.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: hold the lock through set_wedge()'s life

Instead of releasing the lock and calling locked
versions of our set_halt() methods, let's hold
the lock all the way through and call unlocked
versions of those functions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: fix set_halt() bug with pending transfers

According to our Gadget Framework API documentation,
->set_halt() *must* return -EAGAIN if we have pending
transfers (on either direction) or FIFO isn't empty (on
TX endpoints).

Fix this bug so that the mass storage gadget can be used
without stall=0 parameter.

This patch should be backported to all kernels since v3.2.

Cc: <stable@vger.kernel.org> # v3.2+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: DRA7: Fix comple warning with PCIe pdata-quirks

AM33xx only build gives the following compile warning:
../pdata-quirks.c:307:40: warning: ‘dra7xx_pci_pdata’ defined but not used [-Wunused-variable]
Fixing the same.

Fixes: a33061c112 (ARM: DRA7: add pdata-quirks to do reset of PCIe)
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers: net : cpsw: Enable cpsw for AM43XX

AM43xx has CPSW. Adding the dependency in Kconfig.

Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers: pwm: Enable pwm for AM43xx

PMW in present in AM43xx. Adding the dependency in Kconfig

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
input: touchscreen: ti_am335x_tsc: Fix HWPEN interrupt handling

Remove write to REG_IRQCLR and REG_IRQWAKEUP in interrupt handler for
IRQENB_HW_PEN as the resume handler should and does clear REG_IRQWAKEUP.
IRQENB_HW_PEN bit is set in irqclr so that all interrupts get cleared
later so let IRQENB_HW_PEN be cleared by that.

Without this patch wake events from TSC_ADC do not work because pending
interrupts in TSC_ADC were causing HW_PEN interrupt, needed for wake from
DS0, to get disabled immediately by IRQ handler after being enabled.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: DTS: am335x-evmsk: Correct mcasp1 node indentation

We had one extra tab in there.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ARM: DTS: am335x-evmsk: Add mcasp1 pinctrl sleep state

Specify the sleep state of the pins used by mcasp1.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ARM: DTS: am335x-evm: Correct mcasp1 node indentation

We had one extra tab in there.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ARM: DTS: am335x-evm: Add mcasp1 pinctrl sleep state

Specify the sleep state of the pins used by mcasp1.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ARM: DTS: am335x-boneblack: Add mcasp0 pinctrl sleep state

Specify the sleep state of the pins used by mcasp0.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
ASoC: davinci-mcasp: Add more registers to context saving/restore

We need to save and restore more registers than what we do right now in
order to be able to have the same configuration before the suspend.

[detheridge@ti.com - fixed up checkpatch warning in orig patch]

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Merge branch 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-3.14.y

TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-3.14.y

* 'connectivity-ti-linux-3.14.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
  input: touchscreen: ti_am335x_tsc: Fix HWPEN interrupt handling
  drivers: pwm: Enable pwm for AM43xx
  drivers: net : cpsw: Enable cpsw for AM43XX
  ARM: DRA7: Fix comple warning with PCIe pdata-quirks
  usb: dwc3: gadget: fix set_halt() bug with pending transfers
  usb: dwc3: gadget: hold the lock through set_wedge()'s life
  usb: dwc3: gadget: move isoc endpoint check to unlocked set_halt
  usb: dwc3: ep0: hold our lock in dwc3_gadget_ep0_set_halt

Signed-off-by: Dan Murphy <DMurphy@ti.com>
drm/omap: fix operation without fbdev

omapdrm should work fine even if fbdev is missing. The current driver
crashes in that case, though, as it is missing checks for the fbdev.

Add the checks so that we don't free fbdev or restore fbdev mode when
there's no fbdev.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
drm/omap: fix error handling in omap_framebuffer_create()

When an error happens in omap_framebuffer_create(),
omap_framebuffer_create() calls omap_framebuffer_destroy() if the fb
struct has been allocated. However, that crashes, as
omap_framebuffer_destroy(), which calls drm_framebuffer_cleanup(),
should only be called after drm_framebuffer_init()

Fix this by just calling kfree() for the allocated fb when an error
happens.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>