aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c49
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 17f3f6a2479..f7f02d15045 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)
36static u64 ohci_dmamask = 0xffffffffUL; 37static u64 ohci_dmamask = DMA_BIT_MASK(32);
37static struct at91_usbh_data usbh_data; 38static struct at91_usbh_data usbh_data;
38 39
39static struct resource usbh_resources[] = { 40static 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)
135static u64 mmc_dmamask = 0xffffffffUL; 136static u64 mmc_dmamask = DMA_BIT_MASK(32);
136static struct at91_mmc_data mmc_data; 137static struct at91_mmc_data mmc_data;
137 138
138static struct resource mmc_resources[] = { 139static 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)
357static u64 spi_dmamask = 0xffffffffUL; 358static u64 spi_dmamask = DMA_BIT_MASK(32);
358 359
359static struct resource spi0_resources[] = { 360static 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)
469static u64 lcdc_dmamask = 0xffffffffUL; 470static u64 lcdc_dmamask = DMA_BIT_MASK(32);
470static struct atmel_lcdfb_info lcdc_data; 471static struct atmel_lcdfb_info lcdc_data;
471 472
472static struct resource lcdc_resources[] = { 473static 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
645static u64 dbgu_dmamask = DMA_BIT_MASK(32);
646
644static struct platform_device at91sam9261_dbgu_device = { 647static 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
683static u64 uart0_dmamask = DMA_BIT_MASK(32);
684
679static struct platform_device at91sam9261_uart0_device = { 685static 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
723static u64 uart1_dmamask = DMA_BIT_MASK(32);
724
716static struct platform_device at91sam9261_uart1_device = { 725static 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
761static u64 uart2_dmamask = DMA_BIT_MASK(32);
762
751static struct platform_device at91sam9261_uart2_device = { 763static 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
768struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */ 781static struct platform_device *at91_uarts[ATMEL_MAX_UART]; /* the UARTs to use */
769struct platform_device *atmel_default_console_device; /* the serial console device */ 782struct platform_device *atmel_default_console_device; /* the serial console device */
770 783
771void __init at91_init_serial(struct at91_uart_config *config) 784void __init at91_init_serial(struct at91_uart_config *config)