2013-07-02 09:47:30

by Vincent Stehlé

[permalink] [raw]
Subject: [PATCH linux-next] i2c-designware: use div_u64 to fix link

This fixes the following link error:

drivers/built-in.o: In function `dw_i2c_probe':
of_iommu.c:(.text+0x18c8f0): undefined reference to `__aeabi_uldivmod'
make: *** [vmlinux] Error 1

Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: Christian Ruppert <[email protected]>
Cc: Pierrick Hascoet <[email protected]>
---


Hi,

Linux next-20130702 link broke for ARM config multi_v7_defconfig. This is with
gcc 4.7.2 but I am not sure it matters much here.

This patch repairs the link.

It did not break anything for me on i.MX6 sabre sd, but it does'nt have a
designware i2c, so more reviewing/testing is welcome.

Best regards,

V.


drivers/i2c/busses/i2c-designware-platdrv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index def79b5..4c5fada 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -122,7 +122,8 @@ static int dw_i2c_probe(struct platform_device *pdev)

of_property_read_u32(pdev->dev.of_node,
"i2c-sda-hold-time-ns", &ht);
- dev->sda_hold_time = ((u64)ic_clk * ht + 500000) / 1000000;
+ dev->sda_hold_time = div_u64((u64)ic_clk * ht + 500000,
+ 1000000);
}

dev->functionality =
--
1.7.10.4



2013-07-02 21:12:42

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link

On Tue, Jul 2, 2013 at 2:46 AM, Vincent Stehl?
<[email protected]> wrote:
> This fixes the following link error:
>
> drivers/built-in.o: In function `dw_i2c_probe':
> of_iommu.c:(.text+0x18c8f0): undefined reference to `__aeabi_uldivmod'
> make: *** [vmlinux] Error 1
>
> Signed-off-by: Vincent Stehl? <[email protected]>
> Cc: Wolfram Sang <[email protected]>
> Cc: Christian Ruppert <[email protected]>
> Cc: Pierrick Hascoet <[email protected]>
> ---
>
>
> Hi,
>
> Linux next-20130702 link broke for ARM config multi_v7_defconfig. This is with
> gcc 4.7.2 but I am not sure it matters much here.
>
> This patch repairs the link.
>
> It did not break anything for me on i.MX6 sabre sd, but it does'nt have a
> designware i2c, so more reviewing/testing is welcome.

This also broke a handful of other ARM defconfigs (notably spear*_defconfig,)

I build tested this on top of next-20130702 for multi_v7_defconfig as
well as all 3 spear defconfigs, and confirm that linux-next is back to
building for those platforms.

Tested-by: Kevin Hilman <[email protected].

Kevin

2013-07-03 08:45:09

by Christian Ruppert

[permalink] [raw]
Subject: Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link

On Tue, Jul 02, 2013 at 11:46:54AM +0200, Vincent Stehlll wrote:
> This fixes the following link error:
>
> drivers/built-in.o: In function `dw_i2c_probe':
> of_iommu.c:(.text+0x18c8f0): undefined reference to `__aeabi_uldivmod'
> make: *** [vmlinux] Error 1

Looks good. I also tested it on our ARC based platform, no issues with
compilation or functionality. Thanks for pointing this out.

Reviewed-by: Christian Ruppert <[email protected]>

> Signed-off-by: Vincent Stehl? <[email protected]>
> Cc: Wolfram Sang <[email protected]>
> Cc: Christian Ruppert <[email protected]>
> Cc: Pierrick Hascoet <[email protected]>
> ---
>
>
> Hi,
>
> Linux next-20130702 link broke for ARM config multi_v7_defconfig. This is with
> gcc 4.7.2 but I am not sure it matters much here.
>
> This patch repairs the link.
>
> It did not break anything for me on i.MX6 sabre sd, but it does'nt have a
> designware i2c, so more reviewing/testing is welcome.
>
> Best regards,
>
> V.
>
>
> drivers/i2c/busses/i2c-designware-platdrv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index def79b5..4c5fada 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -122,7 +122,8 @@ static int dw_i2c_probe(struct platform_device *pdev)
>
> of_property_read_u32(pdev->dev.of_node,
> "i2c-sda-hold-time-ns", &ht);
> - dev->sda_hold_time = ((u64)ic_clk * ht + 500000) / 1000000;
> + dev->sda_hold_time = div_u64((u64)ic_clk * ht + 500000,
> + 1000000);
> }
>
> dev->functionality =
> --
> 1.7.10.4
>
>
>

--
Christian Ruppert , <[email protected]>
/|
Tel: +41/(0)22 816 19-42 //| 3, Chemin du Pr?-Fleuri
_// | bilis Systems CH-1228 Plan-les-Ouates

2013-07-03 20:09:52

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link

On Tue, Jul 02, 2013 at 11:46:54AM +0200, Vincent Stehl? wrote:
> This fixes the following link error:
>
> drivers/built-in.o: In function `dw_i2c_probe':
> of_iommu.c:(.text+0x18c8f0): undefined reference to `__aeabi_uldivmod'
> make: *** [vmlinux] Error 1
>
> Signed-off-by: Vincent Stehl? <[email protected]>

Applied to for-next, thanks!


Attachments:
(No filename) (362.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments