linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] i2c-designware: use div_u64 to fix link
@ 2013-07-02  9:46 Vincent Stehlé
  2013-07-03  8:44 ` Christian Ruppert
       [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Stehlé @ 2013-07-02  9:46 UTC (permalink / raw)
  To: linux-next, linux-kernel, linux-i2c
  Cc: Vincent Stehlé, Wolfram Sang, Christian Ruppert,
	Pierrick Hascoet

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é <vincent.stehle@freescale.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
---


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link
       [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
@ 2013-07-02 21:12   ` Kevin Hilman
  2013-07-03 20:09   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2013-07-02 21:12 UTC (permalink / raw)
  To: Vincent Stehlé
  Cc: linux-next-u79uwXL29TY76Z2rM5mHXA, LKML,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Wolfram Sang, Christian Ruppert,
	Pierrick Hascoet

On Tue, Jul 2, 2013 at 2:46 AM, Vincent Stehlé
<vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org> 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é <vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
> Cc: Christian Ruppert <christian.ruppert-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
> Cc: Pierrick Hascoet <pierrick.hascoet-ux6zf3SgZrrQT0dZR+AlfA@public.gmane.org>
> ---
>
>
> 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 <khilman-QSEj5FYQhm64UlQgPVntAg@public.gmane.org

Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link
  2013-07-02  9:46 [PATCH linux-next] i2c-designware: use div_u64 to fix link Vincent Stehlé
@ 2013-07-03  8:44 ` Christian Ruppert
       [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Ruppert @ 2013-07-03  8:44 UTC (permalink / raw)
  To: Vincent Stehlll
  Cc: linux-next, linux-kernel, linux-i2c, Wolfram Sang,
	Pierrick Hascoet

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 <christian.ruppert@abilis.com>

> Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: Christian Ruppert <christian.ruppert@abilis.com>
> Cc: Pierrick Hascoet <pierrick.hascoet@abilis.com>
> ---
> 
> 
> 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              ,          <christian.ruppert@abilis.com>
                                /|
  Tel: +41/(0)22 816 19-42     //|                 3, Chemin du Pré-Fleuri
                             _// | bilis Systems   CH-1228 Plan-les-Ouates

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-next] i2c-designware: use div_u64 to fix link
       [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
  2013-07-02 21:12   ` Kevin Hilman
@ 2013-07-03 20:09   ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2013-07-03 20:09 UTC (permalink / raw)
  To: Vincent Stehlé
  Cc: linux-next-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Christian Ruppert,
	Pierrick Hascoet

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

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é <vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

Applied to for-next, thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-03 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02  9:46 [PATCH linux-next] i2c-designware: use div_u64 to fix link Vincent Stehlé
2013-07-03  8:44 ` Christian Ruppert
     [not found] ` <1372758414-21513-1-git-send-email-vincent.stehle-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-07-02 21:12   ` Kevin Hilman
2013-07-03 20:09   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).