<div dir="ltr">Hi Pavel,<br><br>I have the latest GIT master synced and have cherry-picked my changes on top of that. <br><br>Regarding the change you have suggested : <br>DMA : <a href="https://github.com/spark1729/rtems/commits/DMA_RPI">https://github.com/spark1729/rtems/commits/DMA_RPI</a><br>Mailbox : <a href="https://github.com/spark1729/rtems/commits/MAILBOX_RPI">https://github.com/spark1729/rtems/commits/MAILBOX_RPI</a><br><br>Is this what you suggested right ?<br><br>I have updated the blog with the information regarding the patches submitted : <a href="http://rtemsgsoc2016-mudit.blogspot.in/">Blog</a> <br>This also has information on the status as well as the plan of action in the future. <br><br>Blog Posts : <br>Regarding DMA : <a href="http://rtemsgsoc2016-mudit.blogspot.in/2016/08/dma-direct-memory-access-for-rpi.html?view=flipcard">Link</a> <br><div>Regarding SD card Driver : <a href="http://rtemsgsoc2016-mudit.blogspot.in/2016/08/porting-sd-card-driver-from-freebsd-to.html?view=flipcard">Link</a><br>Regarding Mailbox : <a href="http://rtemsgsoc2016-mudit.blogspot.in/2016/08/mailbox-interface-for-rpi.html?view=flipcard">Link</a><br><br>Thanks <br>Mudit Jain<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 22, 2016 at 3:47 AM, Pavel Pisa <span dir="ltr"><<a href="mailto:ppisa4lists@pikron.com" target="_blank">ppisa4lists@pikron.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Mudit,<br>
<br>
please, send information what is RTEMS GIT revision are<br>
your changes based on. See comment below<br>
<div><div class="h5"><br>
On Saturday 20 of August 2016 17:04:19 Mudit Jain wrote:<br>
> Added macros for DMA channels 0-12<br>
> Added interrupt handlers for DMA 0, 1 & 2<br>
><br>
> The added IRQs are in accordance with the<br>
> BCM Peripherals Datasheet and also have been verified<br>
> with the linux source code for RPi<br>
> ---<br>
> c/src/lib/libbsp/arm/<wbr>raspberrypi/include/irq.h | 17 ++++++++++<br>
> c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c | 45<br>
> ++++++++++++++++++++++++++ 2 files changed, 62 insertions(+)<br>
><br>
> diff --git a/c/src/lib/libbsp/arm/<wbr>raspberrypi/include/irq.h<br>
> b/c/src/lib/libbsp/arm/<wbr>raspberrypi/include/irq.h index 8436c2d..50616e1<br>
> 100644<br>
> --- a/c/src/lib/libbsp/arm/<wbr>raspberrypi/include/irq.h<br>
> +++ b/c/src/lib/libbsp/arm/<wbr>raspberrypi/include/irq.h<br>
> @@ -35,6 +35,23 @@<br>
><br>
> #define BCM2835_INTC_TOTAL_IRQ 64 + 8<br>
><br>
> +/* DMA Interrupt is routed to IRQ 16 for DMA Channel 0,<br>
> + IRQ 17 for Channel 1, and so on till IRQ 28 for Channel 12.<br>
> + */<br>
> +<br>
> +#define BCM2835_IRQ_ID_DMA_CH0 16<br>
> +#define BCM2835_IRQ_ID_DMA_CH1 17<br>
> +#define BCM2835_IRQ_ID_DMA_CH2 18<br>
> +#define BCM2835_IRQ_ID_DMA_CH3 19<br>
> +#define BCM2835_IRQ_ID_DMA_CH4 20<br>
> +#define BCM2835_IRQ_ID_DMA_CH5 21<br>
> +#define BCM2835_IRQ_ID_DMA_CH6 22<br>
> +#define BCM2835_IRQ_ID_DMA_CH7 23<br>
> +#define BCM2835_IRQ_ID_DMA_CH8 24<br>
> +#define BCM2835_IRQ_ID_DMA_CH9 25<br>
> +#define BCM2835_IRQ_ID_DMA_CH10 26<br>
> +#define BCM2835_IRQ_ID_DMA_CH11 27<br>
> +#define BCM2835_IRQ_ID_DMA_CH12 28<br>
><br>
> #define BCM2835_IRQ_ID_AUX 29<br>
> #define BCM2835_IRQ_ID_SPI_SLAVE 43<br>
> diff --git a/c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c<br>
> b/c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c index 7b3b2be..3279b35 100644<br>
> --- a/c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c<br>
> +++ b/c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c<br>
> @@ -64,6 +64,21 @@ void bsp_interrupt_dispatch(void)<br>
> {<br>
> vector = BCM2835_IRQ_ID_UART;<br>
> }<br>
> + /* DMA 0 */<br>
> + else if ( BCM2835_REG(BCM2835_IRQ_<wbr>PENDING1) & BCM2835_BIT(16) )<br>
> + {<br>
> + vector = BCM2835_IRQ_ID_DMA_CH0;<br>
> + }<br>
> + /* DMA 1 */<br>
> + else if ( BCM2835_REG(BCM2835_IRQ_<wbr>PENDING1) & BCM2835_BIT(17) )<br>
> + {<br>
> + vector = BCM2835_IRQ_ID_DMA_CH1;<br>
> + }<br>
> + /* DMA 2 */<br>
> + else if ( BCM2835_REG(BCM2835_IRQ_<wbr>PENDING1) & BCM2835_BIT(18) )<br>
> + {<br>
> + vector = BCM2835_IRQ_ID_DMA_CH2;<br>
> + }<br>
<br>
</div></div>I hope, I have eliminated need for all these individual peripherals<br>
specific code in raspberrypi/irq/irq.c .<br>
See the commit<br>
<br>
<a href="https://git.rtems.org/rtems/commit/c/src/lib/libbsp/arm/raspberrypi/irq/irq.c?id=d216c5d6a2325551accb836429a6ac9cc2b2f4b7" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/<wbr>commit/c/src/lib/libbsp/arm/<wbr>raspberrypi/irq/irq.c?id=<wbr>d216c5d6a2325551accb836429a6ac<wbr>9cc2b2f4b7</a><br>
<br>
Try rebase your changes for other files to actual RTEMS GIT master.<br>
If there is some problem which prevents to your code to run<br>
with master then it is necessary to find what is broken<br>
on master. I try to help with it.<br>
<br>
May it be that there is some problem with irq.c code, I have<br>
tested it only by timer IRQ because other are not used by mater yet.<br>
But code written the way that it should be fully generic by now.<br>
It should support all 72 interrupt sources.<br>
<span class=""><br>
> /* GPIO 0*/<br>
> else if ( BCM2835_REG(BCM2835_IRQ_<wbr>PENDING2) & BCM2835_BIT(17) )<br>
> {<br>
> @@ -114,6 +129,21 @@ rtems_status_code<br>
> bsp_interrupt_vector_enable(<wbr>rtems_vector_number vector) {<br>
> BCM2835_REG(BCM2835_IRQ_<wbr>ENABLE2) = BCM2835_BIT(25);<br>
> }<br>
> + /* DMA 0 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH0 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>ENABLE1) = BCM2835_BIT(16);<br>
> + }<br>
> + /* DMA 1 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH1 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>ENABLE1) = BCM2835_BIT(17);<br>
> + }<br>
> + /* DMA 2 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH2 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>ENABLE1) = BCM2835_BIT(18);<br>
> + }<br>
<br>
</span>Should be solved by master already.<br>
<span class=""><br>
> /* GPIO 0 */<br>
> else if ( vector == BCM2835_IRQ_ID_GPIO_0 )<br>
> {<br>
> @@ -164,6 +194,21 @@ rtems_status_code<br>
> bsp_interrupt_vector_disable(<wbr>rtems_vector_number vector) {<br>
> BCM2835_REG(BCM2835_IRQ_<wbr>DISABLE2) = BCM2835_BIT(25);<br>
> }<br>
> + /* DMA 0 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH0 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>DISABLE1) = BCM2835_BIT(16);<br>
> + }<br>
> + /* DMA 1 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH1 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>DISABLE1) = BCM2835_BIT(17);<br>
> + }<br>
> + /* DMA 2 */<br>
> + else if ( vector == BCM2835_IRQ_ID_DMA_CH2 )<br>
> + {<br>
> + BCM2835_REG(BCM2835_IRQ_<wbr>DISABLE1) = BCM2835_BIT(18);<br>
> + }<br>
<br>
</span>Should be solved by master already.<br>
<span class=""><br>
> /* GPIO 0 */<br>
> else if ( vector == BCM2835_IRQ_ID_GPIO_0 )<br>
> {<br>
<br>
</span>If you have problem with rebase then you can format patch,<br>
use editor to delete parts concerning files which should<br>
be untouched, then reset some branch back before patch series<br>
or to master and then apply modified patches.<br>
Again, I can help.<br>
<br>
I would be happy if you write some summary about testing, which<br>
attempts has been done, what worked, what failed and what has<br>
not been tested. Ideally, it should be done for work<br>
on your branch before rebase and after rebase to master.<br>
<br>
Best wishes,<br>
<br>
Pavel<br>
</blockquote></div><br></div>