diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 49 |
1 files changed, 31 insertions, 18 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 17f3f6a24796..f7f02d15045d 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/mach/arch.h> | 13 | #include <asm/mach/arch.h> |
14 | #include <asm/mach/map.h> | 14 | #include <asm/mach/map.h> |
15 | 15 | ||
16 | #include <linux/dma-mapping.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
17 | #include <linux/i2c-gpio.h> | 18 | #include <linux/i2c-gpio.h> |
18 | 19 | ||
@@ -33,7 +34,7 @@ | |||
33 | * -------------------------------------------------------------------- */ | 34 | * -------------------------------------------------------------------- */ |
34 | 35 | ||
35 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 36 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
36 | static u64 ohci_dmamask = 0xffffffffUL; | 37 | static u64 ohci_dmamask = DMA_BIT_MASK(32); |
37 | static struct at91_usbh_data usbh_data; | 38 | static struct at91_usbh_data usbh_data; |
38 | 39 | ||
39 | static struct resource usbh_resources[] = { | 40 | static struct resource usbh_resources[] = { |
@@ -54,7 +55,7 @@ static struct platform_device at91sam9261_usbh_device = { | |||
54 | .id = -1, | 55 | .id = -1, |
55 | .dev = { | 56 | .dev = { |
56 | .dma_mask = &ohci_dmamask, | 57 | .dma_mask = &ohci_dmamask, |
57 | .coherent_dma_mask = 0xffffffff, | 58 | .coherent_dma_mask = DMA_BIT_MASK(32), |
58 | .platform_data = &usbh_data, | 59 | .platform_data = &usbh_data, |
59 | }, | 60 | }, |
60 | .resource = usbh_resources, | 61 | .resource = usbh_resources, |
@@ -132,7 +133,7 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {} | |||
132 | * -------------------------------------------------------------------- */ | 133 | * -------------------------------------------------------------------- */ |
133 | 134 | ||
134 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) | 135 | #if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE) |
135 | static u64 mmc_dmamask = 0xffffffffUL; | 136 | static u64 mmc_dmamask = DMA_BIT_MASK(32); |
136 | static struct at91_mmc_data mmc_data; | 137 | static struct at91_mmc_data mmc_data; |
137 | 138 | ||
138 | static struct resource mmc_resources[] = { | 139 | static struct resource mmc_resources[] = { |
@@ -153,7 +154,7 @@ static struct platform_device at91sam9261_mmc_device = { | |||
153 | .id = -1, | 154 | .id = -1, |
154 | .dev = { | 155 | .dev = { |
155 | .dma_mask = &mmc_dmamask, | 156 | .dma_mask = &mmc_dmamask, |
156 | .coherent_dma_mask = 0xffffffff, | 157 | .coherent_dma_mask = DMA_BIT_MASK(32), |
157 | .platform_data = &mmc_data, | 158 | .platform_data = &mmc_data, |
158 | }, | 159 | }, |
159 | .resource = mmc_resources, | 160 | .resource = mmc_resources, |
@@ -354,7 +355,7 @@ void __init at91_add_device_i2c(struct i2c_board_info *devices, int nr_devices) | |||
354 | * -------------------------------------------------------------------- */ | 355 | * -------------------------------------------------------------------- */ |
355 | 356 | ||
356 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) | 357 | #if defined(CONFIG_SPI_ATMEL) || defined(CONFIG_SPI_ATMEL_MODULE) |
357 | static u64 spi_dmamask = 0xffffffffUL; | 358 | static u64 spi_dmamask = DMA_BIT_MASK(32); |
358 | 359 | ||
359 | static struct resource spi0_resources[] = { | 360 | static struct resource spi0_resources[] = { |
360 | [0] = { | 361 | [0] = { |
@@ -374,7 +375,7 @@ static struct platform_device at91sam9261_spi0_device = { | |||
374 | .id = 0, | 375 | .id = 0, |
375 | .dev = { | 376 | .dev = { |
376 | .dma_mask = &spi_dmamask, | 377 | .dma_mask = &spi_dmamask, |
377 | .coherent_dma_mask = 0xffffffff, | 378 | .coherent_dma_mask = DMA_BIT_MASK(32), |
378 | }, | 379 | }, |
379 | .resource = spi0_resources, | 380 | .resource = spi0_resources, |
380 | .num_resources = ARRAY_SIZE(spi0_resources), | 381 | .num_resources = ARRAY_SIZE(spi0_resources), |
@@ -400,7 +401,7 @@ static struct platform_device at91sam9261_spi1_device = { | |||
400 | .id = 1, | 401 | .id = 1, |
401 | .dev = { | 402 | .dev = { |
402 | .dma_mask = &spi_dmamask, | 403 | .dma_mask = &spi_dmamask, |
403 | .coherent_dma_mask = 0xffffffff, | 404 | .coherent_dma_mask = DMA_BIT_MASK(32), |
404 | }, | 405 | }, |
405 | .resource = spi1_resources, | 406 | .resource = spi1_resources, |
406 | .num_resources = ARRAY_SIZE(spi1_resources), | 407 | .num_resources = ARRAY_SIZE(spi1_resources), |
@@ -466,7 +467,7 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) | |||
466 | * -------------------------------------------------------------------- */ | 467 | * -------------------------------------------------------------------- */ |
467 | 468 | ||
468 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) | 469 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) |
469 | static u64 lcdc_dmamask = 0xffffffffUL; | 470 | static u64 lcdc_dmamask = DMA_BIT_MASK(32); |
470 | static struct atmel_lcdfb_info lcdc_data; | 471 | static struct atmel_lcdfb_info lcdc_data; |
471 | 472 | ||
472 | static struct resource lcdc_resources[] = { | 473 | static struct resource lcdc_resources[] = { |
@@ -494,7 +495,7 @@ static struct platform_device at91_lcdc_device = { | |||
494 | .id = 0, | 495 | .id = 0, |
495 | .dev = { | 496 | .dev = { |
496 | .dma_mask = &lcdc_dmamask, | 497 | .dma_mask = &lcdc_dmamask, |
497 | .coherent_dma_mask = 0xffffffff, | 498 | .coherent_dma_mask = DMA_BIT_MASK(32), |
498 | .platform_data = &lcdc_data, | 499 | .platform_data = &lcdc_data, |
499 | }, | 500 | }, |
500 | .resource = lcdc_resources, | 501 | .resource = lcdc_resources, |
@@ -641,12 +642,15 @@ static struct atmel_uart_data dbgu_data = { | |||
641 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), | 642 | .regs = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU), |
642 | }; | 643 | }; |
643 | 644 | ||
645 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | ||
646 | |||
644 | static struct platform_device at91sam9261_dbgu_device = { | 647 | static struct platform_device at91sam9261_dbgu_device = { |
645 | .name = "atmel_usart", | 648 | .name = "atmel_usart", |
646 | .id = 0, | 649 | .id = 0, |
647 | .dev = { | 650 | .dev = { |
648 | .platform_data = &dbgu_data, | 651 | .dma_mask = &dbgu_dmamask, |
649 | .coherent_dma_mask = 0xffffffff, | 652 | .coherent_dma_mask = DMA_BIT_MASK(32), |
653 | .platform_data = &dbgu_data, | ||
650 | }, | 654 | }, |
651 | .resource = dbgu_resources, | 655 | .resource = dbgu_resources, |
652 | .num_resources = ARRAY_SIZE(dbgu_resources), | 656 | .num_resources = ARRAY_SIZE(dbgu_resources), |
@@ -676,12 +680,15 @@ static struct atmel_uart_data uart0_data = { | |||
676 | .use_dma_rx = 1, | 680 | .use_dma_rx = 1, |
677 | }; | 681 | }; |
678 | 682 | ||
683 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | ||
684 | |||
679 | static struct platform_device at91sam9261_uart0_device = { | 685 | static struct platform_device at91sam9261_uart0_device = { |
680 | .name = "atmel_usart", | 686 | .name = "atmel_usart", |
681 | .id = 1, | 687 | .id = 1, |
682 | .dev = { | 688 | .dev = { |
683 | .platform_data = &uart0_data, | 689 | .dma_mask = &uart0_dmamask, |
684 | .coherent_dma_mask = 0xffffffff, | 690 | .coherent_dma_mask = DMA_BIT_MASK(32), |
691 | .platform_data = &uart0_data, | ||
685 | }, | 692 | }, |
686 | .resource = uart0_resources, | 693 | .resource = uart0_resources, |
687 | .num_resources = ARRAY_SIZE(uart0_resources), | 694 | .num_resources = ARRAY_SIZE(uart0_resources), |
@@ -713,12 +720,15 @@ static struct atmel_uart_data uart1_data = { | |||
713 | .use_dma_rx = 1, | 720 | .use_dma_rx = 1, |
714 | }; | 721 | }; |
715 | 722 | ||
723 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | ||
724 | |||
716 | static struct platform_device at91sam9261_uart1_device = { | 725 | static struct platform_device at91sam9261_uart1_device = { |
717 | .name = "atmel_usart", | 726 | .name = "atmel_usart", |
718 | .id = 2, | 727 | .id = 2, |
719 | .dev = { | 728 | .dev = { |
720 | .platform_data = &uart1_data, | 729 | .dma_mask = &uart1_dmamask, |
721 | .coherent_dma_mask = 0xffffffff, | 730 | .coherent_dma_mask = DMA_BIT_MASK(32), |
731 | .platform_data = &uart1_data, | ||
722 | }, | 732 | }, |
723 | .resource = uart1_resources, | 733 | .resource = uart1_resources, |
724 | .num_resources = ARRAY_SIZE(uart1_resources), | 734 | .num_resources = ARRAY_SIZE(uart1_resources), |
@@ -748,12 +758,15 @@ static struct atmel_uart_data uart2_data = { | |||
748 | .use_dma_rx = 1, | 758 | .use_dma_rx = 1, |
749 | }; | 759 | }; |
750 | 760 | ||
761 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | ||
762 | |||
751 | static struct platform_device at91sam9261_uart2_device = { | 763 | static struct platform_device at91sam9261_uart2_device = { |
752 | .name = "atmel_usart", | 764 | .name = "atmel_usart", |
753 | .id = 3, | 765 | .id = 3, |
754 | .dev = { | 766 | .dev = { |
755 | .platform_data = &uart2_data, | 767 | .dma_mask = &uart2_dmamask, |
756 | .coherent_dma_mask = 0xffffffff, | 768 | .coherent_dma_mask = DMA_BIT_MASK(32), |
769 | .platform_data = &uart2_data, | ||
757 | }, | 770 | }, |
758 | .resource = uart2_resources, | 771 | .resource = uart2_resources, |
759 | .num_resources = ARRAY_SIZE(uart2_resources), | 772 | .num_resources = ARRAY_SIZE(uart2_resources), |
@@ -765,7 +778,7 @@ static inline void configure_usart2_pins(void) | |||
765 | at91_set_A_periph(AT91_PIN_PC14, 1); /* TXD2 */ | 778 | at91_set_A_periph(AT91_PIN_PC14, 1); /* TXD2 */ |
766 | } | 779 | } |
767 | 780 | ||
768 | struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ | 781 | static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ |
769 | struct platform_device *atmel_default_console_device; /* the serial console device */ | 782 | struct platform_device *atmel_default_console_device; /* the serial console device */ |
770 | 783 | ||
771 | void __init at91_init_serial(struct at91_uart_config *config) | 784 | void __init at91_init_serial(struct at91_uart_config *config) |