summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-05-31 16:33:22 +0000
committerNils Wallménius <nils@rockbox.org>2009-05-31 16:33:22 +0000
commitb2afc258dc6e87bfc5684bb87eb38b52d0138212 (patch)
tree85b6d7555add9a52db420896b840087cb168f07f
parent3651319d45b400899392751ae76a141be2b7de20 (diff)
Old patch from FS#7832: Sprinkle 'volatile' in the various inline assembler statements, needed for the driver to work when compiled with newer gcc, should make no functional difference with the currently used version
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21147 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/coldfire/pcf50606-coldfire.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/firmware/target/coldfire/pcf50606-coldfire.c b/firmware/target/coldfire/pcf50606-coldfire.c
index 8ee38840d6..03c22a12e9 100644
--- a/firmware/target/coldfire/pcf50606-coldfire.c
+++ b/firmware/target/coldfire/pcf50606-coldfire.c
@@ -61,7 +61,7 @@
#define SCL_HI_IN and_l(~SCL_BIT, &SCL_GPIO_ENABLE); while(!SCL);
#define DELAY \
- asm ( \
+ asm volatile ( \
"move.l %[dly],%%d0 \n" \
"1: \n" \
"subq.l #1,%%d0 \n" \
@@ -89,7 +89,7 @@ void pcf50606_i2c_recalc_delay(int cpu_clock)
inline void pcf50606_i2c_start(void)
{
#ifdef USE_ASM
- asm (
+ asm volatile (
"not.l %[sdab] \n" /* SDA_HI_IN */
"and.l %[sdab],(8,%[sdard]) \n"
"not.l %[sdab] \n"
@@ -139,7 +139,7 @@ inline void pcf50606_i2c_start(void)
inline void pcf50606_i2c_stop(void)
{
#ifdef USE_ASM
- asm (
+ asm volatile (
"or.l %[sdab],(8,%[sdard]) \n" /* SDA_LO_OUT */
"move.l %[dly],%%d0 \n" /* DELAY */
@@ -186,7 +186,7 @@ inline void pcf50606_i2c_stop(void)
inline void pcf50606_i2c_ack(bool ack)
{
#ifdef USE_ASM
- asm (
+ asm volatile (
"tst.b %[ack] \n" /* if (!ack) */
"bne.s 1f \n"
@@ -245,7 +245,7 @@ inline bool pcf50606_i2c_getack(void)
bool ret;
#ifdef USE_ASM
- asm (
+ asm volatile (
"not.l %[sdab] \n" /* SDA_HI_IN */
"and.l %[sdab],(8,%[sdard]) \n"
"not.l %[sdab] \n"
@@ -375,7 +375,7 @@ unsigned char pcf50606_i2c_inb(bool ack)
unsigned char byte = 0;
#ifdef USE_ASM
- asm (
+ asm volatile (
"not.l %[sdab] \n" /* SDA_HI_IN */
"and.l %[sdab],(8,%[sdard]) \n"
"not.l %[sdab] \n"
@@ -550,3 +550,4 @@ int pcf50606_write(int address, unsigned char val)
{
return pcf50606_write_multiple(address, &val, 1);
}
+