* [ECOS] How to apply patch
[not found] ` <F7620004260C5D4DB836EDBF8CC6872D2FDA96@neptune.intra.eiaj.ch>
@ 2007-02-22 12:42 ` Julien Stéphane
2007-02-22 13:00 ` Gary Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Julien Stéphane @ 2007-02-22 12:42 UTC (permalink / raw)
To: ecos-discuss
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
Hy everybody.
I'm quite new in eCos. I received a patch and I don't know how to apply it. Can someone help me please? I attached the patch if it can help someone.
Thanks!
Stéphane
[-- Attachment #2: at91_spi.diff --]
[-- Type: text/plain, Size: 2431 bytes --]
Index: packages/devs/spi/arm/at91/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/spi/arm/at91/current/ChangeLog,v
retrieving revision 1.5
diff -u -r1.5 ChangeLog
--- packages/devs/spi/arm/at91/current/ChangeLog 7 Sep 2006 12:14:14 -0000 1.5
+++ packages/devs/spi/arm/at91/current/ChangeLog 21 Feb 2007 17:16:32 -0000
@@ -1,3 +1,8 @@
+2006-09-27 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/spi_at91.c (spi_at91_transaction_begin): Don't use #ifdef
+ inside a macro invocation. The compiler throws a wobbly.
+
2006-09-07 John Eigelaar <jeigelaar@mweb.co.za>
* src/spi_at91.c: Fixed the chip select functions.
Index: packages/devs/spi/arm/at91/current/src/spi_at91.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/spi/arm/at91/current/src/spi_at91.c,v
retrieving revision 1.5
diff -u -r1.5 spi_at91.c
--- packages/devs/spi/arm/at91/current/src/spi_at91.c 7 Sep 2006 12:14:14 -0000 1.5
+++ packages/devs/spi/arm/at91/current/src/spi_at91.c 21 Feb 2007 17:16:33 -0000
@@ -342,7 +342,7 @@
{
if(spi_bus->cs_en[ctr])
{
- HAL_ARM_AT91_GPIO_PUT(spi_bus->cs_gpio[ctr], (val & (1<<ctr)));
+ HAL_ARM_AT91_GPIO_PUT(spi_bus->cs_gpio[ctr], (val & (1<<ctr)));
}
}
}
@@ -545,19 +545,19 @@
cause havoc with the driver */
// Put SPI bus into master mode
- if (1 == at91_spi_dev->cl_div32)
- HAL_WRITE_UINT32(spi_bus->base+AT91_SPI_MR, AT91_SPI_MR_MSTR |
- AT91_SPI_MR_DIV32
+ if (1 == at91_spi_dev->cl_div32) {
+ val = AT91_SPI_MR_MSTR | AT91_SPI_MR_DIV32;
#ifdef AT91_SPI_MR_MODFDIS
- | AT91_SPI_MR_MODFDIS
+ val |= AT91_SPI_MR_MODFDIS;
#endif
- );
- else
- HAL_WRITE_UINT32(spi_bus->base+AT91_SPI_MR, AT91_SPI_MR_MSTR
+ HAL_WRITE_UINT32(spi_bus->base+AT91_SPI_MR, val);
+ } else {
+ val = AT91_SPI_MR_MSTR;
#ifdef AT91_SPI_MR_MODFDIS
- | AT91_SPI_MR_MODFDIS
+ val |= AT91_SPI_MR_MODFDIS;
#endif
- );
+ HAL_WRITE_UINT32(spi_bus->base+AT91_SPI_MR, val);
+ }
}
static void
[-- Attachment #3: Type: text/plain, Size: 148 bytes --]
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread