]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
authorHeiko Stuebner <heiko@sntech.de>
Wed, 25 Apr 2012 01:06:53 +0000 (18:06 -0700)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 25 Apr 2012 01:06:53 +0000 (18:06 -0700)
SoCs starting with the S3C2443 contain SPI controllers compatible with the
spi-s3c64xx driver and therefore need separate dma channels for rx and tx.

This patch introduces dma channel declarations for these and changes the
dma-s3c2443.c accordingly.

None of the older SoCs use the spi-dma at all. Most boards bitbang their
spi use and the spi-s3c24xx driver also does not use the dma system.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c24xx/dma-s3c2443.c
arch/arm/mach-s3c24xx/include/mach/dma.h

index e227c472a40ab45530e69ad4dc57a9f1055d9139..2d94228d2866eef4bc56408a641b1f3084492d2a 100644 (file)
@@ -55,12 +55,20 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
                .name           = "sdi",
                .channels       = MAP(S3C2443_DMAREQSEL_SDI),
        },
-       [DMACH_SPI0] = {
-               .name           = "spi0",
+       [DMACH_SPI0_RX] = {
+               .name           = "spi0-rx",
+               .channels       = MAP(S3C2443_DMAREQSEL_SPI0RX),
+       },
+       [DMACH_SPI0_TX] = {
+               .name           = "spi0-tx",
                .channels       = MAP(S3C2443_DMAREQSEL_SPI0TX),
        },
-       [DMACH_SPI1] = { /* only on S3C2443/S3C2450 */
-               .name           = "spi1",
+       [DMACH_SPI1_RX] = { /* only on S3C2443/S3C2450 */
+               .name           = "spi1-rx",
+               .channels       = MAP(S3C2443_DMAREQSEL_SPI1RX),
+       },
+       [DMACH_SPI1_TX] = { /* only on S3C2443/S3C2450 */
+               .name           = "spi1-tx",
                .channels       = MAP(S3C2443_DMAREQSEL_SPI1TX),
        },
        [DMACH_UART0] = {
index acbdfecd4186f6aa0f309315069f13a28f1625e5..454831b66037f9c64d37521bf14e118dcc92bc9a 100644 (file)
@@ -47,6 +47,10 @@ enum dma_ch {
        DMACH_UART2_SRC2,
        DMACH_UART3,            /* s3c2443 has extra uart */
        DMACH_UART3_SRC2,
+       DMACH_SPI0_TX,          /* s3c2443/2416/2450 hsspi0 */
+       DMACH_SPI0_RX,          /* s3c2443/2416/2450 hsspi0 */
+       DMACH_SPI1_TX,          /* s3c2443/2450 hsspi1 */
+       DMACH_SPI1_RX,          /* s3c2443/2450 hsspi1 */
        DMACH_MAX,              /* the end entry */
 };