diff options
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r-- | arch/arm/mach-u300/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-u300/clock.c | 29 | ||||
-rw-r--r-- | arch/arm/mach-u300/core.c | 1033 | ||||
-rw-r--r-- | arch/arm/mach-u300/dummyspichip.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-u300/gpio.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-u300/i2c.c | 249 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/coh901318.h | 281 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/debug-macro.S | 4 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/dma_channels.h | 69 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/u300-regs.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/vmalloc.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-u300/mmc.c | 65 | ||||
-rw-r--r-- | arch/arm/mach-u300/regulator.c | 88 |
13 files changed, 1741 insertions, 85 deletions
diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile index 885b5c027c1e..fab46fe9a71f 100644 --- a/arch/arm/mach-u300/Makefile +++ b/arch/arm/mach-u300/Makefile | |||
@@ -12,3 +12,4 @@ obj-$(CONFIG_MMC) += mmc.o | |||
12 | obj-$(CONFIG_SPI_PL022) += spi.o | 12 | obj-$(CONFIG_SPI_PL022) += spi.o |
13 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o | 13 | obj-$(CONFIG_MACH_U300_SPIDUMMY) += dummyspichip.o |
14 | obj-$(CONFIG_I2C_STU300) += i2c.o | 14 | obj-$(CONFIG_I2C_STU300) += i2c.o |
15 | obj-$(CONFIG_REGULATOR_AB3100) += regulator.o | ||
diff --git a/arch/arm/mach-u300/clock.c b/arch/arm/mach-u300/clock.c index 111f7ea32b38..5af71d5ba665 100644 --- a/arch/arm/mach-u300/clock.c +++ b/arch/arm/mach-u300/clock.c | |||
@@ -610,34 +610,34 @@ EXPORT_SYMBOL(clk_get_rate); | |||
610 | 610 | ||
611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) | 611 | static unsigned long clk_round_rate_mclk(struct clk *clk, unsigned long rate) |
612 | { | 612 | { |
613 | if (rate >= 18900000) | 613 | if (rate <= 18900000) |
614 | return 18900000; | 614 | return 18900000; |
615 | if (rate >= 20800000) | 615 | if (rate <= 20800000) |
616 | return 20800000; | 616 | return 20800000; |
617 | if (rate >= 23100000) | 617 | if (rate <= 23100000) |
618 | return 23100000; | 618 | return 23100000; |
619 | if (rate >= 26000000) | 619 | if (rate <= 26000000) |
620 | return 26000000; | 620 | return 26000000; |
621 | if (rate >= 29700000) | 621 | if (rate <= 29700000) |
622 | return 29700000; | 622 | return 29700000; |
623 | if (rate >= 34700000) | 623 | if (rate <= 34700000) |
624 | return 34700000; | 624 | return 34700000; |
625 | if (rate >= 41600000) | 625 | if (rate <= 41600000) |
626 | return 41600000; | 626 | return 41600000; |
627 | if (rate >= 52000000) | 627 | if (rate <= 52000000) |
628 | return 52000000; | 628 | return 52000000; |
629 | return -EINVAL; | 629 | return -EINVAL; |
630 | } | 630 | } |
631 | 631 | ||
632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) | 632 | static unsigned long clk_round_rate_cpuclk(struct clk *clk, unsigned long rate) |
633 | { | 633 | { |
634 | if (rate >= 13000000) | 634 | if (rate <= 13000000) |
635 | return 13000000; | 635 | return 13000000; |
636 | if (rate >= 52000000) | 636 | if (rate <= 52000000) |
637 | return 52000000; | 637 | return 52000000; |
638 | if (rate >= 104000000) | 638 | if (rate <= 104000000) |
639 | return 104000000; | 639 | return 104000000; |
640 | if (rate >= 208000000) | 640 | if (rate <= 208000000) |
641 | return 208000000; | 641 | return 208000000; |
642 | return -EINVAL; | 642 | return -EINVAL; |
643 | } | 643 | } |
@@ -1276,11 +1276,8 @@ static struct clk_lookup lookups[] = { | |||
1276 | 1276 | ||
1277 | static void __init clk_register(void) | 1277 | static void __init clk_register(void) |
1278 | { | 1278 | { |
1279 | int i; | ||
1280 | |||
1281 | /* Register the lookups */ | 1279 | /* Register the lookups */ |
1282 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | 1280 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); |
1283 | clkdev_add(&lookups[i]); | ||
1284 | } | 1281 | } |
1285 | 1282 | ||
1286 | /* | 1283 | /* |
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 653e25be3dd8..5f34eb674d68 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * arch/arm/mach-u300/core.c | 3 | * arch/arm/mach-u300/core.c |
4 | * | 4 | * |
5 | * | 5 | * |
6 | * Copyright (C) 2007-2009 ST-Ericsson AB | 6 | * Copyright (C) 2007-2010 ST-Ericsson AB |
7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
8 | * Core platform support, IRQ handling and device definitions. | 8 | * Core platform support, IRQ handling and device definitions. |
9 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 9 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/amba/bus.h> | 19 | #include <linux/amba/bus.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <mach/coh901318.h> | ||
22 | 23 | ||
23 | #include <asm/types.h> | 24 | #include <asm/types.h> |
24 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
@@ -29,6 +30,7 @@ | |||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <mach/syscon.h> | 32 | #include <mach/syscon.h> |
33 | #include <mach/dma_channels.h> | ||
32 | 34 | ||
33 | #include "clock.h" | 35 | #include "clock.h" |
34 | #include "mmc.h" | 36 | #include "mmc.h" |
@@ -356,7 +358,7 @@ static struct resource ave_resources[] = { | |||
356 | /* | 358 | /* |
357 | * The AVE3e requires two regions of 256MB that it considers | 359 | * The AVE3e requires two regions of 256MB that it considers |
358 | * "invisible". The hardware will not be able to access these | 360 | * "invisible". The hardware will not be able to access these |
359 | * adresses, so they should never point to system RAM. | 361 | * addresses, so they should never point to system RAM. |
360 | */ | 362 | */ |
361 | { | 363 | { |
362 | .name = "AVE3e Reserved 0", | 364 | .name = "AVE3e Reserved 0", |
@@ -372,8 +374,1019 @@ static struct resource ave_resources[] = { | |||
372 | }, | 374 | }, |
373 | }; | 375 | }; |
374 | 376 | ||
377 | static struct resource dma_resource[] = { | ||
378 | { | ||
379 | .start = U300_DMAC_BASE, | ||
380 | .end = U300_DMAC_BASE + PAGE_SIZE - 1, | ||
381 | .flags = IORESOURCE_MEM, | ||
382 | }, | ||
383 | { | ||
384 | .start = IRQ_U300_DMA, | ||
385 | .end = IRQ_U300_DMA, | ||
386 | .flags = IORESOURCE_IRQ, | ||
387 | } | ||
388 | }; | ||
389 | |||
390 | #ifdef CONFIG_MACH_U300_BS335 | ||
391 | /* points out all dma slave channels. | ||
392 | * Syntax is [A1, B1, A2, B2, .... ,-1,-1] | ||
393 | * Select all channels from A to B, end of list is marked with -1,-1 | ||
394 | */ | ||
395 | static int dma_slave_channels[] = { | ||
396 | U300_DMA_MSL_TX_0, U300_DMA_SPI_RX, | ||
397 | U300_DMA_UART1_TX, U300_DMA_UART1_RX, -1, -1}; | ||
398 | |||
399 | /* points out all dma memcpy channels. */ | ||
400 | static int dma_memcpy_channels[] = { | ||
401 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_8, -1, -1}; | ||
402 | |||
403 | #else /* CONFIG_MACH_U300_BS335 */ | ||
404 | |||
405 | static int dma_slave_channels[] = {U300_DMA_MSL_TX_0, U300_DMA_SPI_RX, -1, -1}; | ||
406 | static int dma_memcpy_channels[] = { | ||
407 | U300_DMA_GENERAL_PURPOSE_0, U300_DMA_GENERAL_PURPOSE_10, -1, -1}; | ||
408 | |||
409 | #endif | ||
410 | |||
411 | /** register dma for memory access | ||
412 | * | ||
413 | * active 1 means dma intends to access memory | ||
414 | * 0 means dma wont access memory | ||
415 | */ | ||
416 | static void coh901318_access_memory_state(struct device *dev, bool active) | ||
417 | { | ||
418 | } | ||
419 | |||
420 | #define flags_memcpy_config (COH901318_CX_CFG_CH_DISABLE | \ | ||
421 | COH901318_CX_CFG_RM_MEMORY_TO_MEMORY | \ | ||
422 | COH901318_CX_CFG_LCR_DISABLE | \ | ||
423 | COH901318_CX_CFG_TC_IRQ_ENABLE | \ | ||
424 | COH901318_CX_CFG_BE_IRQ_ENABLE) | ||
425 | #define flags_memcpy_lli_chained (COH901318_CX_CTRL_TC_ENABLE | \ | ||
426 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
427 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
428 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
429 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
430 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
431 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
432 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
433 | COH901318_CX_CTRL_TC_IRQ_DISABLE | \ | ||
434 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
435 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
436 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
437 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
438 | #define flags_memcpy_lli (COH901318_CX_CTRL_TC_ENABLE | \ | ||
439 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
440 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
441 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
442 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
443 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
444 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
445 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
446 | COH901318_CX_CTRL_TC_IRQ_DISABLE | \ | ||
447 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
448 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
449 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
450 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
451 | #define flags_memcpy_lli_last (COH901318_CX_CTRL_TC_ENABLE | \ | ||
452 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | \ | ||
453 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | \ | ||
454 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | \ | ||
455 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | \ | ||
456 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | \ | ||
457 | COH901318_CX_CTRL_MASTER_MODE_M1RW | \ | ||
458 | COH901318_CX_CTRL_TCP_DISABLE | \ | ||
459 | COH901318_CX_CTRL_TC_IRQ_ENABLE | \ | ||
460 | COH901318_CX_CTRL_HSP_DISABLE | \ | ||
461 | COH901318_CX_CTRL_HSS_DISABLE | \ | ||
462 | COH901318_CX_CTRL_DDMA_LEGACY | \ | ||
463 | COH901318_CX_CTRL_PRDD_SOURCE) | ||
464 | |||
465 | const struct coh_dma_channel chan_config[U300_DMA_CHANNELS] = { | ||
466 | { | ||
467 | .number = U300_DMA_MSL_TX_0, | ||
468 | .name = "MSL TX 0", | ||
469 | .priority_high = 0, | ||
470 | .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x20, | ||
471 | }, | ||
472 | { | ||
473 | .number = U300_DMA_MSL_TX_1, | ||
474 | .name = "MSL TX 1", | ||
475 | .priority_high = 0, | ||
476 | .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x20, | ||
477 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
478 | COH901318_CX_CFG_LCR_DISABLE | | ||
479 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
480 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
481 | .param.ctrl_lli_chained = 0 | | ||
482 | COH901318_CX_CTRL_TC_ENABLE | | ||
483 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
484 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
485 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
486 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
487 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
488 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
489 | COH901318_CX_CTRL_TCP_DISABLE | | ||
490 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
491 | COH901318_CX_CTRL_HSP_ENABLE | | ||
492 | COH901318_CX_CTRL_HSS_DISABLE | | ||
493 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
494 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
495 | .param.ctrl_lli = 0 | | ||
496 | COH901318_CX_CTRL_TC_ENABLE | | ||
497 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
498 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
499 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
500 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
501 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
502 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
503 | COH901318_CX_CTRL_TCP_ENABLE | | ||
504 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
505 | COH901318_CX_CTRL_HSP_ENABLE | | ||
506 | COH901318_CX_CTRL_HSS_DISABLE | | ||
507 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
508 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
509 | .param.ctrl_lli_last = 0 | | ||
510 | COH901318_CX_CTRL_TC_ENABLE | | ||
511 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
512 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
513 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
514 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
515 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
516 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
517 | COH901318_CX_CTRL_TCP_ENABLE | | ||
518 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
519 | COH901318_CX_CTRL_HSP_ENABLE | | ||
520 | COH901318_CX_CTRL_HSS_DISABLE | | ||
521 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
522 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
523 | }, | ||
524 | { | ||
525 | .number = U300_DMA_MSL_TX_2, | ||
526 | .name = "MSL TX 2", | ||
527 | .priority_high = 0, | ||
528 | .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x20, | ||
529 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
530 | COH901318_CX_CFG_LCR_DISABLE | | ||
531 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
532 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
533 | .param.ctrl_lli_chained = 0 | | ||
534 | COH901318_CX_CTRL_TC_ENABLE | | ||
535 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
536 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
537 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
538 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
539 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
540 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
541 | COH901318_CX_CTRL_TCP_DISABLE | | ||
542 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
543 | COH901318_CX_CTRL_HSP_ENABLE | | ||
544 | COH901318_CX_CTRL_HSS_DISABLE | | ||
545 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
546 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
547 | .param.ctrl_lli = 0 | | ||
548 | COH901318_CX_CTRL_TC_ENABLE | | ||
549 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
550 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
551 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
552 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
553 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
554 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
555 | COH901318_CX_CTRL_TCP_ENABLE | | ||
556 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
557 | COH901318_CX_CTRL_HSP_ENABLE | | ||
558 | COH901318_CX_CTRL_HSS_DISABLE | | ||
559 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
560 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
561 | .param.ctrl_lli_last = 0 | | ||
562 | COH901318_CX_CTRL_TC_ENABLE | | ||
563 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
564 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
565 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
566 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
567 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
568 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
569 | COH901318_CX_CTRL_TCP_ENABLE | | ||
570 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
571 | COH901318_CX_CTRL_HSP_ENABLE | | ||
572 | COH901318_CX_CTRL_HSS_DISABLE | | ||
573 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
574 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
575 | .desc_nbr_max = 10, | ||
576 | }, | ||
577 | { | ||
578 | .number = U300_DMA_MSL_TX_3, | ||
579 | .name = "MSL TX 3", | ||
580 | .priority_high = 0, | ||
581 | .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x20, | ||
582 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
583 | COH901318_CX_CFG_LCR_DISABLE | | ||
584 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
585 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
586 | .param.ctrl_lli_chained = 0 | | ||
587 | COH901318_CX_CTRL_TC_ENABLE | | ||
588 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
589 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
590 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
591 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
592 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
593 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
594 | COH901318_CX_CTRL_TCP_DISABLE | | ||
595 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
596 | COH901318_CX_CTRL_HSP_ENABLE | | ||
597 | COH901318_CX_CTRL_HSS_DISABLE | | ||
598 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
599 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
600 | .param.ctrl_lli = 0 | | ||
601 | COH901318_CX_CTRL_TC_ENABLE | | ||
602 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
603 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
604 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
605 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
606 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
607 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
608 | COH901318_CX_CTRL_TCP_ENABLE | | ||
609 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
610 | COH901318_CX_CTRL_HSP_ENABLE | | ||
611 | COH901318_CX_CTRL_HSS_DISABLE | | ||
612 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
613 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
614 | .param.ctrl_lli_last = 0 | | ||
615 | COH901318_CX_CTRL_TC_ENABLE | | ||
616 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
617 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
618 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
619 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
620 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
621 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
622 | COH901318_CX_CTRL_TCP_ENABLE | | ||
623 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
624 | COH901318_CX_CTRL_HSP_ENABLE | | ||
625 | COH901318_CX_CTRL_HSS_DISABLE | | ||
626 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
627 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
628 | }, | ||
629 | { | ||
630 | .number = U300_DMA_MSL_TX_4, | ||
631 | .name = "MSL TX 4", | ||
632 | .priority_high = 0, | ||
633 | .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x20, | ||
634 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
635 | COH901318_CX_CFG_LCR_DISABLE | | ||
636 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
637 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
638 | .param.ctrl_lli_chained = 0 | | ||
639 | COH901318_CX_CTRL_TC_ENABLE | | ||
640 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
641 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
642 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
643 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
644 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
645 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
646 | COH901318_CX_CTRL_TCP_DISABLE | | ||
647 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
648 | COH901318_CX_CTRL_HSP_ENABLE | | ||
649 | COH901318_CX_CTRL_HSS_DISABLE | | ||
650 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
651 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
652 | .param.ctrl_lli = 0 | | ||
653 | COH901318_CX_CTRL_TC_ENABLE | | ||
654 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
655 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
656 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
657 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
658 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
659 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
660 | COH901318_CX_CTRL_TCP_ENABLE | | ||
661 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
662 | COH901318_CX_CTRL_HSP_ENABLE | | ||
663 | COH901318_CX_CTRL_HSS_DISABLE | | ||
664 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
665 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
666 | .param.ctrl_lli_last = 0 | | ||
667 | COH901318_CX_CTRL_TC_ENABLE | | ||
668 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
669 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
670 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
671 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
672 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
673 | COH901318_CX_CTRL_MASTER_MODE_M1R_M2W | | ||
674 | COH901318_CX_CTRL_TCP_ENABLE | | ||
675 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
676 | COH901318_CX_CTRL_HSP_ENABLE | | ||
677 | COH901318_CX_CTRL_HSS_DISABLE | | ||
678 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
679 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
680 | }, | ||
681 | { | ||
682 | .number = U300_DMA_MSL_TX_5, | ||
683 | .name = "MSL TX 5", | ||
684 | .priority_high = 0, | ||
685 | .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x20, | ||
686 | }, | ||
687 | { | ||
688 | .number = U300_DMA_MSL_TX_6, | ||
689 | .name = "MSL TX 6", | ||
690 | .priority_high = 0, | ||
691 | .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x20, | ||
692 | }, | ||
693 | { | ||
694 | .number = U300_DMA_MSL_RX_0, | ||
695 | .name = "MSL RX 0", | ||
696 | .priority_high = 0, | ||
697 | .dev_addr = U300_MSL_BASE + 0 * 0x40 + 0x220, | ||
698 | }, | ||
699 | { | ||
700 | .number = U300_DMA_MSL_RX_1, | ||
701 | .name = "MSL RX 1", | ||
702 | .priority_high = 0, | ||
703 | .dev_addr = U300_MSL_BASE + 1 * 0x40 + 0x220, | ||
704 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
705 | COH901318_CX_CFG_LCR_DISABLE | | ||
706 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
707 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
708 | .param.ctrl_lli_chained = 0 | | ||
709 | COH901318_CX_CTRL_TC_ENABLE | | ||
710 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
711 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
712 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
713 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
714 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
715 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
716 | COH901318_CX_CTRL_TCP_DISABLE | | ||
717 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
718 | COH901318_CX_CTRL_HSP_ENABLE | | ||
719 | COH901318_CX_CTRL_HSS_DISABLE | | ||
720 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
721 | COH901318_CX_CTRL_PRDD_DEST, | ||
722 | .param.ctrl_lli = 0, | ||
723 | .param.ctrl_lli_last = 0 | | ||
724 | COH901318_CX_CTRL_TC_ENABLE | | ||
725 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
726 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
727 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
728 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
729 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
730 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
731 | COH901318_CX_CTRL_TCP_DISABLE | | ||
732 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
733 | COH901318_CX_CTRL_HSP_ENABLE | | ||
734 | COH901318_CX_CTRL_HSS_DISABLE | | ||
735 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
736 | COH901318_CX_CTRL_PRDD_DEST, | ||
737 | }, | ||
738 | { | ||
739 | .number = U300_DMA_MSL_RX_2, | ||
740 | .name = "MSL RX 2", | ||
741 | .priority_high = 0, | ||
742 | .dev_addr = U300_MSL_BASE + 2 * 0x40 + 0x220, | ||
743 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
744 | COH901318_CX_CFG_LCR_DISABLE | | ||
745 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
746 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
747 | .param.ctrl_lli_chained = 0 | | ||
748 | COH901318_CX_CTRL_TC_ENABLE | | ||
749 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
750 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
751 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
752 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
753 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
754 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
755 | COH901318_CX_CTRL_TCP_DISABLE | | ||
756 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
757 | COH901318_CX_CTRL_HSP_ENABLE | | ||
758 | COH901318_CX_CTRL_HSS_DISABLE | | ||
759 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
760 | COH901318_CX_CTRL_PRDD_DEST, | ||
761 | .param.ctrl_lli = 0 | | ||
762 | COH901318_CX_CTRL_TC_ENABLE | | ||
763 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
764 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
765 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
766 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
767 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
768 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
769 | COH901318_CX_CTRL_TCP_DISABLE | | ||
770 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
771 | COH901318_CX_CTRL_HSP_ENABLE | | ||
772 | COH901318_CX_CTRL_HSS_DISABLE | | ||
773 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
774 | COH901318_CX_CTRL_PRDD_DEST, | ||
775 | .param.ctrl_lli_last = 0 | | ||
776 | COH901318_CX_CTRL_TC_ENABLE | | ||
777 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
778 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
779 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
780 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
781 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
782 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
783 | COH901318_CX_CTRL_TCP_DISABLE | | ||
784 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
785 | COH901318_CX_CTRL_HSP_ENABLE | | ||
786 | COH901318_CX_CTRL_HSS_DISABLE | | ||
787 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
788 | COH901318_CX_CTRL_PRDD_DEST, | ||
789 | }, | ||
790 | { | ||
791 | .number = U300_DMA_MSL_RX_3, | ||
792 | .name = "MSL RX 3", | ||
793 | .priority_high = 0, | ||
794 | .dev_addr = U300_MSL_BASE + 3 * 0x40 + 0x220, | ||
795 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
796 | COH901318_CX_CFG_LCR_DISABLE | | ||
797 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
798 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
799 | .param.ctrl_lli_chained = 0 | | ||
800 | COH901318_CX_CTRL_TC_ENABLE | | ||
801 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
802 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
803 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
804 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
805 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
806 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
807 | COH901318_CX_CTRL_TCP_DISABLE | | ||
808 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
809 | COH901318_CX_CTRL_HSP_ENABLE | | ||
810 | COH901318_CX_CTRL_HSS_DISABLE | | ||
811 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
812 | COH901318_CX_CTRL_PRDD_DEST, | ||
813 | .param.ctrl_lli = 0 | | ||
814 | COH901318_CX_CTRL_TC_ENABLE | | ||
815 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
816 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
817 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
818 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
819 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
820 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
821 | COH901318_CX_CTRL_TCP_DISABLE | | ||
822 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
823 | COH901318_CX_CTRL_HSP_ENABLE | | ||
824 | COH901318_CX_CTRL_HSS_DISABLE | | ||
825 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
826 | COH901318_CX_CTRL_PRDD_DEST, | ||
827 | .param.ctrl_lli_last = 0 | | ||
828 | COH901318_CX_CTRL_TC_ENABLE | | ||
829 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
830 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
831 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
832 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
833 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
834 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
835 | COH901318_CX_CTRL_TCP_DISABLE | | ||
836 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
837 | COH901318_CX_CTRL_HSP_ENABLE | | ||
838 | COH901318_CX_CTRL_HSS_DISABLE | | ||
839 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
840 | COH901318_CX_CTRL_PRDD_DEST, | ||
841 | }, | ||
842 | { | ||
843 | .number = U300_DMA_MSL_RX_4, | ||
844 | .name = "MSL RX 4", | ||
845 | .priority_high = 0, | ||
846 | .dev_addr = U300_MSL_BASE + 4 * 0x40 + 0x220, | ||
847 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
848 | COH901318_CX_CFG_LCR_DISABLE | | ||
849 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
850 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
851 | .param.ctrl_lli_chained = 0 | | ||
852 | COH901318_CX_CTRL_TC_ENABLE | | ||
853 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
854 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
855 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
856 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
857 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
858 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
859 | COH901318_CX_CTRL_TCP_DISABLE | | ||
860 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
861 | COH901318_CX_CTRL_HSP_ENABLE | | ||
862 | COH901318_CX_CTRL_HSS_DISABLE | | ||
863 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
864 | COH901318_CX_CTRL_PRDD_DEST, | ||
865 | .param.ctrl_lli = 0 | | ||
866 | COH901318_CX_CTRL_TC_ENABLE | | ||
867 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
868 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
869 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
870 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
871 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
872 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
873 | COH901318_CX_CTRL_TCP_DISABLE | | ||
874 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
875 | COH901318_CX_CTRL_HSP_ENABLE | | ||
876 | COH901318_CX_CTRL_HSS_DISABLE | | ||
877 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
878 | COH901318_CX_CTRL_PRDD_DEST, | ||
879 | .param.ctrl_lli_last = 0 | | ||
880 | COH901318_CX_CTRL_TC_ENABLE | | ||
881 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
882 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
883 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
884 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
885 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
886 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
887 | COH901318_CX_CTRL_TCP_DISABLE | | ||
888 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
889 | COH901318_CX_CTRL_HSP_ENABLE | | ||
890 | COH901318_CX_CTRL_HSS_DISABLE | | ||
891 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
892 | COH901318_CX_CTRL_PRDD_DEST, | ||
893 | }, | ||
894 | { | ||
895 | .number = U300_DMA_MSL_RX_5, | ||
896 | .name = "MSL RX 5", | ||
897 | .priority_high = 0, | ||
898 | .dev_addr = U300_MSL_BASE + 5 * 0x40 + 0x220, | ||
899 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
900 | COH901318_CX_CFG_LCR_DISABLE | | ||
901 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
902 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
903 | .param.ctrl_lli_chained = 0 | | ||
904 | COH901318_CX_CTRL_TC_ENABLE | | ||
905 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
906 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
907 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
908 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
909 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
910 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
911 | COH901318_CX_CTRL_TCP_DISABLE | | ||
912 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
913 | COH901318_CX_CTRL_HSP_ENABLE | | ||
914 | COH901318_CX_CTRL_HSS_DISABLE | | ||
915 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
916 | COH901318_CX_CTRL_PRDD_DEST, | ||
917 | .param.ctrl_lli = 0 | | ||
918 | COH901318_CX_CTRL_TC_ENABLE | | ||
919 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
920 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
921 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
922 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
923 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
924 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
925 | COH901318_CX_CTRL_TCP_DISABLE | | ||
926 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
927 | COH901318_CX_CTRL_HSP_ENABLE | | ||
928 | COH901318_CX_CTRL_HSS_DISABLE | | ||
929 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
930 | COH901318_CX_CTRL_PRDD_DEST, | ||
931 | .param.ctrl_lli_last = 0 | | ||
932 | COH901318_CX_CTRL_TC_ENABLE | | ||
933 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
934 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
935 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
936 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
937 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
938 | COH901318_CX_CTRL_MASTER_MODE_M2R_M1W | | ||
939 | COH901318_CX_CTRL_TCP_DISABLE | | ||
940 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
941 | COH901318_CX_CTRL_HSP_ENABLE | | ||
942 | COH901318_CX_CTRL_HSS_DISABLE | | ||
943 | COH901318_CX_CTRL_DDMA_DEMAND_DMA1 | | ||
944 | COH901318_CX_CTRL_PRDD_DEST, | ||
945 | }, | ||
946 | { | ||
947 | .number = U300_DMA_MSL_RX_6, | ||
948 | .name = "MSL RX 6", | ||
949 | .priority_high = 0, | ||
950 | .dev_addr = U300_MSL_BASE + 6 * 0x40 + 0x220, | ||
951 | }, | ||
952 | { | ||
953 | .number = U300_DMA_MMCSD_RX_TX, | ||
954 | .name = "MMCSD RX TX", | ||
955 | .priority_high = 0, | ||
956 | .dev_addr = U300_MMCSD_BASE + 0x080, | ||
957 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
958 | COH901318_CX_CFG_LCR_DISABLE | | ||
959 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
960 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
961 | .param.ctrl_lli_chained = 0 | | ||
962 | COH901318_CX_CTRL_TC_ENABLE | | ||
963 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
964 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
965 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
966 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
967 | COH901318_CX_CTRL_TCP_ENABLE | | ||
968 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
969 | COH901318_CX_CTRL_HSP_ENABLE | | ||
970 | COH901318_CX_CTRL_HSS_DISABLE | | ||
971 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
972 | .param.ctrl_lli = 0 | | ||
973 | COH901318_CX_CTRL_TC_ENABLE | | ||
974 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
975 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
976 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
977 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
978 | COH901318_CX_CTRL_TCP_ENABLE | | ||
979 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
980 | COH901318_CX_CTRL_HSP_ENABLE | | ||
981 | COH901318_CX_CTRL_HSS_DISABLE | | ||
982 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
983 | .param.ctrl_lli_last = 0 | | ||
984 | COH901318_CX_CTRL_TC_ENABLE | | ||
985 | COH901318_CX_CTRL_BURST_COUNT_32_BYTES | | ||
986 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
987 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
988 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
989 | COH901318_CX_CTRL_TCP_DISABLE | | ||
990 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
991 | COH901318_CX_CTRL_HSP_ENABLE | | ||
992 | COH901318_CX_CTRL_HSS_DISABLE | | ||
993 | COH901318_CX_CTRL_DDMA_LEGACY, | ||
994 | |||
995 | }, | ||
996 | { | ||
997 | .number = U300_DMA_MSPRO_TX, | ||
998 | .name = "MSPRO TX", | ||
999 | .priority_high = 0, | ||
1000 | }, | ||
1001 | { | ||
1002 | .number = U300_DMA_MSPRO_RX, | ||
1003 | .name = "MSPRO RX", | ||
1004 | .priority_high = 0, | ||
1005 | }, | ||
1006 | { | ||
1007 | .number = U300_DMA_UART0_TX, | ||
1008 | .name = "UART0 TX", | ||
1009 | .priority_high = 0, | ||
1010 | }, | ||
1011 | { | ||
1012 | .number = U300_DMA_UART0_RX, | ||
1013 | .name = "UART0 RX", | ||
1014 | .priority_high = 0, | ||
1015 | }, | ||
1016 | { | ||
1017 | .number = U300_DMA_APEX_TX, | ||
1018 | .name = "APEX TX", | ||
1019 | .priority_high = 0, | ||
1020 | }, | ||
1021 | { | ||
1022 | .number = U300_DMA_APEX_RX, | ||
1023 | .name = "APEX RX", | ||
1024 | .priority_high = 0, | ||
1025 | }, | ||
1026 | { | ||
1027 | .number = U300_DMA_PCM_I2S0_TX, | ||
1028 | .name = "PCM I2S0 TX", | ||
1029 | .priority_high = 1, | ||
1030 | .dev_addr = U300_PCM_I2S0_BASE + 0x14, | ||
1031 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1032 | COH901318_CX_CFG_LCR_DISABLE | | ||
1033 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1034 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1035 | .param.ctrl_lli_chained = 0 | | ||
1036 | COH901318_CX_CTRL_TC_ENABLE | | ||
1037 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1038 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1039 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1040 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1041 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1042 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1043 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1044 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1045 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1046 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1047 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1048 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1049 | .param.ctrl_lli = 0 | | ||
1050 | COH901318_CX_CTRL_TC_ENABLE | | ||
1051 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1052 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1053 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1054 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1055 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1056 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1057 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1058 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1059 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1060 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1061 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1062 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1063 | .param.ctrl_lli_last = 0 | | ||
1064 | COH901318_CX_CTRL_TC_ENABLE | | ||
1065 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1066 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1067 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1068 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1069 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1070 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1071 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1072 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1073 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1074 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1075 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1076 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1077 | }, | ||
1078 | { | ||
1079 | .number = U300_DMA_PCM_I2S0_RX, | ||
1080 | .name = "PCM I2S0 RX", | ||
1081 | .priority_high = 1, | ||
1082 | .dev_addr = U300_PCM_I2S0_BASE + 0x10, | ||
1083 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1084 | COH901318_CX_CFG_LCR_DISABLE | | ||
1085 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1086 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1087 | .param.ctrl_lli_chained = 0 | | ||
1088 | COH901318_CX_CTRL_TC_ENABLE | | ||
1089 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1090 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1091 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1092 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1093 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1094 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1095 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1096 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1097 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1098 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1099 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1100 | COH901318_CX_CTRL_PRDD_DEST, | ||
1101 | .param.ctrl_lli = 0 | | ||
1102 | COH901318_CX_CTRL_TC_ENABLE | | ||
1103 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1104 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1105 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1106 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1107 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1108 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1109 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1110 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1111 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1112 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1113 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1114 | COH901318_CX_CTRL_PRDD_DEST, | ||
1115 | .param.ctrl_lli_last = 0 | | ||
1116 | COH901318_CX_CTRL_TC_ENABLE | | ||
1117 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1118 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1119 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1120 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1121 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1122 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1123 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1124 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1125 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1126 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1127 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1128 | COH901318_CX_CTRL_PRDD_DEST, | ||
1129 | }, | ||
1130 | { | ||
1131 | .number = U300_DMA_PCM_I2S1_TX, | ||
1132 | .name = "PCM I2S1 TX", | ||
1133 | .priority_high = 1, | ||
1134 | .dev_addr = U300_PCM_I2S1_BASE + 0x14, | ||
1135 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1136 | COH901318_CX_CFG_LCR_DISABLE | | ||
1137 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1138 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1139 | .param.ctrl_lli_chained = 0 | | ||
1140 | COH901318_CX_CTRL_TC_ENABLE | | ||
1141 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1142 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1143 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1144 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1145 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1146 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1147 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1148 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1149 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1150 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1151 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1152 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1153 | .param.ctrl_lli = 0 | | ||
1154 | COH901318_CX_CTRL_TC_ENABLE | | ||
1155 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1156 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1157 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1158 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1159 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1160 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1161 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1162 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1163 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1164 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1165 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1166 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1167 | .param.ctrl_lli_last = 0 | | ||
1168 | COH901318_CX_CTRL_TC_ENABLE | | ||
1169 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1170 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1171 | COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE | | ||
1172 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1173 | COH901318_CX_CTRL_DST_ADDR_INC_DISABLE | | ||
1174 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1175 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1176 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1177 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1178 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1179 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1180 | COH901318_CX_CTRL_PRDD_SOURCE, | ||
1181 | }, | ||
1182 | { | ||
1183 | .number = U300_DMA_PCM_I2S1_RX, | ||
1184 | .name = "PCM I2S1 RX", | ||
1185 | .priority_high = 1, | ||
1186 | .dev_addr = U300_PCM_I2S1_BASE + 0x10, | ||
1187 | .param.config = COH901318_CX_CFG_CH_DISABLE | | ||
1188 | COH901318_CX_CFG_LCR_DISABLE | | ||
1189 | COH901318_CX_CFG_TC_IRQ_ENABLE | | ||
1190 | COH901318_CX_CFG_BE_IRQ_ENABLE, | ||
1191 | .param.ctrl_lli_chained = 0 | | ||
1192 | COH901318_CX_CTRL_TC_ENABLE | | ||
1193 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1194 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1195 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1196 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1197 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1198 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1199 | COH901318_CX_CTRL_TCP_DISABLE | | ||
1200 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1201 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1202 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1203 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1204 | COH901318_CX_CTRL_PRDD_DEST, | ||
1205 | .param.ctrl_lli = 0 | | ||
1206 | COH901318_CX_CTRL_TC_ENABLE | | ||
1207 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1208 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1209 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1210 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1211 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1212 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1213 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1214 | COH901318_CX_CTRL_TC_IRQ_DISABLE | | ||
1215 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1216 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1217 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1218 | COH901318_CX_CTRL_PRDD_DEST, | ||
1219 | .param.ctrl_lli_last = 0 | | ||
1220 | COH901318_CX_CTRL_TC_ENABLE | | ||
1221 | COH901318_CX_CTRL_BURST_COUNT_16_BYTES | | ||
1222 | COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS | | ||
1223 | COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE | | ||
1224 | COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS | | ||
1225 | COH901318_CX_CTRL_DST_ADDR_INC_ENABLE | | ||
1226 | COH901318_CX_CTRL_MASTER_MODE_M1RW | | ||
1227 | COH901318_CX_CTRL_TCP_ENABLE | | ||
1228 | COH901318_CX_CTRL_TC_IRQ_ENABLE | | ||
1229 | COH901318_CX_CTRL_HSP_ENABLE | | ||
1230 | COH901318_CX_CTRL_HSS_DISABLE | | ||
1231 | COH901318_CX_CTRL_DDMA_LEGACY | | ||
1232 | COH901318_CX_CTRL_PRDD_DEST, | ||
1233 | }, | ||
1234 | { | ||
1235 | .number = U300_DMA_XGAM_CDI, | ||
1236 | .name = "XGAM CDI", | ||
1237 | .priority_high = 0, | ||
1238 | }, | ||
1239 | { | ||
1240 | .number = U300_DMA_XGAM_PDI, | ||
1241 | .name = "XGAM PDI", | ||
1242 | .priority_high = 0, | ||
1243 | }, | ||
1244 | { | ||
1245 | .number = U300_DMA_SPI_TX, | ||
1246 | .name = "SPI TX", | ||
1247 | .priority_high = 0, | ||
1248 | }, | ||
1249 | { | ||
1250 | .number = U300_DMA_SPI_RX, | ||
1251 | .name = "SPI RX", | ||
1252 | .priority_high = 0, | ||
1253 | }, | ||
1254 | { | ||
1255 | .number = U300_DMA_GENERAL_PURPOSE_0, | ||
1256 | .name = "GENERAL 00", | ||
1257 | .priority_high = 0, | ||
1258 | |||
1259 | .param.config = flags_memcpy_config, | ||
1260 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1261 | .param.ctrl_lli = flags_memcpy_lli, | ||
1262 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1263 | }, | ||
1264 | { | ||
1265 | .number = U300_DMA_GENERAL_PURPOSE_1, | ||
1266 | .name = "GENERAL 01", | ||
1267 | .priority_high = 0, | ||
1268 | |||
1269 | .param.config = flags_memcpy_config, | ||
1270 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1271 | .param.ctrl_lli = flags_memcpy_lli, | ||
1272 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1273 | }, | ||
1274 | { | ||
1275 | .number = U300_DMA_GENERAL_PURPOSE_2, | ||
1276 | .name = "GENERAL 02", | ||
1277 | .priority_high = 0, | ||
1278 | |||
1279 | .param.config = flags_memcpy_config, | ||
1280 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1281 | .param.ctrl_lli = flags_memcpy_lli, | ||
1282 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1283 | }, | ||
1284 | { | ||
1285 | .number = U300_DMA_GENERAL_PURPOSE_3, | ||
1286 | .name = "GENERAL 03", | ||
1287 | .priority_high = 0, | ||
1288 | |||
1289 | .param.config = flags_memcpy_config, | ||
1290 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1291 | .param.ctrl_lli = flags_memcpy_lli, | ||
1292 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1293 | }, | ||
1294 | { | ||
1295 | .number = U300_DMA_GENERAL_PURPOSE_4, | ||
1296 | .name = "GENERAL 04", | ||
1297 | .priority_high = 0, | ||
1298 | |||
1299 | .param.config = flags_memcpy_config, | ||
1300 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1301 | .param.ctrl_lli = flags_memcpy_lli, | ||
1302 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1303 | }, | ||
1304 | { | ||
1305 | .number = U300_DMA_GENERAL_PURPOSE_5, | ||
1306 | .name = "GENERAL 05", | ||
1307 | .priority_high = 0, | ||
1308 | |||
1309 | .param.config = flags_memcpy_config, | ||
1310 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1311 | .param.ctrl_lli = flags_memcpy_lli, | ||
1312 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1313 | }, | ||
1314 | { | ||
1315 | .number = U300_DMA_GENERAL_PURPOSE_6, | ||
1316 | .name = "GENERAL 06", | ||
1317 | .priority_high = 0, | ||
1318 | |||
1319 | .param.config = flags_memcpy_config, | ||
1320 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1321 | .param.ctrl_lli = flags_memcpy_lli, | ||
1322 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1323 | }, | ||
1324 | { | ||
1325 | .number = U300_DMA_GENERAL_PURPOSE_7, | ||
1326 | .name = "GENERAL 07", | ||
1327 | .priority_high = 0, | ||
1328 | |||
1329 | .param.config = flags_memcpy_config, | ||
1330 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1331 | .param.ctrl_lli = flags_memcpy_lli, | ||
1332 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1333 | }, | ||
1334 | { | ||
1335 | .number = U300_DMA_GENERAL_PURPOSE_8, | ||
1336 | .name = "GENERAL 08", | ||
1337 | .priority_high = 0, | ||
1338 | |||
1339 | .param.config = flags_memcpy_config, | ||
1340 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1341 | .param.ctrl_lli = flags_memcpy_lli, | ||
1342 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1343 | }, | ||
1344 | #ifdef CONFIG_MACH_U300_BS335 | ||
1345 | { | ||
1346 | .number = U300_DMA_UART1_TX, | ||
1347 | .name = "UART1 TX", | ||
1348 | .priority_high = 0, | ||
1349 | }, | ||
1350 | { | ||
1351 | .number = U300_DMA_UART1_RX, | ||
1352 | .name = "UART1 RX", | ||
1353 | .priority_high = 0, | ||
1354 | } | ||
1355 | #else | ||
1356 | { | ||
1357 | .number = U300_DMA_GENERAL_PURPOSE_9, | ||
1358 | .name = "GENERAL 09", | ||
1359 | .priority_high = 0, | ||
1360 | |||
1361 | .param.config = flags_memcpy_config, | ||
1362 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1363 | .param.ctrl_lli = flags_memcpy_lli, | ||
1364 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1365 | }, | ||
1366 | { | ||
1367 | .number = U300_DMA_GENERAL_PURPOSE_10, | ||
1368 | .name = "GENERAL 10", | ||
1369 | .priority_high = 0, | ||
1370 | |||
1371 | .param.config = flags_memcpy_config, | ||
1372 | .param.ctrl_lli_chained = flags_memcpy_lli_chained, | ||
1373 | .param.ctrl_lli = flags_memcpy_lli, | ||
1374 | .param.ctrl_lli_last = flags_memcpy_lli_last, | ||
1375 | } | ||
1376 | #endif | ||
1377 | }; | ||
1378 | |||
1379 | |||
1380 | static struct coh901318_platform coh901318_platform = { | ||
1381 | .chans_slave = dma_slave_channels, | ||
1382 | .chans_memcpy = dma_memcpy_channels, | ||
1383 | .access_memory_state = coh901318_access_memory_state, | ||
1384 | .chan_conf = chan_config, | ||
1385 | .max_channels = U300_DMA_CHANNELS, | ||
1386 | }; | ||
1387 | |||
375 | static struct platform_device wdog_device = { | 1388 | static struct platform_device wdog_device = { |
376 | .name = "wdog", | 1389 | .name = "coh901327_wdog", |
377 | .id = -1, | 1390 | .id = -1, |
378 | .num_resources = ARRAY_SIZE(wdog_resources), | 1391 | .num_resources = ARRAY_SIZE(wdog_resources), |
379 | .resource = wdog_resources, | 1392 | .resource = wdog_resources, |
@@ -428,11 +1441,23 @@ static struct platform_device ave_device = { | |||
428 | .resource = ave_resources, | 1441 | .resource = ave_resources, |
429 | }; | 1442 | }; |
430 | 1443 | ||
1444 | static struct platform_device dma_device = { | ||
1445 | .name = "coh901318", | ||
1446 | .id = -1, | ||
1447 | .resource = dma_resource, | ||
1448 | .num_resources = ARRAY_SIZE(dma_resource), | ||
1449 | .dev = { | ||
1450 | .platform_data = &coh901318_platform, | ||
1451 | .coherent_dma_mask = ~0, | ||
1452 | }, | ||
1453 | }; | ||
1454 | |||
431 | /* | 1455 | /* |
432 | * Notice that AMBA devices are initialized before platform devices. | 1456 | * Notice that AMBA devices are initialized before platform devices. |
433 | * | 1457 | * |
434 | */ | 1458 | */ |
435 | static struct platform_device *platform_devs[] __initdata = { | 1459 | static struct platform_device *platform_devs[] __initdata = { |
1460 | &dma_device, | ||
436 | &i2c0_device, | 1461 | &i2c0_device, |
437 | &i2c1_device, | 1462 | &i2c1_device, |
438 | &keypad_device, | 1463 | &keypad_device, |
@@ -571,7 +1596,7 @@ static void __init u300_init_check_chip(void) | |||
571 | /* | 1596 | /* |
572 | * Some devices and their resources require reserved physical memory from | 1597 | * Some devices and their resources require reserved physical memory from |
573 | * the end of the available RAM. This function traverses the list of devices | 1598 | * the end of the available RAM. This function traverses the list of devices |
574 | * and assigns actual adresses to these. | 1599 | * and assigns actual addresses to these. |
575 | */ | 1600 | */ |
576 | static void __init u300_assign_physmem(void) | 1601 | static void __init u300_assign_physmem(void) |
577 | { | 1602 | { |
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c index 962f9de454de..5f55012b7c9e 100644 --- a/arch/arm/mach-u300/dummyspichip.c +++ b/arch/arm/mach-u300/dummyspichip.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
16 | #include <linux/spi/spi.h> | 16 | #include <linux/spi/spi.h> |
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/slab.h> | ||
18 | /* | 19 | /* |
19 | * WARNING! Do not include this pl022-specific controller header | 20 | * WARNING! Do not include this pl022-specific controller header |
20 | * for any generic driver. It is only done in this dummy chip | 21 | * for any generic driver. It is only done in this dummy chip |
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c index 0b35826b7d1d..5f61fd45a0c8 100644 --- a/arch/arm/mach-u300/gpio.c +++ b/arch/arm/mach-u300/gpio.c | |||
@@ -546,7 +546,7 @@ static void gpio_set_initial_values(void) | |||
546 | for (i = 0; i < U300_GPIO_MAX; i++) { | 546 | for (i = 0; i < U300_GPIO_MAX; i++) { |
547 | val = 0; | 547 | val = 0; |
548 | for (j = 0; j < 8; j++) | 548 | for (j = 0; j < 8; j++) |
549 | val |= (u32)((u300_gpio_config[i][j].pull_up == DISABLE_PULL_UP)) << j; | 549 | val |= (u32)((u300_gpio_config[i][j].pull_up == DISABLE_PULL_UP) << j); |
550 | local_irq_save(flags); | 550 | local_irq_save(flags); |
551 | writel(val, virtbase + U300_GPIO_PXPER + i * U300_GPIO_PORTX_SPACING); | 551 | writel(val, virtbase + U300_GPIO_PXPER + i * U300_GPIO_PORTX_SPACING); |
552 | local_irq_restore(flags); | 552 | local_irq_restore(flags); |
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c index 10be1f888b27..c73ed06b6065 100644 --- a/arch/arm/mach-u300/i2c.c +++ b/arch/arm/mach-u300/i2c.c | |||
@@ -9,13 +9,257 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | #include <linux/i2c.h> | 11 | #include <linux/i2c.h> |
12 | #include <linux/mfd/ab3100.h> | ||
13 | #include <linux/regulator/machine.h> | ||
14 | #include <linux/amba/bus.h> | ||
12 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
13 | 16 | ||
17 | /* | ||
18 | * Initial settings of ab3100 registers. | ||
19 | * Common for below LDO regulator settings are that | ||
20 | * bit 7-5 controls voltage. Bit 4 turns regulator ON(1) or OFF(0). | ||
21 | * Bit 3-2 controls sleep enable and bit 1-0 controls sleep mode. | ||
22 | */ | ||
23 | |||
24 | /* LDO_A 0x16: 2.75V, ON, SLEEP_A, SLEEP OFF GND */ | ||
25 | #define LDO_A_SETTING 0x16 | ||
26 | /* LDO_C 0x10: 2.65V, ON, SLEEP_A or B, SLEEP full power */ | ||
27 | #define LDO_C_SETTING 0x10 | ||
28 | /* LDO_D 0x10: 2.65V, ON, sleep mode not used */ | ||
29 | #define LDO_D_SETTING 0x10 | ||
30 | /* LDO_E 0x10: 1.8V, ON, SLEEP_A or B, SLEEP full power */ | ||
31 | #define LDO_E_SETTING 0x10 | ||
32 | /* LDO_E SLEEP 0x00: 1.8V, not used, SLEEP_A or B, not used */ | ||
33 | #define LDO_E_SLEEP_SETTING 0x00 | ||
34 | /* LDO_F 0xD0: 2.5V, ON, SLEEP_A or B, SLEEP full power */ | ||
35 | #define LDO_F_SETTING 0xD0 | ||
36 | /* LDO_G 0x00: 2.85V, OFF, SLEEP_A or B, SLEEP full power */ | ||
37 | #define LDO_G_SETTING 0x00 | ||
38 | /* LDO_H 0x18: 2.75V, ON, SLEEP_B, SLEEP full power */ | ||
39 | #define LDO_H_SETTING 0x18 | ||
40 | /* LDO_K 0x00: 2.75V, OFF, SLEEP_A or B, SLEEP full power */ | ||
41 | #define LDO_K_SETTING 0x00 | ||
42 | /* LDO_EXT 0x00: Voltage not set, OFF, not used, not used */ | ||
43 | #define LDO_EXT_SETTING 0x00 | ||
44 | /* BUCK 0x7D: 1.2V, ON, SLEEP_A and B, SLEEP low power */ | ||
45 | #define BUCK_SETTING 0x7D | ||
46 | /* BUCK SLEEP 0xAC: 1.05V, Not used, SLEEP_A and B, Not used */ | ||
47 | #define BUCK_SLEEP_SETTING 0xAC | ||
48 | |||
49 | static struct regulator_consumer_supply supply_ldo_c[] = { | ||
50 | { | ||
51 | .dev_name = "ab3100-codec", | ||
52 | .supply = "vaudio", /* Powers the codec */ | ||
53 | }, | ||
54 | }; | ||
55 | |||
56 | /* | ||
57 | * This one needs to be a supply so we can turn it off | ||
58 | * in order to shut down the system. | ||
59 | */ | ||
60 | static struct regulator_consumer_supply supply_ldo_d[] = { | ||
61 | { | ||
62 | .dev = NULL, | ||
63 | .supply = "vana15", /* Powers the SoC (CPU etc) */ | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | static struct regulator_consumer_supply supply_ldo_g[] = { | ||
68 | { | ||
69 | .dev_name = "mmci", | ||
70 | .supply = "vmmc", /* Powers MMC/SD card */ | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct regulator_consumer_supply supply_ldo_h[] = { | ||
75 | { | ||
76 | .dev_name = "xgam_pdi", | ||
77 | .supply = "vdisp", /* Powers camera, display etc */ | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | static struct regulator_consumer_supply supply_ldo_k[] = { | ||
82 | { | ||
83 | .dev_name = "irda", | ||
84 | .supply = "vir", /* Power IrDA */ | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | /* | ||
89 | * This is a placeholder for whoever wish to use the | ||
90 | * external power. | ||
91 | */ | ||
92 | static struct regulator_consumer_supply supply_ldo_ext[] = { | ||
93 | { | ||
94 | .dev = NULL, | ||
95 | .supply = "vext", /* External power */ | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | /* Preset (hardware defined) voltages for these regulators */ | ||
100 | #define LDO_A_VOLTAGE 2750000 | ||
101 | #define LDO_C_VOLTAGE 2650000 | ||
102 | #define LDO_D_VOLTAGE 2650000 | ||
103 | |||
104 | static struct ab3100_platform_data ab3100_plf_data = { | ||
105 | .reg_constraints = { | ||
106 | /* LDO A routing and constraints */ | ||
107 | { | ||
108 | .constraints = { | ||
109 | .name = "vrad", | ||
110 | .min_uV = LDO_A_VOLTAGE, | ||
111 | .max_uV = LDO_A_VOLTAGE, | ||
112 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
113 | .always_on = 1, | ||
114 | .boot_on = 1, | ||
115 | }, | ||
116 | }, | ||
117 | /* LDO C routing and constraints */ | ||
118 | { | ||
119 | .constraints = { | ||
120 | .min_uV = LDO_C_VOLTAGE, | ||
121 | .max_uV = LDO_C_VOLTAGE, | ||
122 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
123 | }, | ||
124 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_c), | ||
125 | .consumer_supplies = supply_ldo_c, | ||
126 | }, | ||
127 | /* LDO D routing and constraints */ | ||
128 | { | ||
129 | .constraints = { | ||
130 | .min_uV = LDO_D_VOLTAGE, | ||
131 | .max_uV = LDO_D_VOLTAGE, | ||
132 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
133 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
134 | /* | ||
135 | * Actually this is boot_on but we need | ||
136 | * to reference count it externally to | ||
137 | * be able to shut down the system. | ||
138 | */ | ||
139 | }, | ||
140 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_d), | ||
141 | .consumer_supplies = supply_ldo_d, | ||
142 | }, | ||
143 | /* LDO E routing and constraints */ | ||
144 | { | ||
145 | .constraints = { | ||
146 | .name = "vio", | ||
147 | .min_uV = 1800000, | ||
148 | .max_uV = 1800000, | ||
149 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
150 | .valid_ops_mask = | ||
151 | REGULATOR_CHANGE_VOLTAGE | | ||
152 | REGULATOR_CHANGE_STATUS, | ||
153 | .always_on = 1, | ||
154 | .boot_on = 1, | ||
155 | }, | ||
156 | }, | ||
157 | /* LDO F routing and constraints */ | ||
158 | { | ||
159 | .constraints = { | ||
160 | .name = "vana25", | ||
161 | .min_uV = 2500000, | ||
162 | .max_uV = 2500000, | ||
163 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
164 | .valid_ops_mask = | ||
165 | REGULATOR_CHANGE_VOLTAGE | | ||
166 | REGULATOR_CHANGE_STATUS, | ||
167 | .always_on = 1, | ||
168 | .boot_on = 1, | ||
169 | }, | ||
170 | }, | ||
171 | /* LDO G routing and constraints */ | ||
172 | { | ||
173 | .constraints = { | ||
174 | .min_uV = 1500000, | ||
175 | .max_uV = 2850000, | ||
176 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
177 | .valid_ops_mask = | ||
178 | REGULATOR_CHANGE_VOLTAGE | | ||
179 | REGULATOR_CHANGE_STATUS, | ||
180 | }, | ||
181 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_g), | ||
182 | .consumer_supplies = supply_ldo_g, | ||
183 | }, | ||
184 | /* LDO H routing and constraints */ | ||
185 | { | ||
186 | .constraints = { | ||
187 | .min_uV = 1200000, | ||
188 | .max_uV = 2750000, | ||
189 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
190 | .valid_ops_mask = | ||
191 | REGULATOR_CHANGE_VOLTAGE | | ||
192 | REGULATOR_CHANGE_STATUS, | ||
193 | }, | ||
194 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_h), | ||
195 | .consumer_supplies = supply_ldo_h, | ||
196 | }, | ||
197 | /* LDO K routing and constraints */ | ||
198 | { | ||
199 | .constraints = { | ||
200 | .min_uV = 1800000, | ||
201 | .max_uV = 2750000, | ||
202 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
203 | .valid_ops_mask = | ||
204 | REGULATOR_CHANGE_VOLTAGE | | ||
205 | REGULATOR_CHANGE_STATUS, | ||
206 | }, | ||
207 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_k), | ||
208 | .consumer_supplies = supply_ldo_k, | ||
209 | }, | ||
210 | /* External regulator interface. No fixed voltage specified. | ||
211 | * If we knew the voltage of the external regulator and it | ||
212 | * was connected on the board, we could add the (fixed) | ||
213 | * voltage for it here. | ||
214 | */ | ||
215 | { | ||
216 | .constraints = { | ||
217 | .min_uV = 0, | ||
218 | .max_uV = 0, | ||
219 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
220 | .valid_ops_mask = | ||
221 | REGULATOR_CHANGE_STATUS, | ||
222 | }, | ||
223 | .num_consumer_supplies = ARRAY_SIZE(supply_ldo_ext), | ||
224 | .consumer_supplies = supply_ldo_ext, | ||
225 | }, | ||
226 | /* Buck converter routing and constraints */ | ||
227 | { | ||
228 | .constraints = { | ||
229 | .name = "vcore", | ||
230 | .min_uV = 1200000, | ||
231 | .max_uV = 1800000, | ||
232 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
233 | .valid_ops_mask = | ||
234 | REGULATOR_CHANGE_VOLTAGE | | ||
235 | REGULATOR_CHANGE_STATUS, | ||
236 | .always_on = 1, | ||
237 | .boot_on = 1, | ||
238 | }, | ||
239 | }, | ||
240 | }, | ||
241 | .reg_initvals = { | ||
242 | LDO_A_SETTING, | ||
243 | LDO_C_SETTING, | ||
244 | LDO_E_SETTING, | ||
245 | LDO_E_SLEEP_SETTING, | ||
246 | LDO_F_SETTING, | ||
247 | LDO_G_SETTING, | ||
248 | LDO_H_SETTING, | ||
249 | LDO_K_SETTING, | ||
250 | LDO_EXT_SETTING, | ||
251 | BUCK_SETTING, | ||
252 | BUCK_SLEEP_SETTING, | ||
253 | LDO_D_SETTING, | ||
254 | }, | ||
255 | }; | ||
256 | |||
14 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { | 257 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { |
15 | { | 258 | { |
16 | .type = "ab3100", | 259 | .type = "ab3100", |
17 | .addr = 0x48, | 260 | .addr = 0x48, |
18 | .irq = IRQ_U300_IRQ0_EXT, | 261 | .irq = IRQ_U300_IRQ0_EXT, |
262 | .platform_data = &ab3100_plf_data, | ||
19 | }, | 263 | }, |
20 | }; | 264 | }; |
21 | 265 | ||
@@ -38,6 +282,11 @@ void __init u300_i2c_register_board_devices(void) | |||
38 | { | 282 | { |
39 | i2c_register_board_info(0, bus0_i2c_board_info, | 283 | i2c_register_board_info(0, bus0_i2c_board_info, |
40 | ARRAY_SIZE(bus0_i2c_board_info)); | 284 | ARRAY_SIZE(bus0_i2c_board_info)); |
285 | /* | ||
286 | * This makes the core shut down all unused regulators | ||
287 | * after all the initcalls have completed. | ||
288 | */ | ||
289 | regulator_has_full_constraints(); | ||
41 | i2c_register_board_info(1, bus1_i2c_board_info, | 290 | i2c_register_board_info(1, bus1_i2c_board_info, |
42 | ARRAY_SIZE(bus1_i2c_board_info)); | 291 | ARRAY_SIZE(bus1_i2c_board_info)); |
43 | } | 292 | } |
diff --git a/arch/arm/mach-u300/include/mach/coh901318.h b/arch/arm/mach-u300/include/mach/coh901318.h new file mode 100644 index 000000000000..b8155b4e5ffa --- /dev/null +++ b/arch/arm/mach-u300/include/mach/coh901318.h | |||
@@ -0,0 +1,281 @@ | |||
1 | /* | ||
2 | * | ||
3 | * include/linux/coh901318.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2009 ST-Ericsson | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * DMA driver for COH 901 318 | ||
9 | * Author: Per Friden <per.friden@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef COH901318_H | ||
13 | #define COH901318_H | ||
14 | |||
15 | #include <linux/device.h> | ||
16 | #include <linux/dmaengine.h> | ||
17 | |||
18 | #define MAX_DMA_PACKET_SIZE_SHIFT 11 | ||
19 | #define MAX_DMA_PACKET_SIZE (1 << MAX_DMA_PACKET_SIZE_SHIFT) | ||
20 | |||
21 | /** | ||
22 | * struct coh901318_lli - linked list item for DMAC | ||
23 | * @control: control settings for DMAC | ||
24 | * @src_addr: transfer source address | ||
25 | * @dst_addr: transfer destination address | ||
26 | * @link_addr: physical address to next lli | ||
27 | * @virt_link_addr: virtual addres of next lli (only used by pool_free) | ||
28 | * @phy_this: physical address of current lli (only used by pool_free) | ||
29 | */ | ||
30 | struct coh901318_lli { | ||
31 | u32 control; | ||
32 | dma_addr_t src_addr; | ||
33 | dma_addr_t dst_addr; | ||
34 | dma_addr_t link_addr; | ||
35 | |||
36 | void *virt_link_addr; | ||
37 | dma_addr_t phy_this; | ||
38 | }; | ||
39 | /** | ||
40 | * struct coh901318_params - parameters for DMAC configuration | ||
41 | * @config: DMA config register | ||
42 | * @ctrl_lli_last: DMA control register for the last lli in the list | ||
43 | * @ctrl_lli: DMA control register for an lli | ||
44 | * @ctrl_lli_chained: DMA control register for a chained lli | ||
45 | */ | ||
46 | struct coh901318_params { | ||
47 | u32 config; | ||
48 | u32 ctrl_lli_last; | ||
49 | u32 ctrl_lli; | ||
50 | u32 ctrl_lli_chained; | ||
51 | }; | ||
52 | /** | ||
53 | * struct coh_dma_channel - dma channel base | ||
54 | * @name: ascii name of dma channel | ||
55 | * @number: channel id number | ||
56 | * @desc_nbr_max: number of preallocated descriptors | ||
57 | * @priority_high: prio of channel, 0 low otherwise high. | ||
58 | * @param: configuration parameters | ||
59 | * @dev_addr: physical address of periphal connected to channel | ||
60 | */ | ||
61 | struct coh_dma_channel { | ||
62 | const char name[32]; | ||
63 | const int number; | ||
64 | const int desc_nbr_max; | ||
65 | const int priority_high; | ||
66 | const struct coh901318_params param; | ||
67 | const dma_addr_t dev_addr; | ||
68 | }; | ||
69 | |||
70 | /** | ||
71 | * dma_access_memory_state_t - register dma for memory access | ||
72 | * | ||
73 | * @dev: The dma device | ||
74 | * @active: 1 means dma intends to access memory | ||
75 | * 0 means dma wont access memory | ||
76 | */ | ||
77 | typedef void (*dma_access_memory_state_t)(struct device *dev, | ||
78 | bool active); | ||
79 | |||
80 | /** | ||
81 | * struct powersave - DMA power save structure | ||
82 | * @lock: lock protecting data in this struct | ||
83 | * @started_channels: bit mask indicating active dma channels | ||
84 | */ | ||
85 | struct powersave { | ||
86 | spinlock_t lock; | ||
87 | u64 started_channels; | ||
88 | }; | ||
89 | /** | ||
90 | * struct coh901318_platform - platform arch structure | ||
91 | * @chans_slave: specifying dma slave channels | ||
92 | * @chans_memcpy: specifying dma memcpy channels | ||
93 | * @access_memory_state: requesting DMA memeory access (on / off) | ||
94 | * @chan_conf: dma channel configurations | ||
95 | * @max_channels: max number of dma chanenls | ||
96 | */ | ||
97 | struct coh901318_platform { | ||
98 | const int *chans_slave; | ||
99 | const int *chans_memcpy; | ||
100 | const dma_access_memory_state_t access_memory_state; | ||
101 | const struct coh_dma_channel *chan_conf; | ||
102 | const int max_channels; | ||
103 | }; | ||
104 | |||
105 | /** | ||
106 | * coh901318_get_bytes_left() - Get number of bytes left on a current transfer | ||
107 | * @chan: dma channel handle | ||
108 | * return number of bytes left, or negative on error | ||
109 | */ | ||
110 | u32 coh901318_get_bytes_left(struct dma_chan *chan); | ||
111 | |||
112 | /** | ||
113 | * coh901318_stop() - Stops dma transfer | ||
114 | * @chan: dma channel handle | ||
115 | * return 0 on success otherwise negative value | ||
116 | */ | ||
117 | void coh901318_stop(struct dma_chan *chan); | ||
118 | |||
119 | /** | ||
120 | * coh901318_continue() - Resumes a stopped dma transfer | ||
121 | * @chan: dma channel handle | ||
122 | * return 0 on success otherwise negative value | ||
123 | */ | ||
124 | void coh901318_continue(struct dma_chan *chan); | ||
125 | |||
126 | /** | ||
127 | * coh901318_filter_id() - DMA channel filter function | ||
128 | * @chan: dma channel handle | ||
129 | * @chan_id: id of dma channel to be filter out | ||
130 | * | ||
131 | * In dma_request_channel() it specifies what channel id to be requested | ||
132 | */ | ||
133 | bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); | ||
134 | |||
135 | /* | ||
136 | * DMA Controller - this access the static mappings of the coh901318 dma. | ||
137 | * | ||
138 | */ | ||
139 | |||
140 | #define COH901318_MOD32_MASK (0x1F) | ||
141 | #define COH901318_WORD_MASK (0xFFFFFFFF) | ||
142 | /* INT_STATUS - Interrupt Status Registers 32bit (R/-) */ | ||
143 | #define COH901318_INT_STATUS1 (0x0000) | ||
144 | #define COH901318_INT_STATUS2 (0x0004) | ||
145 | /* TC_INT_STATUS - Terminal Count Interrupt Status Registers 32bit (R/-) */ | ||
146 | #define COH901318_TC_INT_STATUS1 (0x0008) | ||
147 | #define COH901318_TC_INT_STATUS2 (0x000C) | ||
148 | /* TC_INT_CLEAR - Terminal Count Interrupt Clear Registers 32bit (-/W) */ | ||
149 | #define COH901318_TC_INT_CLEAR1 (0x0010) | ||
150 | #define COH901318_TC_INT_CLEAR2 (0x0014) | ||
151 | /* RAW_TC_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */ | ||
152 | #define COH901318_RAW_TC_INT_STATUS1 (0x0018) | ||
153 | #define COH901318_RAW_TC_INT_STATUS2 (0x001C) | ||
154 | /* BE_INT_STATUS - Bus Error Interrupt Status Registers 32bit (R/-) */ | ||
155 | #define COH901318_BE_INT_STATUS1 (0x0020) | ||
156 | #define COH901318_BE_INT_STATUS2 (0x0024) | ||
157 | /* BE_INT_CLEAR - Bus Error Interrupt Clear Registers 32bit (-/W) */ | ||
158 | #define COH901318_BE_INT_CLEAR1 (0x0028) | ||
159 | #define COH901318_BE_INT_CLEAR2 (0x002C) | ||
160 | /* RAW_BE_INT_STATUS - Raw Term Count Interrupt Status Registers 32bit (R/-) */ | ||
161 | #define COH901318_RAW_BE_INT_STATUS1 (0x0030) | ||
162 | #define COH901318_RAW_BE_INT_STATUS2 (0x0034) | ||
163 | |||
164 | /* | ||
165 | * CX_CFG - Channel Configuration Registers 32bit (R/W) | ||
166 | */ | ||
167 | #define COH901318_CX_CFG (0x0100) | ||
168 | #define COH901318_CX_CFG_SPACING (0x04) | ||
169 | /* Channel enable activates tha dma job */ | ||
170 | #define COH901318_CX_CFG_CH_ENABLE (0x00000001) | ||
171 | #define COH901318_CX_CFG_CH_DISABLE (0x00000000) | ||
172 | /* Request Mode */ | ||
173 | #define COH901318_CX_CFG_RM_MASK (0x00000006) | ||
174 | #define COH901318_CX_CFG_RM_MEMORY_TO_MEMORY (0x0 << 1) | ||
175 | #define COH901318_CX_CFG_RM_PRIMARY_TO_MEMORY (0x1 << 1) | ||
176 | #define COH901318_CX_CFG_RM_MEMORY_TO_PRIMARY (0x1 << 1) | ||
177 | #define COH901318_CX_CFG_RM_PRIMARY_TO_SECONDARY (0x3 << 1) | ||
178 | #define COH901318_CX_CFG_RM_SECONDARY_TO_PRIMARY (0x3 << 1) | ||
179 | /* Linked channel request field. RM must == 11 */ | ||
180 | #define COH901318_CX_CFG_LCRF_SHIFT 3 | ||
181 | #define COH901318_CX_CFG_LCRF_MASK (0x000001F8) | ||
182 | #define COH901318_CX_CFG_LCR_DISABLE (0x00000000) | ||
183 | /* Terminal Counter Interrupt Request Mask */ | ||
184 | #define COH901318_CX_CFG_TC_IRQ_ENABLE (0x00000200) | ||
185 | #define COH901318_CX_CFG_TC_IRQ_DISABLE (0x00000000) | ||
186 | /* Bus Error interrupt Mask */ | ||
187 | #define COH901318_CX_CFG_BE_IRQ_ENABLE (0x00000400) | ||
188 | #define COH901318_CX_CFG_BE_IRQ_DISABLE (0x00000000) | ||
189 | |||
190 | /* | ||
191 | * CX_STAT - Channel Status Registers 32bit (R/-) | ||
192 | */ | ||
193 | #define COH901318_CX_STAT (0x0200) | ||
194 | #define COH901318_CX_STAT_SPACING (0x04) | ||
195 | #define COH901318_CX_STAT_RBE_IRQ_IND (0x00000008) | ||
196 | #define COH901318_CX_STAT_RTC_IRQ_IND (0x00000004) | ||
197 | #define COH901318_CX_STAT_ACTIVE (0x00000002) | ||
198 | #define COH901318_CX_STAT_ENABLED (0x00000001) | ||
199 | |||
200 | /* | ||
201 | * CX_CTRL - Channel Control Registers 32bit (R/W) | ||
202 | */ | ||
203 | #define COH901318_CX_CTRL (0x0400) | ||
204 | #define COH901318_CX_CTRL_SPACING (0x10) | ||
205 | /* Transfer Count Enable */ | ||
206 | #define COH901318_CX_CTRL_TC_ENABLE (0x00001000) | ||
207 | #define COH901318_CX_CTRL_TC_DISABLE (0x00000000) | ||
208 | /* Transfer Count Value 0 - 4095 */ | ||
209 | #define COH901318_CX_CTRL_TC_VALUE_MASK (0x00000FFF) | ||
210 | /* Burst count */ | ||
211 | #define COH901318_CX_CTRL_BURST_COUNT_MASK (0x0000E000) | ||
212 | #define COH901318_CX_CTRL_BURST_COUNT_64_BYTES (0x7 << 13) | ||
213 | #define COH901318_CX_CTRL_BURST_COUNT_48_BYTES (0x6 << 13) | ||
214 | #define COH901318_CX_CTRL_BURST_COUNT_32_BYTES (0x5 << 13) | ||
215 | #define COH901318_CX_CTRL_BURST_COUNT_16_BYTES (0x4 << 13) | ||
216 | #define COH901318_CX_CTRL_BURST_COUNT_8_BYTES (0x3 << 13) | ||
217 | #define COH901318_CX_CTRL_BURST_COUNT_4_BYTES (0x2 << 13) | ||
218 | #define COH901318_CX_CTRL_BURST_COUNT_2_BYTES (0x1 << 13) | ||
219 | #define COH901318_CX_CTRL_BURST_COUNT_1_BYTE (0x0 << 13) | ||
220 | /* Source bus size */ | ||
221 | #define COH901318_CX_CTRL_SRC_BUS_SIZE_MASK (0x00030000) | ||
222 | #define COH901318_CX_CTRL_SRC_BUS_SIZE_32_BITS (0x2 << 16) | ||
223 | #define COH901318_CX_CTRL_SRC_BUS_SIZE_16_BITS (0x1 << 16) | ||
224 | #define COH901318_CX_CTRL_SRC_BUS_SIZE_8_BITS (0x0 << 16) | ||
225 | /* Source address increment */ | ||
226 | #define COH901318_CX_CTRL_SRC_ADDR_INC_ENABLE (0x00040000) | ||
227 | #define COH901318_CX_CTRL_SRC_ADDR_INC_DISABLE (0x00000000) | ||
228 | /* Destination Bus Size */ | ||
229 | #define COH901318_CX_CTRL_DST_BUS_SIZE_MASK (0x00180000) | ||
230 | #define COH901318_CX_CTRL_DST_BUS_SIZE_32_BITS (0x2 << 19) | ||
231 | #define COH901318_CX_CTRL_DST_BUS_SIZE_16_BITS (0x1 << 19) | ||
232 | #define COH901318_CX_CTRL_DST_BUS_SIZE_8_BITS (0x0 << 19) | ||
233 | /* Destination address increment */ | ||
234 | #define COH901318_CX_CTRL_DST_ADDR_INC_ENABLE (0x00200000) | ||
235 | #define COH901318_CX_CTRL_DST_ADDR_INC_DISABLE (0x00000000) | ||
236 | /* Master Mode (Master2 is only connected to MSL) */ | ||
237 | #define COH901318_CX_CTRL_MASTER_MODE_MASK (0x00C00000) | ||
238 | #define COH901318_CX_CTRL_MASTER_MODE_M2R_M1W (0x3 << 22) | ||
239 | #define COH901318_CX_CTRL_MASTER_MODE_M1R_M2W (0x2 << 22) | ||
240 | #define COH901318_CX_CTRL_MASTER_MODE_M2RW (0x1 << 22) | ||
241 | #define COH901318_CX_CTRL_MASTER_MODE_M1RW (0x0 << 22) | ||
242 | /* Terminal Count flag to PER enable */ | ||
243 | #define COH901318_CX_CTRL_TCP_ENABLE (0x01000000) | ||
244 | #define COH901318_CX_CTRL_TCP_DISABLE (0x00000000) | ||
245 | /* Terminal Count flags to CPU enable */ | ||
246 | #define COH901318_CX_CTRL_TC_IRQ_ENABLE (0x02000000) | ||
247 | #define COH901318_CX_CTRL_TC_IRQ_DISABLE (0x00000000) | ||
248 | /* Hand shake to peripheral */ | ||
249 | #define COH901318_CX_CTRL_HSP_ENABLE (0x04000000) | ||
250 | #define COH901318_CX_CTRL_HSP_DISABLE (0x00000000) | ||
251 | #define COH901318_CX_CTRL_HSS_ENABLE (0x08000000) | ||
252 | #define COH901318_CX_CTRL_HSS_DISABLE (0x00000000) | ||
253 | /* DMA mode */ | ||
254 | #define COH901318_CX_CTRL_DDMA_MASK (0x30000000) | ||
255 | #define COH901318_CX_CTRL_DDMA_LEGACY (0x0 << 28) | ||
256 | #define COH901318_CX_CTRL_DDMA_DEMAND_DMA1 (0x1 << 28) | ||
257 | #define COH901318_CX_CTRL_DDMA_DEMAND_DMA2 (0x2 << 28) | ||
258 | /* Primary Request Data Destination */ | ||
259 | #define COH901318_CX_CTRL_PRDD_MASK (0x40000000) | ||
260 | #define COH901318_CX_CTRL_PRDD_DEST (0x1 << 30) | ||
261 | #define COH901318_CX_CTRL_PRDD_SOURCE (0x0 << 30) | ||
262 | |||
263 | /* | ||
264 | * CX_SRC_ADDR - Channel Source Address Registers 32bit (R/W) | ||
265 | */ | ||
266 | #define COH901318_CX_SRC_ADDR (0x0404) | ||
267 | #define COH901318_CX_SRC_ADDR_SPACING (0x10) | ||
268 | |||
269 | /* | ||
270 | * CX_DST_ADDR - Channel Destination Address Registers 32bit R/W | ||
271 | */ | ||
272 | #define COH901318_CX_DST_ADDR (0x0408) | ||
273 | #define COH901318_CX_DST_ADDR_SPACING (0x10) | ||
274 | |||
275 | /* | ||
276 | * CX_LNK_ADDR - Channel Link Address Registers 32bit (R/W) | ||
277 | */ | ||
278 | #define COH901318_CX_LNK_ADDR (0x040C) | ||
279 | #define COH901318_CX_LNK_ADDR_SPACING (0x10) | ||
280 | #define COH901318_CX_LNK_LINK_IMMEDIATE (0x00000001) | ||
281 | #endif /* COH901318_H */ | ||
diff --git a/arch/arm/mach-u300/include/mach/debug-macro.S b/arch/arm/mach-u300/include/mach/debug-macro.S index f3a1cbbeeab3..92c12420256f 100644 --- a/arch/arm/mach-u300/include/mach/debug-macro.S +++ b/arch/arm/mach-u300/include/mach/debug-macro.S | |||
@@ -10,8 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
12 | 12 | ||
13 | .macro addruart,rx | 13 | .macro addruart, rx, tmp |
14 | /* If we move the adress using MMU, use this. */ | 14 | /* If we move the address using MMU, use this. */ |
15 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
16 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
17 | ldreq \rx, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address | 17 | ldreq \rx, = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address |
diff --git a/arch/arm/mach-u300/include/mach/dma_channels.h b/arch/arm/mach-u300/include/mach/dma_channels.h new file mode 100644 index 000000000000..b239149ba0d0 --- /dev/null +++ b/arch/arm/mach-u300/include/mach/dma_channels.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * | ||
3 | * arch/arm/mach-u300/include/mach/dma_channels.h | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2009 ST-Ericsson | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | * Map file for the U300 dma driver. | ||
9 | * Author: Per Friden <per.friden@stericsson.com> | ||
10 | */ | ||
11 | |||
12 | #ifndef DMA_CHANNELS_H | ||
13 | #define DMA_CHANNELS_H | ||
14 | |||
15 | #define U300_DMA_MSL_TX_0 0 | ||
16 | #define U300_DMA_MSL_TX_1 1 | ||
17 | #define U300_DMA_MSL_TX_2 2 | ||
18 | #define U300_DMA_MSL_TX_3 3 | ||
19 | #define U300_DMA_MSL_TX_4 4 | ||
20 | #define U300_DMA_MSL_TX_5 5 | ||
21 | #define U300_DMA_MSL_TX_6 6 | ||
22 | #define U300_DMA_MSL_RX_0 7 | ||
23 | #define U300_DMA_MSL_RX_1 8 | ||
24 | #define U300_DMA_MSL_RX_2 9 | ||
25 | #define U300_DMA_MSL_RX_3 10 | ||
26 | #define U300_DMA_MSL_RX_4 11 | ||
27 | #define U300_DMA_MSL_RX_5 12 | ||
28 | #define U300_DMA_MSL_RX_6 13 | ||
29 | #define U300_DMA_MMCSD_RX_TX 14 | ||
30 | #define U300_DMA_MSPRO_TX 15 | ||
31 | #define U300_DMA_MSPRO_RX 16 | ||
32 | #define U300_DMA_UART0_TX 17 | ||
33 | #define U300_DMA_UART0_RX 18 | ||
34 | #define U300_DMA_APEX_TX 19 | ||
35 | #define U300_DMA_APEX_RX 20 | ||
36 | #define U300_DMA_PCM_I2S0_TX 21 | ||
37 | #define U300_DMA_PCM_I2S0_RX 22 | ||
38 | #define U300_DMA_PCM_I2S1_TX 23 | ||
39 | #define U300_DMA_PCM_I2S1_RX 24 | ||
40 | #define U300_DMA_XGAM_CDI 25 | ||
41 | #define U300_DMA_XGAM_PDI 26 | ||
42 | #define U300_DMA_SPI_TX 27 | ||
43 | #define U300_DMA_SPI_RX 28 | ||
44 | #define U300_DMA_GENERAL_PURPOSE_0 29 | ||
45 | #define U300_DMA_GENERAL_PURPOSE_1 30 | ||
46 | #define U300_DMA_GENERAL_PURPOSE_2 31 | ||
47 | #define U300_DMA_GENERAL_PURPOSE_3 32 | ||
48 | #define U300_DMA_GENERAL_PURPOSE_4 33 | ||
49 | #define U300_DMA_GENERAL_PURPOSE_5 34 | ||
50 | #define U300_DMA_GENERAL_PURPOSE_6 35 | ||
51 | #define U300_DMA_GENERAL_PURPOSE_7 36 | ||
52 | #define U300_DMA_GENERAL_PURPOSE_8 37 | ||
53 | #ifdef CONFIG_MACH_U300_BS335 | ||
54 | #define U300_DMA_UART1_TX 38 | ||
55 | #define U300_DMA_UART1_RX 39 | ||
56 | #else | ||
57 | #define U300_DMA_GENERAL_PURPOSE_9 38 | ||
58 | #define U300_DMA_GENERAL_PURPOSE_10 39 | ||
59 | #endif | ||
60 | |||
61 | #ifdef CONFIG_MACH_U300_BS335 | ||
62 | #define U300_DMA_DEVICE_CHANNELS 32 | ||
63 | #else | ||
64 | #define U300_DMA_DEVICE_CHANNELS 30 | ||
65 | #endif | ||
66 | #define U300_DMA_CHANNELS 40 | ||
67 | |||
68 | |||
69 | #endif /* DMA_CHANNELS_H */ | ||
diff --git a/arch/arm/mach-u300/include/mach/u300-regs.h b/arch/arm/mach-u300/include/mach/u300-regs.h index 88333dfb19fc..56721a0cd2af 100644 --- a/arch/arm/mach-u300/include/mach/u300-regs.h +++ b/arch/arm/mach-u300/include/mach/u300-regs.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2006-2009 ST-Ericsson AB | 6 | * Copyright (C) 2006-2009 ST-Ericsson AB |
7 | * License terms: GNU General Public License (GPL) version 2 | 7 | * License terms: GNU General Public License (GPL) version 2 |
8 | * Basic register address definitions in physical memory and | 8 | * Basic register address definitions in physical memory and |
9 | * some block defintions for core devices like the timer. | 9 | * some block definitions for core devices like the timer. |
10 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 10 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
11 | */ | 11 | */ |
12 | 12 | ||
diff --git a/arch/arm/mach-u300/include/mach/vmalloc.h b/arch/arm/mach-u300/include/mach/vmalloc.h index b00c51a66fbe..ec423b92b81d 100644 --- a/arch/arm/mach-u300/include/mach/vmalloc.h +++ b/arch/arm/mach-u300/include/mach/vmalloc.h | |||
@@ -9,4 +9,4 @@ | |||
9 | * End must be above the I/O registers and on an even 2MiB boundary. | 9 | * End must be above the I/O registers and on an even 2MiB boundary. |
10 | * Author: Linus Walleij <linus.walleij@stericsson.com> | 10 | * Author: Linus Walleij <linus.walleij@stericsson.com> |
11 | */ | 11 | */ |
12 | #define VMALLOC_END 0xfe800000 | 12 | #define VMALLOC_END 0xfe800000UL |
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 7b6b016786bb..77fbb1e0e528 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/regulator/machine.h> | 20 | #include <linux/regulator/machine.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/amba/mmci.h> | 22 | #include <linux/amba/mmci.h> |
23 | #include <linux/slab.h> | ||
23 | 24 | ||
24 | #include "mmc.h" | 25 | #include "mmc.h" |
25 | #include "padmux.h" | 26 | #include "padmux.h" |
@@ -40,64 +41,6 @@ static unsigned int mmc_status(struct device *dev) | |||
40 | return mmci_card->mmc_inserted; | 41 | return mmci_card->mmc_inserted; |
41 | } | 42 | } |
42 | 43 | ||
43 | /* | ||
44 | * Here follows a large chunk of code which will only be enabled if you | ||
45 | * have both the AB3100 chip mounted and the MMC subsystem activated. | ||
46 | */ | ||
47 | |||
48 | static u32 mmc_translate_vdd(struct device *dev, unsigned int voltage) | ||
49 | { | ||
50 | int v; | ||
51 | |||
52 | /* | ||
53 | * MMC Spec: | ||
54 | * bit 7: 1.70 - 1.95V | ||
55 | * bit 8 - 14: 2.0 - 2.6V | ||
56 | * bit 15 - 23: 2.7 - 3.6V | ||
57 | * | ||
58 | * ab3100 voltages: | ||
59 | * 000 - 2.85V | ||
60 | * 001 - 2.75V | ||
61 | * 010 - 1.8V | ||
62 | * 011 - 1.5V | ||
63 | */ | ||
64 | switch (voltage) { | ||
65 | case 8: | ||
66 | v = 3; | ||
67 | break; | ||
68 | case 9: | ||
69 | case 10: | ||
70 | case 11: | ||
71 | case 12: | ||
72 | case 13: | ||
73 | case 14: | ||
74 | case 15: | ||
75 | v = 1; | ||
76 | break; | ||
77 | case 16: | ||
78 | v = 1; | ||
79 | break; | ||
80 | case 17: | ||
81 | case 18: | ||
82 | case 19: | ||
83 | case 20: | ||
84 | case 21: | ||
85 | case 22: | ||
86 | case 23: | ||
87 | case 24: | ||
88 | v = 0; | ||
89 | break; | ||
90 | default: | ||
91 | v = 0; | ||
92 | break; | ||
93 | } | ||
94 | |||
95 | /* PL180 voltage register bits */ | ||
96 | return v << 2; | ||
97 | } | ||
98 | |||
99 | |||
100 | |||
101 | static int mmci_callback(void *data) | 44 | static int mmci_callback(void *data) |
102 | { | 45 | { |
103 | struct mmci_card_event *mmci_card = data; | 46 | struct mmci_card_event *mmci_card = data; |
@@ -154,9 +97,11 @@ int __devinit mmc_init(struct amba_device *adev) | |||
154 | if (!mmci_card) | 97 | if (!mmci_card) |
155 | return -ENOMEM; | 98 | return -ENOMEM; |
156 | 99 | ||
100 | /* | ||
101 | * Do not set ocr_mask or voltage translation function, | ||
102 | * we have a regulator we can control instead. | ||
103 | */ | ||
157 | /* Nominally 2.85V on our platform */ | 104 | /* Nominally 2.85V on our platform */ |
158 | mmci_card->mmc0_plat_data.ocr_mask = MMC_VDD_28_29; | ||
159 | mmci_card->mmc0_plat_data.translate_vdd = mmc_translate_vdd; | ||
160 | mmci_card->mmc0_plat_data.status = mmc_status; | 105 | mmci_card->mmc0_plat_data.status = mmc_status; |
161 | mmci_card->mmc0_plat_data.gpio_wp = -1; | 106 | mmci_card->mmc0_plat_data.gpio_wp = -1; |
162 | mmci_card->mmc0_plat_data.gpio_cd = -1; | 107 | mmci_card->mmc0_plat_data.gpio_cd = -1; |
diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c new file mode 100644 index 000000000000..9c53f01c62eb --- /dev/null +++ b/arch/arm/mach-u300/regulator.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-u300/regulator.c | ||
3 | * | ||
4 | * Copyright (C) 2009 ST-Ericsson AB | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | * Handle board-bound regulators and board power not related | ||
7 | * to any devices. | ||
8 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
9 | */ | ||
10 | #include <linux/device.h> | ||
11 | #include <linux/signal.h> | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/regulator/consumer.h> | ||
14 | /* Those are just for writing in syscon */ | ||
15 | #include <linux/io.h> | ||
16 | #include <mach/hardware.h> | ||
17 | #include <mach/syscon.h> | ||
18 | |||
19 | /* | ||
20 | * Regulators that power the board and chip and which are | ||
21 | * not copuled to specific drivers are hogged in these | ||
22 | * instances. | ||
23 | */ | ||
24 | static struct regulator *main_power_15; | ||
25 | |||
26 | /* | ||
27 | * This function is used from pm.h to shut down the system by | ||
28 | * resetting all regulators in turn and then disable regulator | ||
29 | * LDO D (main power). | ||
30 | */ | ||
31 | void u300_pm_poweroff(void) | ||
32 | { | ||
33 | sigset_t old, all; | ||
34 | |||
35 | sigfillset(&all); | ||
36 | if (!sigprocmask(SIG_BLOCK, &all, &old)) { | ||
37 | /* Disable LDO D to shut down the system */ | ||
38 | if (main_power_15) | ||
39 | regulator_disable(main_power_15); | ||
40 | else | ||
41 | pr_err("regulator not available to shut down system\n"); | ||
42 | (void) sigprocmask(SIG_SETMASK, &old, NULL); | ||
43 | } | ||
44 | return; | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * Hog the regulators needed to power up the board. | ||
49 | */ | ||
50 | static int __init u300_init_boardpower(void) | ||
51 | { | ||
52 | int err; | ||
53 | u32 val; | ||
54 | |||
55 | pr_info("U300: setting up board power\n"); | ||
56 | main_power_15 = regulator_get(NULL, "vana15"); | ||
57 | if (IS_ERR(main_power_15)) { | ||
58 | pr_err("could not get vana15"); | ||
59 | return PTR_ERR(main_power_15); | ||
60 | } | ||
61 | err = regulator_enable(main_power_15); | ||
62 | if (err) { | ||
63 | pr_err("could not enable vana15\n"); | ||
64 | return err; | ||
65 | } | ||
66 | |||
67 | /* | ||
68 | * On U300 a special system controller register pulls up the DC | ||
69 | * until the vana15 (LDO D) regulator comes up. At this point, all | ||
70 | * regulators are set and we do not need power control via | ||
71 | * DC ON anymore. This function will likely be moved whenever | ||
72 | * the rest of the U300 power management is implemented. | ||
73 | */ | ||
74 | pr_info("U300: disable system controller pull-up\n"); | ||
75 | val = readw(U300_SYSCON_VBASE + U300_SYSCON_PMCR); | ||
76 | val &= ~U300_SYSCON_PMCR_DCON_ENABLE; | ||
77 | writew(val, U300_SYSCON_VBASE + U300_SYSCON_PMCR); | ||
78 | |||
79 | /* Register globally exported PM poweroff hook */ | ||
80 | pm_power_off = u300_pm_poweroff; | ||
81 | |||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * So at module init time we hog the regulator! | ||
87 | */ | ||
88 | module_init(u300_init_boardpower); | ||