omap4: dts: Add node for AES

Signed-off-by: Joel Fernandes <joelf@ti.com>
omap4: hwmod: Add hwmod data for aes1 crypto module

    Crypto modules AES0/1 belong to:
       PD_L4_PER power domain
       CD_L4_SEC clock domain
       On the L3, the AES modules are mapped to
       L3_CLK2: Peripherals and multimedia sub clock domain

We add hwmod data for the same.

Signed-off-by: Joel Fernandes <joelf@ti.com>
am33xx: dts: Fix AES interrupt number

Signed-off-by: Joel Fernandes <joelf@ti.com>
crypto: omap-aes: Add useful debug macros

When DEBUG is enabled, these macros can be used to print variables
in integer and hex format, and clearly display which registers,
offsets and values are being read/written , including printing the
names of the offsets and their values.

Signed-off-by: Joel Fernandes <joelf@ti.com>
crypto: omap-aes: Remove unused variables

The addr_in/addr_out variables are not used anymore, remove them.

Signed-off-by: Joel Fernandes <joelf@ti.com>
crypto: omap-aes: Set dma_page and correct offsets for buffer wrapping SGs

A scatter-gather list is meaningless if it doesn't represent pages.
Earlier, these SGs were just made to contain DMA addresses only
without containing actual page_links. Correct page assignments are
needed for PIO mode. We assign them with the correct pages they represent,
and as a result also fix PIO mode which depends on these SGs.

Also fix a bug where new SG offset should be 0, not dd->in_offset
or dd->out_offset. Not doing so cause weird bugs due to memory overrun
when doing an AES operation on a block > PAGE_SIZE = buflen.

While at it, also use sg_set_page to set the offset and length of an SG
instead of setting them directly.

Signed-off-by: Joel Fernandes <joelf@ti.com>
crypto: omap-aes: Add support for PIO mode

We add support for PIO mode of operation, and enable it incase
dma_init fails due to channel request failures or other reasons.
Incase such a situtation, we don't simply fail but fall back to
PIO mode for operation.

The state machine for PIO follows closely that of DMA, replacing
DMA req events with interrupts. To not receive too many interrupts,
we keep them disabled in the module at all times and enable them at
specific points depending on the state.

Signed-off-by: Joel Fernandes <joelf@ti.com>
crypto: omap-aes: Add polling mode support

Signed-off-by: Joel Fernandes <joelf@ti.com>
omap4: hwmod: add hwmod data for DES3DES

Signed-off-by: Joel Fernandes <joelf@ti.com>
omap4: dts: Add device tree node for DES

Signed-off-by: Joel Fernandes <joelf@ti.com>