diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/dts/bcm2708_common.dtsi | 6 | ||||
-rw-r--r-- | arch/arm/mach-bcm2708/bcm2708.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-bcm2708/include/mach/platform.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-bcm2709/bcm2709.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-bcm2709/include/mach/platform.h | 1 |
5 files changed, 60 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi index c5ed34bda237..2d9bcd8ac97d 100644 --- a/arch/arm/boot/dts/bcm2708_common.dtsi +++ b/arch/arm/boot/dts/bcm2708_common.dtsi @@ -114,6 +114,12 @@ compatible = "brcm,bcm2708-fb"; status = "disabled"; }; + + vchiq: vchiq { + compatible = "brcm,bcm2835-vchiq"; + reg = <0x7e00b840 0xf>; + interrupts = <0 2>; + }; }; clocks { diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c index cde2124566fe..81cc9885de43 100644 --- a/arch/arm/mach-bcm2708/bcm2708.c +++ b/arch/arm/mach-bcm2708/bcm2708.c @@ -437,6 +437,31 @@ static struct platform_device bcm2708_vcio_device = { }, }; +static struct resource bcm2708_vchiq_resources[] = { + { + .start = ARMCTRL_0_BELL_BASE, + .end = ARMCTRL_0_BELL_BASE + 16, + .flags = IORESOURCE_MEM, + }, { + .start = IRQ_ARM_DOORBELL_0, + .end = IRQ_ARM_DOORBELL_0, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 vchiq_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON); + +static struct platform_device bcm2708_vchiq_device = { + .name = "bcm2835_vchiq", + .id = -1, + .resource = bcm2708_vchiq_resources, + .num_resources = ARRAY_SIZE(bcm2708_vchiq_resources), + .dev = { + .dma_mask = &vchiq_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON), + }, +}; + #ifdef CONFIG_BCM2708_GPIO #define BCM_GPIO_DRIVER_NAME "bcm2708_gpio" @@ -909,6 +934,7 @@ void __init bcm2708_init(void) bcm_register_device_dt(&bcm2708_dmaengine_device); bcm_register_device_dt(&bcm2708_vcio_device); + bcm_register_device_dt(&bcm2708_vchiq_device); #ifdef CONFIG_BCM2708_GPIO bcm_register_device_dt(&bcm2708_gpio_device); #endif diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h index bef3e5a62f11..69674e92fec5 100644 --- a/arch/arm/mach-bcm2708/include/mach/platform.h +++ b/arch/arm/mach-bcm2708/include/mach/platform.h @@ -81,6 +81,7 @@ #define ARMCTRL_IC_BASE (ARM_BASE + 0x200) /* ARM interrupt controller */ #define ARMCTRL_TIMER0_1_BASE (ARM_BASE + 0x400) /* Timer 0 and 1 */ #define ARMCTRL_0_SBM_BASE (ARM_BASE + 0x800) /* User 0 (ARM)'s Semaphores Doorbells and Mailboxes */ +#define ARMCTRL_0_BELL_BASE (ARMCTRL_0_SBM_BASE + 0x40) /* User 0 (ARM)'s Doorbell */ #define ARMCTRL_0_MAIL0_BASE (ARMCTRL_0_SBM_BASE + 0x80) /* User 0 (ARM)'s Mailbox 0 */ diff --git a/arch/arm/mach-bcm2709/bcm2709.c b/arch/arm/mach-bcm2709/bcm2709.c index 95db41ff2601..528bf6e18e5d 100644 --- a/arch/arm/mach-bcm2709/bcm2709.c +++ b/arch/arm/mach-bcm2709/bcm2709.c @@ -456,6 +456,31 @@ static struct platform_device bcm2708_vcio_device = { }, }; +static struct resource bcm2708_vchiq_resources[] = { + { + .start = ARMCTRL_0_BELL_BASE, + .end = ARMCTRL_0_BELL_BASE + 16, + .flags = IORESOURCE_MEM, + }, { + .start = IRQ_ARM_DOORBELL_0, + .end = IRQ_ARM_DOORBELL_0, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 vchiq_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON); + +static struct platform_device bcm2708_vchiq_device = { + .name = "bcm2835_vchiq", + .id = -1, + .resource = bcm2708_vchiq_resources, + .num_resources = ARRAY_SIZE(bcm2708_vchiq_resources), + .dev = { + .dma_mask = &vchiq_dmamask, + .coherent_dma_mask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON), + }, +}; + #ifdef CONFIG_BCM2708_GPIO #define BCM_GPIO_DRIVER_NAME "bcm2708_gpio" @@ -930,6 +955,7 @@ void __init bcm2709_init(void) bcm_register_device_dt(&bcm2708_dmaengine_device); bcm_register_device_dt(&bcm2708_vcio_device); + bcm_register_device_dt(&bcm2708_vchiq_device); #ifdef CONFIG_BCM2708_GPIO bcm_register_device_dt(&bcm2708_gpio_device); #endif diff --git a/arch/arm/mach-bcm2709/include/mach/platform.h b/arch/arm/mach-bcm2709/include/mach/platform.h index 5574bb5356ca..be9973354c20 100644 --- a/arch/arm/mach-bcm2709/include/mach/platform.h +++ b/arch/arm/mach-bcm2709/include/mach/platform.h @@ -81,6 +81,7 @@ #define ARMCTRL_IC_BASE (ARM_BASE + 0x200) /* ARM interrupt controller */ #define ARMCTRL_TIMER0_1_BASE (ARM_BASE + 0x400) /* Timer 0 and 1 */ #define ARMCTRL_0_SBM_BASE (ARM_BASE + 0x800) /* User 0 (ARM)'s Semaphores Doorbells and Mailboxes */ +#define ARMCTRL_0_BELL_BASE (ARMCTRL_0_SBM_BASE + 0x40) /* User 0 (ARM)'s Doorbell */ #define ARMCTRL_0_MAIL0_BASE (ARMCTRL_0_SBM_BASE + 0x80) /* User 0 (ARM)'s Mailbox 0 */ |