* [U-Boot] [Patch] soft_i2c.c compiler/linker error
@ 2009-03-27 10:31 Jens Scharsig
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Jens Scharsig @ 2009-03-27 10:31 UTC (permalink / raw)
To: u-boot
This patch fix the compiler/linker errors
common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index ed5f5b2..68b267f 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -246,6 +246,7 @@ int i2c_set_bus_num(unsigned int bus)
#endif
return 0;
}
+#endif
/* TODO: add 100/400k switching */
unsigned int i2c_get_bus_speed(void)
@@ -260,7 +261,7 @@ int i2c_set_bus_speed(unsigned int speed)
return 0;
}
-#endif
+
/*-----------------------------------------------------------------------
* if ack == I2C_ACK, ACK the byte so can continue reading, else
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [Patch] soft_i2c.c compiler/linker error
2009-03-27 10:31 [U-Boot] [Patch] soft_i2c.c compiler/linker error Jens Scharsig
@ 2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 11:30 ` Jens Scharsig
2009-03-30 5:22 ` Heiko Schocher
2009-03-30 5:21 ` Heiko Schocher
2009-03-30 7:51 ` [U-Boot] [Patch V2] " Jens Scharsig
2 siblings, 2 replies; 10+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-27 10:46 UTC (permalink / raw)
To: u-boot
On 11:31 Fri 27 Mar , Jens Scharsig wrote:
> This patch fix the compiler/linker errors
>
> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>
> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
>
> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
NACK
you must implement it
Best Regards,
J.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch] soft_i2c.c compiler/linker error
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-27 11:30 ` Jens Scharsig
2009-03-30 5:22 ` Heiko Schocher
1 sibling, 0 replies; 10+ messages in thread
From: Jens Scharsig @ 2009-03-27 11:30 UTC (permalink / raw)
To: u-boot
Jean-Christophe PLAGNIOL-VILLARD schrieb:
> On 11:31 Fri 27 Mar , Jens Scharsig wrote:
>> This patch fix the compiler/linker errors
>>
>> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
>> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>>
>> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
>>
>> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
> NACK
>
> you must implement it
Pleace a liltle bit more informations
What exactly must I implement?
I2C_MULTI_BUS or i2c_get_bus_speed / i2c_set_bus_speed
Is the driver (soft_i2c.c) not the right pleace for i2c_set/get_bus_speed?
Best Regards,
Jens Scharsig
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch] soft_i2c.c compiler/linker error
2009-03-27 10:31 [U-Boot] [Patch] soft_i2c.c compiler/linker error Jens Scharsig
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2009-03-30 5:21 ` Heiko Schocher
2009-03-30 7:51 ` [U-Boot] [Patch V2] " Jens Scharsig
2 siblings, 0 replies; 10+ messages in thread
From: Heiko Schocher @ 2009-03-30 5:21 UTC (permalink / raw)
To: u-boot
Hello Jens,
Jens Scharsig wrote:
> This patch fix the compiler/linker errors
>
> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>
> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
>
> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
> ---
>
> diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
> index ed5f5b2..68b267f 100644
> --- a/drivers/i2c/soft_i2c.c
> +++ b/drivers/i2c/soft_i2c.c
> @@ -246,6 +246,7 @@ int i2c_set_bus_num(unsigned int bus)
> #endif
> return 0;
> }
> +#endif
>
> /* TODO: add 100/400k switching */
> unsigned int i2c_get_bus_speed(void)
> @@ -260,7 +261,7 @@ int i2c_set_bus_speed(unsigned int speed)
>
> return 0;
> }
> -#endif
> +
>
no need to add an empty line.
[...]
thanks for catching
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch] soft_i2c.c compiler/linker error
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 11:30 ` Jens Scharsig
@ 2009-03-30 5:22 ` Heiko Schocher
2009-03-30 8:00 ` Jens Scharsig
1 sibling, 1 reply; 10+ messages in thread
From: Heiko Schocher @ 2009-03-30 5:22 UTC (permalink / raw)
To: u-boot
Hello Jean-Christophe
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 11:31 Fri 27 Mar , Jens Scharsig wrote:
>
>> This patch fix the compiler/linker errors
>>
>> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
>> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>>
>> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
>>
>> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
>>
> NACK
>
> you must implement it
>
It is implemented in the driver, but not activated, because
wrong define order ... I think this patch is OK.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch V2] soft_i2c.c compiler/linker error
2009-03-27 10:31 [U-Boot] [Patch] soft_i2c.c compiler/linker error Jens Scharsig
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-30 5:21 ` Heiko Schocher
@ 2009-03-30 7:51 ` Jens Scharsig
2009-03-31 6:32 ` Heiko Schocher
2 siblings, 1 reply; 10+ messages in thread
From: Jens Scharsig @ 2009-03-30 7:51 UTC (permalink / raw)
To: u-boot
This patch fix the compiler/linker errors
common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef (wrong define order)
and
removes additional empty lines
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index ed5f5b2..185634d 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -51,14 +51,12 @@
DECLARE_GLOBAL_DATA_PTR;
#endif
-
/*-----------------------------------------------------------------------
* Definitions
*/
#define RETRIES 0
-
#define I2C_ACK 0 /* PD_SDA level to ack a byte */
#define I2C_NOACK 1 /* PD_SDA level to noack a byte */
@@ -154,7 +152,6 @@ static void send_stop(void)
I2C_TRISTATE;
}
-
/*-----------------------------------------------------------------------
* ack should be I2C_ACK or I2C_NOACK
*/
@@ -174,7 +171,6 @@ static void send_ack(int ack)
I2C_DELAY;
}
-
/*-----------------------------------------------------------------------
* Send 8 bits and look for an acknowledgement.
*/
@@ -246,6 +242,7 @@ int i2c_set_bus_num(unsigned int bus)
#endif
return 0;
}
+#endif
/* TODO: add 100/400k switching */
unsigned int i2c_get_bus_speed(void)
@@ -260,7 +257,6 @@ int i2c_set_bus_speed(unsigned int speed)
return 0;
}
-#endif
/*-----------------------------------------------------------------------
* if ack == I2C_ACK, ACK the byte so can continue reading, else
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [Patch] soft_i2c.c compiler/linker error
2009-03-30 5:22 ` Heiko Schocher
@ 2009-03-30 8:00 ` Jens Scharsig
0 siblings, 0 replies; 10+ messages in thread
From: Jens Scharsig @ 2009-03-30 8:00 UTC (permalink / raw)
To: u-boot
Heiko Schocher schrieb:
> Hello Jean-Christophe
>
> Jean-Christophe PLAGNIOL-VILLARD wrote:
>> On 11:31 Fri 27 Mar , Jens Scharsig wrote:
>>
>>> This patch fix the compiler/linker errors
>>>
>>> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
>>> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>>>
>>> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
>>>
>>> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
>>>
>> NACK
>>
>> you must implement it
>>
>
> It is implemented in the driver, but not activated, because
> wrong define order ... I think this patch is OK.
>
> bye
> Heiko
>
Thanks for the confirmation. That was my thought. Only my description was bad or not completely.
regards Jens
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch V2.1] soft_i2c.c compiler/linker error
2009-03-31 6:32 ` Heiko Schocher
@ 2009-03-31 6:18 ` Jens Scharsig
2009-03-31 7:08 ` Heiko Schocher
0 siblings, 1 reply; 10+ messages in thread
From: Jens Scharsig @ 2009-03-31 6:18 UTC (permalink / raw)
To: u-boot
This patch fix the compiler/linker errors
common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not
uesd/undef (wrong define order)
and
removes additional empty lines
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
---
diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index ed5f5b2..185634d 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -51,14 +51,12 @@
DECLARE_GLOBAL_DATA_PTR;
#endif
-
/*-----------------------------------------------------------------------
* Definitions
*/
#define RETRIES 0
-
#define I2C_ACK 0 /* PD_SDA level to ack a byte */
#define I2C_NOACK 1 /* PD_SDA level to noack a byte */
@@ -154,7 +152,6 @@ static void send_stop(void)
I2C_TRISTATE;
}
-
/*-----------------------------------------------------------------------
* ack should be I2C_ACK or I2C_NOACK
*/
@@ -174,7 +171,6 @@ static void send_ack(int ack)
I2C_DELAY;
}
-
/*-----------------------------------------------------------------------
* Send 8 bits and look for an acknowledgement.
*/
@@ -246,6 +242,7 @@ int i2c_set_bus_num(unsigned int bus)
#endif
return 0;
}
+#endif
/* TODO: add 100/400k switching */
unsigned int i2c_get_bus_speed(void)
@@ -260,7 +257,6 @@ int i2c_set_bus_speed(unsigned int speed)
return 0;
}
-#endif
/*-----------------------------------------------------------------------
* if ack == I2C_ACK, ACK the byte so can continue reading, else
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [Patch V2] soft_i2c.c compiler/linker error
2009-03-30 7:51 ` [U-Boot] [Patch V2] " Jens Scharsig
@ 2009-03-31 6:32 ` Heiko Schocher
2009-03-31 6:18 ` [U-Boot] [Patch V2.1] " Jens Scharsig
0 siblings, 1 reply; 10+ messages in thread
From: Heiko Schocher @ 2009-03-31 6:32 UTC (permalink / raw)
To: u-boot
Hello Jens,
Jens Scharsig wrote:
> This patch fix the compiler/linker errors
>
> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>
> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef (wrong define order)
This line is too long also s/uesd/used should be done ... I fix
this, when apply this patch (or you send me a new one)
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [Patch V2.1] soft_i2c.c compiler/linker error
2009-03-31 6:18 ` [U-Boot] [Patch V2.1] " Jens Scharsig
@ 2009-03-31 7:08 ` Heiko Schocher
0 siblings, 0 replies; 10+ messages in thread
From: Heiko Schocher @ 2009-03-31 7:08 UTC (permalink / raw)
To: u-boot
Hello Jens,
Jens Scharsig wrote:
> This patch fix the compiler/linker errors
>
> common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
> common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
>
> if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not
> uesd/undef (wrong define order)
>
> and
>
> removes additional empty lines
>
> Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
Applied to u-boot-i2c.git
thanks
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-03-31 7:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 10:31 [U-Boot] [Patch] soft_i2c.c compiler/linker error Jens Scharsig
2009-03-27 10:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-27 11:30 ` Jens Scharsig
2009-03-30 5:22 ` Heiko Schocher
2009-03-30 8:00 ` Jens Scharsig
2009-03-30 5:21 ` Heiko Schocher
2009-03-30 7:51 ` [U-Boot] [Patch V2] " Jens Scharsig
2009-03-31 6:32 ` Heiko Schocher
2009-03-31 6:18 ` [U-Boot] [Patch V2.1] " Jens Scharsig
2009-03-31 7:08 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox