diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 55719a974276..fb5c23af1017 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data) | |||
757 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} | 757 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} |
758 | #endif | 758 | #endif |
759 | 759 | ||
760 | /* -------------------------------------------------------------------- | ||
761 | * CAN Controller | ||
762 | * -------------------------------------------------------------------- */ | ||
763 | |||
764 | #if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE) | ||
765 | static struct resource can_resources[] = { | ||
766 | [0] = { | ||
767 | .start = AT91SAM9263_BASE_CAN, | ||
768 | .end = AT91SAM9263_BASE_CAN + SZ_16K - 1, | ||
769 | .flags = IORESOURCE_MEM, | ||
770 | }, | ||
771 | [1] = { | ||
772 | .start = AT91SAM9263_ID_CAN, | ||
773 | .end = AT91SAM9263_ID_CAN, | ||
774 | .flags = IORESOURCE_IRQ, | ||
775 | }, | ||
776 | }; | ||
777 | |||
778 | static struct platform_device at91sam9263_can_device = { | ||
779 | .name = "at91_can", | ||
780 | .id = -1, | ||
781 | .resource = can_resources, | ||
782 | .num_resources = ARRAY_SIZE(can_resources), | ||
783 | }; | ||
784 | |||
785 | void __init at91_add_device_can(struct at91_can_data *data) | ||
786 | { | ||
787 | at91_set_A_periph(AT91_PIN_PA13, 0); /* CANTX */ | ||
788 | at91_set_A_periph(AT91_PIN_PA14, 0); /* CANRX */ | ||
789 | at91sam9263_can_device.dev.platform_data = data; | ||
790 | |||
791 | platform_device_register(&at91sam9263_can_device); | ||
792 | } | ||
793 | #else | ||
794 | void __init at91_add_device_can(struct at91_can_data *data) {} | ||
795 | #endif | ||
760 | 796 | ||
761 | /* -------------------------------------------------------------------- | 797 | /* -------------------------------------------------------------------- |
762 | * LCD Controller | 798 | * LCD Controller |