Re: [yocto] quilt-native do_populate_sysroot error [solved]

2014-05-02 Thread Neuer User
This made me crazy, so after lots of tries I thought I should try to do
it *without* my own conf files, although I couldn't imagine why my conf
files produce such an error.

Before I copied the whole conf dir back from a backup. This time I tried
with a completely new conf dir. I did that and strangely got another
error message by sanity-check saying that I am missing two files
(makeinfo, chrpath).

So, I now understand that there is a file called sanity-check in the
conf folder that is not a config file but a state file, declaring if my
installation is complete. As I copied this also in my first attempts, it
did no longer check and so the problem that I am missing a tool was not
reported.

Now, it seems, everything is working. Nonetheless, I would like to
suggest that the sanity-check file should be moved out of the conf
folder into the state folder in a future yocto revision.

Cheers

Michael


Am 01.05.2014 12:19, schrieb Neuer User:
 Hi
 
 I needed to re-setup my yocto directory due to a fs error (was using
 btrfs). Before I used master-next. Now I checked out daisy.
 
 When I start bitbaking, I already get an error [File not found] when
 building quilt-native. The error is in the step do_populate_sysroot. The
 problem is pretty clear:
 
 run.do_populate_sysroot:
 
 def do_populate_sysroot(d):
 bb.build.exec_func(sysroot_stage_all, d)
 for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS', True) or '').split():
 bb.build.exec_func(f, d)
 pn = d.getVar(PN, True)
 multiprov = d.getVar(MULTI_PROVIDER_WHITELIST, True).split()
 provdir =
 d.expand(/home/ubuntu/yocto/build/tmp/work/x86_64-linux/quilt-native/0.61-r0/sysroot-destdir//home/ubuntu/yocto/build/tmp/sysroots/x86_64-linux/sysroot-providers/)
 bb.utils.mkdirhier(provdir)
 for p in d.getVar(PROVIDES, True).split():
 if p in multiprov:
 continue
 p = p.replace(/, _)
 with open(provdir + p, w) as f:
 f.write(pn)
 
 
 do_populate_sysroot(d)
 
 
 Well, the provdir variable is definitely wrong!
 
 How should I fix this?
 
 Thanks
 
 Michael
 


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Blacklisting drivers in poky or in yocto project

2014-05-02 Thread Khem Raj
On Thu, May 1, 2014 at 9:47 PM, Bruce Ashfield
bruce.ashfi...@windriver.com wrote:

 The method I used: in the file /etc/modprobe.d/blacklist.conf, i added
 these following lines:
 blacklist ipv6
 blacklist cfg80211
 blacklist libertas
 blacklist libertas_sdio


 I can't recall if yocto 1.4 had switched to kmod, or if it was still
 the legacy mod-utils ? Can you confirm with one is in play here ?


we use kmod but that should not affect anything since it is backward
compatible with m-i-t
I think the problem here could be one of following

there is another module which is not blacklisted dependent on the
blacklisted one. In this case kmod will have to load it.

Or you have initiramfs where its getting loaded in that case you have
to modiy initramfs any changes in /etc/modules* on main rootfs won't
help.

check if feature( e.g. ipv6) is built into kernel proper and not as a
module. if its builtin then kmod won't be able to help but I guess
this you might already have verified.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] quilt-native do_populate_sysroot error [solved]

2014-05-02 Thread Khem Raj
On Thu, May 1, 2014 at 11:06 PM, Neuer User auslands...@gmx.de wrote:
 Before I copied the whole conf dir back from a backup. This time I tried
 with a completely new conf dir. I did that and strangely got another
 error message by sanity-check saying that I am missing two files
 (makeinfo, chrpath).

well, conf/ dir is generated when you setup the workspace for firs
time and then we do version checks if it needs to be updated. no idea
what you backed up but usually keeping
your changes applied on top of regenerated conf/ dir is a better
option when you move
from one version of YP release to another
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] DNS when using Static IP

2014-05-02 Thread Tarek El-Sherbiny
Hi.

I'm trying to set my IP config to a static address.

iface eth0 inet static
 address 192.168.55.45
 network 192.168.55.0
 netmask 255.255.255.0
 broadcast 192.168.55.255
 gateway 192.168.55.1
 dns-nameservers 192.168.10.2

But I don't get the DNS server address to be included in /etc/resolv.conf

If I run in dchp mode, then the resolv.conf is updated with my DNS address.
Is there something I'm missing here in my setup?


-- 
*Tarek*
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Iorga, Cristian
Hello,

What image did you start from, if any?
i.e., core-image-minimal, core-image-sato, etc…
Is connman included?

Regards,
Cristian Iorga
YP
Intel Corporation

From: openembedded-core-boun...@lists.openembedded.org 
[mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of Tarek 
El-Sherbiny
Sent: Friday, May 2, 2014 2:05 PM
To: yocto@yoctoproject.org; openembedded-c...@lists.openembedded.org
Subject: [OE-core] DNS when using Static IP

Hi.

I'm trying to set my IP config to a static address.

iface eth0 inet static
 address 192.168.55.45
 network 192.168.55.0
 netmask 255.255.255.0
 broadcast 192.168.55.255
 gateway 192.168.55.1
 dns-nameservers 192.168.10.2

But I don't get the DNS server address to be included in /etc/resolv.conf

If I run in dchp mode, then the resolv.conf is updated with my DNS address.
Is there something I'm missing here in my setup?


--
Tarek
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Tarek El-Sherbiny
No connman is not included.  Shall I include it and try?
On 2 May 2014 13:01, Iorga, Cristian cristian.io...@intel.com wrote:

  Hello,



 What image did you start from, if any?

 i.e., core-image-minimal, core-image-sato, etc…

 Is connman included?



 Regards,

 Cristian Iorga

 YP

 Intel Corporation



 *From:* openembedded-core-boun...@lists.openembedded.org [mailto:
 openembedded-core-boun...@lists.openembedded.org] *On Behalf Of *Tarek
 El-Sherbiny
 *Sent:* Friday, May 2, 2014 2:05 PM
 *To:* yocto@yoctoproject.org; openembedded-c...@lists.openembedded.org
 *Subject:* [OE-core] DNS when using Static IP



 Hi.



 I'm trying to set my IP config to a static address.



 iface eth0 inet static

  address 192.168.55.45

  network 192.168.55.0

  netmask 255.255.255.0

  broadcast 192.168.55.255

  gateway 192.168.55.1

  dns-nameservers 192.168.10.2



 But I don't get the DNS server address to be included in /etc/resolv.conf



 If I run in dchp mode, then the resolv.conf is updated with my DNS address.

 Is there something I'm missing here in my setup?





 --

 *Tarek*

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Iorga, Cristian
Not really, I just wanted to get a better overview of the issue that you are 
facing.
What image did you started from, if any?

From: Tarek El-Sherbiny [mailto:tarek.elsherb...@gmail.com]
Sent: Friday, May 2, 2014 3:31 PM
To: Iorga, Cristian
Cc: openembedded-c...@lists.openembedded.org; yocto@yoctoproject.org
Subject: RE: [OE-core] DNS when using Static IP


No connman is not included.  Shall I include it and try?
On 2 May 2014 13:01, Iorga, Cristian 
cristian.io...@intel.commailto:cristian.io...@intel.com wrote:
Hello,

What image did you start from, if any?
i.e., core-image-minimal, core-image-sato, etc…
Is connman included?

Regards,
Cristian Iorga
YP
Intel Corporation

From: 
openembedded-core-boun...@lists.openembedded.orgmailto:openembedded-core-boun...@lists.openembedded.org
 
[mailto:openembedded-core-boun...@lists.openembedded.orgmailto:openembedded-core-boun...@lists.openembedded.org]
 On Behalf Of Tarek El-Sherbiny
Sent: Friday, May 2, 2014 2:05 PM
To: yocto@yoctoproject.orgmailto:yocto@yoctoproject.org; 
openembedded-c...@lists.openembedded.orgmailto:openembedded-c...@lists.openembedded.org
Subject: [OE-core] DNS when using Static IP

Hi.

I'm trying to set my IP config to a static address.

iface eth0 inet static
 address 192.168.55.45
 network 192.168.55.0
 netmask 255.255.255.0
 broadcast 192.168.55.255
 gateway 192.168.55.1
 dns-nameservers 192.168.10.2

But I don't get the DNS server address to be included in /etc/resolv.conf

If I run in dchp mode, then the resolv.conf is updated with my DNS address.
Is there something I'm missing here in my setup?


--
Tarek
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
ajlen...@dynamicdevices.co.uk wrote:
...
 So I guess I'm at the point where I'm wondering if a getVar() with a
 flag is behaving as you would expect it to,
 or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
 isn't defined?

 Thanks in advance for any advice,

I think we have a simple error error. You are mixing a recipe, which
is old and a metadata layer with new concepts.

The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
the recipe as it was left as a fallback in case user needed it and the
value was different from newer releases.

In your case, the easier is to make a new yourmachine.conf and use the
UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 10:01 AM, Alex J Lennon
ajlen...@dynamicdevices.co.uk wrote:

 On 02/05/2014 13:56, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 ...
 So I guess I'm at the point where I'm wondering if a getVar() with a
 flag is behaving as you would expect it to,
 or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
 isn't defined?

 Thanks in advance for any advice,
 I think we have a simple error error. You are mixing a recipe, which
 is old and a metadata layer with new concepts.

 The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
 the recipe as it was left as a fallback in case user needed it and the
 value was different from newer releases.

 In your case, the easier is to make a new yourmachine.conf and use the
 UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.


 If I have to do that, then I have to do that.

 However if I could just undefine one of the two variables defined in the
 meta-fsl-arm
 layer then I could continue with what I am doing without having to spend
 the time
 right now to rework the configuration, which is wasted effort for me, as
 I will be moving
 up to the new version of u-boot in the near future.

 Is there no simple way to undefine a variable in a recipe?

You can change the recipe byhand. This is ugly and I wouldn't do it. I
do think you are wasting more time trying to 'workaround' it than
fixing it.

Comment the UBOOT_MACHINE setting in the u-boot-imx recipe and move
on. The log is clear you're not setting the PREFERRED_VERSION
accordingly and you should.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Tarek El-Sherbiny
My image is based on core-image-base.

include recipes-core/images/core-image-base.bb



On Fri, May 2, 2014 at 1:49 PM, Iorga, Cristian cristian.io...@intel.comwrote:

  Not really, I just wanted to get a better overview of the issue that you
 are facing.

 What image did you started from, if any?



 *From:* Tarek El-Sherbiny [mailto:tarek.elsherb...@gmail.com]
 *Sent:* Friday, May 2, 2014 3:31 PM
 *To:* Iorga, Cristian
 *Cc:* openembedded-c...@lists.openembedded.org; yocto@yoctoproject.org
 *Subject:* RE: [OE-core] DNS when using Static IP



 No connman is not included.  Shall I include it and try?

 On 2 May 2014 13:01, Iorga, Cristian cristian.io...@intel.com wrote:

   Hello,



 What image did you start from, if any?

 i.e., core-image-minimal, core-image-sato, etc…

 Is connman included?



 Regards,

 Cristian Iorga

 YP

 Intel Corporation



 *From:* openembedded-core-boun...@lists.openembedded.org [mailto:
 openembedded-core-boun...@lists.openembedded.org] *On Behalf Of *Tarek
 El-Sherbiny
 *Sent:* Friday, May 2, 2014 2:05 PM
 *To:* yocto@yoctoproject.org; openembedded-c...@lists.openembedded.org
 *Subject:* [OE-core] DNS when using Static IP



 Hi.



 I'm trying to set my IP config to a static address.



 iface eth0 inet static

  address 192.168.55.45

  network 192.168.55.0

  netmask 255.255.255.0

  broadcast 192.168.55.255

  gateway 192.168.55.1

  dns-nameservers 192.168.10.2



 But I don't get the DNS server address to be included in /etc/resolv.conf



 If I run in dchp mode, then the resolv.conf is updated with my DNS address.

 Is there something I'm missing here in my setup?





 --

 *Tarek*




-- 
*Tarek*
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Alex J Lennon

On 02/05/2014 14:07, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:01 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 13:56, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 ...
 So I guess I'm at the point where I'm wondering if a getVar() with a
 flag is behaving as you would expect it to,
 or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
 isn't defined?

 Thanks in advance for any advice,
 I think we have a simple error error. You are mixing a recipe, which
 is old and a metadata layer with new concepts.

 The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
 the recipe as it was left as a fallback in case user needed it and the
 value was different from newer releases.

 In your case, the easier is to make a new yourmachine.conf and use the
 UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.

 If I have to do that, then I have to do that.

 However if I could just undefine one of the two variables defined in the
 meta-fsl-arm
 layer then I could continue with what I am doing without having to spend
 the time
 right now to rework the configuration, which is wasted effort for me, as
 I will be moving
 up to the new version of u-boot in the near future.

 Is there no simple way to undefine a variable in a recipe?
 You can change the recipe byhand. This is ugly and I wouldn't do it. I
 do think you are wasting more time trying to 'workaround' it than
 fixing it.

Or indeed, would be not be reasonable to modify the uboot-config.bbclass
such that
it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
which would seem to be a more complete test and would eliminate the
problem ?

 Comment the UBOOT_MACHINE setting in the u-boot-imx recipe and move
 on. The log is clear you're not setting the PREFERRED_VERSION
 accordingly and you should.


You've lost me. Why am I not setting PREFERRED_VERSION accordingly? I have
two recipes in the checkout and I have configured prefer the older one,
which
seems entirely reasonable.


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 10:11 AM, Alex J Lennon
ajlen...@dynamicdevices.co.uk wrote:

 On 02/05/2014 14:07, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:01 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 13:56, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 ...
 So I guess I'm at the point where I'm wondering if a getVar() with a
 flag is behaving as you would expect it to,
 or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
 isn't defined?

 Thanks in advance for any advice,
 I think we have a simple error error. You are mixing a recipe, which
 is old and a metadata layer with new concepts.

 The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
 the recipe as it was left as a fallback in case user needed it and the
 value was different from newer releases.

 In your case, the easier is to make a new yourmachine.conf and use the
 UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.

 If I have to do that, then I have to do that.

 However if I could just undefine one of the two variables defined in the
 meta-fsl-arm
 layer then I could continue with what I am doing without having to spend
 the time
 right now to rework the configuration, which is wasted effort for me, as
 I will be moving
 up to the new version of u-boot in the near future.

 Is there no simple way to undefine a variable in a recipe?
 You can change the recipe byhand. This is ugly and I wouldn't do it. I
 do think you are wasting more time trying to 'workaround' it than
 fixing it.

 Or indeed, would be not be reasonable to modify the uboot-config.bbclass
 such that
 it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
 which would seem to be a more complete test and would eliminate the
 problem ?

Like: http://privatepaste.com/8046479967

 Comment the UBOOT_MACHINE setting in the u-boot-imx recipe and move
 on. The log is clear you're not setting the PREFERRED_VERSION
 accordingly and you should.


 You've lost me. Why am I not setting PREFERRED_VERSION accordingly? I have
 two recipes in the checkout and I have configured prefer the older one,
 which
 seems entirely reasonable.

Your log say's it looks for u-boot-imx 2013.04 and not for 2009.08.


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
ota...@ossystems.com.br wrote:
 On Fri, May 2, 2014 at 10:11 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 Or indeed, would be not be reasonable to modify the uboot-config.bbclass
 such that
 it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
 which would seem to be a more complete test and would eliminate the
 problem ?

 Like: http://privatepaste.com/8046479967

Fixed: http://privatepaste.com/3ffec754d4

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Paul Eggleton
On Friday 02 May 2014 10:23:10 Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:11 AM, Alex J Lennon
 
 ajlen...@dynamicdevices.co.uk wrote:
  On 02/05/2014 14:07, Otavio Salvador wrote:
  On Fri, May 2, 2014 at 10:01 AM, Alex J Lennon
  
  ajlen...@dynamicdevices.co.uk wrote:
  On 02/05/2014 13:56, Otavio Salvador wrote:
  On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
  ajlen...@dynamicdevices.co.uk wrote:
  ...
  
  So I guess I'm at the point where I'm wondering if a getVar() with a
  flag is behaving as you would expect it to,
  or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
  isn't defined?
  
  Thanks in advance for any advice,
  
  I think we have a simple error error. You are mixing a recipe, which
  is old and a metadata layer with new concepts.
  
  The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
  the recipe as it was left as a fallback in case user needed it and the
  value was different from newer releases.
  
  In your case, the easier is to make a new yourmachine.conf and use the
  UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.
  
  If I have to do that, then I have to do that.
  
  However if I could just undefine one of the two variables defined in the
  meta-fsl-arm
  layer then I could continue with what I am doing without having to spend
  the time
  right now to rework the configuration, which is wasted effort for me, as
  I will be moving
  up to the new version of u-boot in the near future.
  
  Is there no simple way to undefine a variable in a recipe?
  
  You can change the recipe byhand. This is ugly and I wouldn't do it. I
  do think you are wasting more time trying to 'workaround' it than
  fixing it.
  
  Or indeed, would be not be reasonable to modify the uboot-config.bbclass
  such that
  it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
  which would seem to be a more complete test and would eliminate the
  problem ?
 
 Like: http://privatepaste.com/8046479967

if len(x)  0, if len(x),  and if x are all equivalent tests for empty 
strings in Python, so this part of the change does nothing but make the code  
slightly harder to read. This part of the test is not where the problem lies.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Alex J Lennon

On 02/05/2014 14:23, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:11 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 14:07, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:01 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 13:56, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 2:24 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 ...
 So I guess I'm at the point where I'm wondering if a getVar() with a
 flag is behaving as you would expect it to,
 or how I might go about ensuring either UBOOT_MACHINE or UBOOT_CONFIG
 isn't defined?

 Thanks in advance for any advice,
 I think we have a simple error error. You are mixing a recipe, which
 is old and a metadata layer with new concepts.

 The u-boot-imx, in 2009.08 recipe, used to set the UBOOT_MACHINE in
 the recipe as it was left as a fallback in case user needed it and the
 value was different from newer releases.

 In your case, the easier is to make a new yourmachine.conf and use the
 UBOOT_CONFIG or UBOOT_MACHINE setting there so it will work just fine.

 If I have to do that, then I have to do that.

 However if I could just undefine one of the two variables defined in the
 meta-fsl-arm
 layer then I could continue with what I am doing without having to spend
 the time
 right now to rework the configuration, which is wasted effort for me, as
 I will be moving
 up to the new version of u-boot in the near future.

 Is there no simple way to undefine a variable in a recipe?
 You can change the recipe byhand. This is ugly and I wouldn't do it. I
 do think you are wasting more time trying to 'workaround' it than
 fixing it.
 Or indeed, would be not be reasonable to modify the uboot-config.bbclass
 such that
 it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
 which would seem to be a more complete test and would eliminate the
 problem ?
 Like: http://privatepaste.com/8046479967

 Comment the UBOOT_MACHINE setting in the u-boot-imx recipe and move
 on. The log is clear you're not setting the PREFERRED_VERSION
 accordingly and you should.

 You've lost me. Why am I not setting PREFERRED_VERSION accordingly? I have
 two recipes in the checkout and I have configured prefer the older one,
 which
 seems entirely reasonable.
 Your log say's it looks for u-boot-imx 2013.04 and not for 2009.08.


I might be misunderstanding what you are saying here, but if you look at
my earlier email, and check the patchbin snippets I provided you will
see I am preferring 2009.08

 1.
PREFERRED_VERSION_u-boot-imx=2009.08

The test in uboot-config.bbclass causes this to fail/be unavailable to
the build, which is why the log says I cannot use 2009.08, instead
falling back to the newer version. Removing the two lines checking for
the definition of the two variables results in the 2009.08 build
completing successfully - but I don't want to leave that little bomb in
meta-fsl-arm for colleagues to fall over in future.

I cannot override what meta-fsl-arm is setting because I can't (or don't
know how to) undefine one of those two variables in my bbappend, and
although I believe I _can_ set it to an empty string as  Paul suggested,
I don't believe the the getVar() code in uboot-config.bbclass checks
this, although I'm a bit unclear on the semantics of that function call.

I appreciate the help here Otavio, and I was hoping there was a simple
non-invasive way to solve the problem by undefining the variable in my
layer, as it seemed cleaner.

I don't want to waste any more of your time on this though so if I can't
do that then I'll  just  take the hacky route  as an intermediary step,
copy out your 2009.08 recipe into my layer and mod it there.

Thanks for the time  feedback though,

Alex



-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Alex J Lennon

On 02/05/2014 14:25, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
 ota...@ossystems.com.br wrote:
 On Fri, May 2, 2014 at 10:11 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 Or indeed, would be not be reasonable to modify the uboot-config.bbclass
 such that
 it tested for and discarded empty strings in UBOOT_MACHINE / UBOOT_CONFIG
 which would seem to be a more complete test and would eliminate the
 problem ?
 Like: http://privatepaste.com/8046479967
 Fixed: http://privatepaste.com/3ffec754d4


Otavio, thanks for that. Python is not my métier and I had assumed that
the check on  'if ubootmachine' and so forth would check for definition
rather than be a check on a  zero length string.

However given Paul's pointer on Python I've revisited this,

if len(x)  0, if len(x),  and if x are all equivalent tests for empty 
strings in Python

I had tried setting UBOOT_CONFIG =  and UBOOT_MACHINE =  as that's
what I saw used in the getVar(). This which didn't work for me, and I
wrongly assuming this was because  of the test.

If instead I set the appended machine type, e.g.
UBOOT_MACHINE_im6qsabresd = , then that works (!) I guess it's being
copied across somewhere.

So thanks again for the advice. I think we've cracked it :)

Cheers,

Alex

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Tarek El-Sherbiny
I have created  resolv.conf  manually using vi but every time I do a reboot
the file comes back empty. and the dns function is not working.

What is the best solution to this?


On Fri, May 2, 2014 at 3:15 PM, Mike Looijmans mike.looijm...@topic.nlwrote:

 When using DHCP, busybox's udhcpc script will write the DNS entries that
 the server returned into the resolv.conf file.

 In this case, I think you'll have to provide resolv.conf in some other
 way, there's nothing in ifup/ifdown that will modify resolv.conf based on
 keywords in the interfaces file.

 Mike.



 On 05/02/2014 02:49 PM, Iorga, Cristian wrote:

 Not really, I just wanted to get a better overview of the issue that you
 are facing.

 What image did you started from, if any?

 *From:*Tarek El-Sherbiny [mailto:tarek.elsherb...@gmail.com]
 *Sent:* Friday, May 2, 2014 3:31 PM
 *To:* Iorga, Cristian
 *Cc:* openembedded-c...@lists.openembedded.org; yocto@yoctoproject.org
 *Subject:* RE: [OE-core] DNS when using Static IP


 No connman is not included.  Shall I include it and try?

 On 2 May 2014 13:01, Iorga, Cristian cristian.io...@intel.com
 mailto:cristian.io...@intel.com wrote:

 Hello,

 What image did you start from, if any?

 i.e., core-image-minimal, core-image-sato, etc…

 Is connman included?

 Regards,

 Cristian Iorga

 YP

 Intel Corporation

 *From:*openembedded-core-boun...@lists.openembedded.org
 mailto:openembedded-core-boun...@lists.openembedded.org
 [mailto:openembedded-core-boun...@lists.openembedded.org
 mailto:openembedded-core-boun...@lists.openembedded.org] *On
 Behalf Of *Tarek El-Sherbiny
 *Sent:* Friday, May 2, 2014 2:05 PM
 *To:* yocto@yoctoproject.org mailto:yocto@yoctoproject.org;
 openembedded-c...@lists.openembedded.org
 mailto:openembedded-c...@lists.openembedded.org
 *Subject:* [OE-core] DNS when using Static IP


 Hi.

 I'm trying to set my IP config to a static address.

 iface eth0 inet static

   address 192.168.55.45

   network 192.168.55.0

   netmask 255.255.255.0

   broadcast 192.168.55.255

   gateway 192.168.55.1

   dns-nameservers 192.168.10.2

 But I don't get the DNS server address to be included in
 /etc/resolv.conf

 If I run in dchp mode, then the resolv.conf is updated with my DNS
 address.

 Is there something I'm missing here in my setup?

 --

 /Tarek/





 --
 Mike Looijmans




-- 
*Tarek*
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Target CPU architectures that Yocto Project Support

2014-05-02 Thread Nikos Liapis
Hello,

I would like to know if I could use Yocto Project to build Linux for Sparc v8 
CPU architecture. I am trying to build linux with some tools for the Leon3 
(opencore) CPU and I am facing errors during compilation. So I am trying to 
find an alternative solution to get Linux with some basic tools running on the 
hardware. Sorry if I have made any mistakes or if I sent to the wrong mailing 
list - I am a totaly newbie.


Thank you in advance.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Target CPU architectures that Yocto Project Support

2014-05-02 Thread Khem Raj
Nikos

On Fri, May 2, 2014 at 8:06 AM, Nikos Liapis nick_lia...@yahoo.gr wrote:
 I would like to know if I could use Yocto Project to build Linux for Sparc
 v8 CPU architecture. I am trying to build linux with some tools for the
 Leon3 (opencore) CPU and I am facing errors during compilation. So I am
 trying to find an alternative solution to get Linux with some basic tools
 running on the hardware. Sorry if I have made any mistakes or if I sent to
 the wrong mailing list - I am a totaly newbie.

Sparc is not an already supported architecture in OE-Core however you
should be able to extend it easily
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] DNS when using Static IP

2014-05-02 Thread Mike Looijmans
When using DHCP, busybox's udhcpc script will write the DNS entries that 
the server returned into the resolv.conf file.


In this case, I think you'll have to provide resolv.conf in some other 
way, there's nothing in ifup/ifdown that will modify resolv.conf based 
on keywords in the interfaces file.


Mike.


On 05/02/2014 02:49 PM, Iorga, Cristian wrote:

Not really, I just wanted to get a better overview of the issue that you
are facing.

What image did you started from, if any?

*From:*Tarek El-Sherbiny [mailto:tarek.elsherb...@gmail.com]
*Sent:* Friday, May 2, 2014 3:31 PM
*To:* Iorga, Cristian
*Cc:* openembedded-c...@lists.openembedded.org; yocto@yoctoproject.org
*Subject:* RE: [OE-core] DNS when using Static IP

No connman is not included.  Shall I include it and try?

On 2 May 2014 13:01, Iorga, Cristian cristian.io...@intel.com
mailto:cristian.io...@intel.com wrote:

Hello,

What image did you start from, if any?

i.e., core-image-minimal, core-image-sato, etc…

Is connman included?

Regards,

Cristian Iorga

YP

Intel Corporation

*From:*openembedded-core-boun...@lists.openembedded.org
mailto:openembedded-core-boun...@lists.openembedded.org
[mailto:openembedded-core-boun...@lists.openembedded.org
mailto:openembedded-core-boun...@lists.openembedded.org] *On
Behalf Of *Tarek El-Sherbiny
*Sent:* Friday, May 2, 2014 2:05 PM
*To:* yocto@yoctoproject.org mailto:yocto@yoctoproject.org;
openembedded-c...@lists.openembedded.org
mailto:openembedded-c...@lists.openembedded.org
*Subject:* [OE-core] DNS when using Static IP

Hi.

I'm trying to set my IP config to a static address.

iface eth0 inet static

  address 192.168.55.45

  network 192.168.55.0

  netmask 255.255.255.0

  broadcast 192.168.55.255

  gateway 192.168.55.1

  dns-nameservers 192.168.10.2

But I don't get the DNS server address to be included in
/etc/resolv.conf

If I run in dchp mode, then the resolv.conf is updated with my DNS
address.

Is there something I'm missing here in my setup?

--

/Tarek/






--
Mike Looijmans
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 11:08 AM, Alex J Lennon
ajlen...@dynamicdevices.co.uk wrote:

 On 02/05/2014 14:25, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
 So thanks again for the advice. I think we've cracked it :)

Could you try the attached patch over Poky?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
From 0b0a3f669f7d8beb626729d85e2cba5d85f3e2c0 Mon Sep 17 00:00:00 2001
From: Otavio Salvador ota...@ossystems.com.br
Date: Fri, 2 May 2014 12:20:28 -0300
Subject: [PATCH] uboot-config.bbclass: Fix checking of non-setted values in
 UBOOT_CONFIG
Organization: O.S. Systems Software LTDA.

The code were mistakenly checking for UBOOT_CONFIG flags instead of
UBOOT_CONFIG value when verifying for duplicated setting, this made it
hard to be overriden in case it was need in subsequent layers.

Reported-by: Alex J Lennon ajlen...@dynamicdevices.co.uk
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
 meta/classes/uboot-config.bbclass | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/classes/uboot-config.bbclass b/meta/classes/uboot-config.bbclass
index 8ac1b71..3c48657 100644
--- a/meta/classes/uboot-config.bbclass
+++ b/meta/classes/uboot-config.bbclass
@@ -13,24 +13,25 @@
 
 python () {
 ubootmachine = d.getVar(UBOOT_MACHINE, True)
-ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
-# The doc varflag is special, we don't want to see it here
-ubootconfigflags.pop('doc', None)
+ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
 
-if not ubootmachine and not ubootconfigflags:
+if not ubootmachine and not ubootconfig:
 PN = d.getVar(PN, True)
 FILE = os.path.basename(d.getVar(FILE, True))
 bb.debug(1, To build %s, see %s for instructions on \
  setting up your machine config % (PN, FILE))
 raise bb.parse.SkipPackage(Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the %s machine configuration. % d.getVar(MACHINE, True))
 
-if ubootmachine and ubootconfigflags:
+if ubootmachine and ubootconfig:
 raise bb.parse.SkipPackage(You cannot use UBOOT_MACHINE and UBOOT_CONFIG at the same time.)
 
+ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
+# The doc varflag is special, we don't want to see it here
+ubootconfigflags.pop('doc', None)
+
 if not ubootconfigflags:
 return
 
-ubootconfig = (d.getVar('UBOOT_CONFIG', True) or ).split()
 if len(ubootconfig)  1:
 raise bb.parse.SkipPackage('You can only have a single default for UBOOT_CONFIG.')
 elif len(ubootconfig) == 0:
-- 
2.0.0.rc0

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] is anyone giving a yocto talk at linuxcon in chicago in august?

2014-05-02 Thread Rudolf Streif


   i think that's what i'm going to submit. tomorrow's the submission
 deadline so i have to get something in quick. i figure i'll submit
 something like Building an Embedded Linux System Using YoctoProject,
 using the BeagleBone Black as the platform example.


 I have done a POC generating very small specific appliances using OE and
 lxc, in previous life which you then launch in thousands on demands on a
 big server to do specific jobs like subscriber connections etc. I think
 such a topic would definitely interest linuxcon attendees, I don't plan to
 attend this one but if someone wants to take this and develop into a talk I
 can help.


+1, a presentation like that would be more relevant (and more likely to be
accepted by the program committee) for LinuxCon than one that evolves
around the BeagleBone. That has a better fit for ELC.

It would also be a good opportunity that YP is not limited to embedded
devices.

:rjs
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Alex J Lennon

On 02/05/2014 16:24, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 11:08 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 14:25, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
 So thanks again for the advice. I think we've cracked it :)
 Could you try the attached patch over Poky?


I tried the patch, but I'm not sure that it makes a difference I'm afraid

- with UBOOT_MACHINE =  or UBOOT_CONFIG =  in my .bbappend I still
get the message about 2009.08 not being available
- with UBOOT_MACHINE_imx6qsabresd =  .bbappend it still works

Best Regards,

Alex
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH] Remove uses of PRINC

2014-05-02 Thread Paul Barker
PRINC is now obsolete and the PR Service should be used instead to keep PR
values incrementing on change.

A patch has also been submitted to openembedded-core to bump the appropriate PR
values so that PR doesn't move backwards. This patch should only be applied
after that patch, and only to branches which include that patch (ie. if that
patch doesn't go into daisy in oe-core, this patch shouldn't go into daisy in
meta-raspberrypi).

Signed-off-by: Paul Barker p...@paulbarker.me.uk
---
 recipes-bsp/formfactor/formfactor_0.0.bbappend | 1 -
 recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/recipes-bsp/formfactor/formfactor_0.0.bbappend 
b/recipes-bsp/formfactor/formfactor_0.0.bbappend
index 0003480..72d991c 100644
--- a/recipes-bsp/formfactor/formfactor_0.0.bbappend
+++ b/recipes-bsp/formfactor/formfactor_0.0.bbappend
@@ -1,2 +1 @@
 FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}:
-PRINC = 1
diff --git a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend 
b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
index 3e86645..e37f942 100644
--- a/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ b/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
@@ -1,8 +1,5 @@
 FILESEXTRAPATHS_prepend := ${THISDIR}/${PN}:
 
-# Don't forget to bump PRINC if you update the extra files.
-PRINC := ${@int(PRINC) + 5}
-
 THISDIR := ${@os.path.dirname(bb.data.getVar('FILE', d, True))}
 FILESPATH =. ${@base_set_filespath([${THISDIR}/${PN}], d)}:
 
-- 
1.9.2

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] is anyone giving a yocto talk at linuxcon in chicago in august?

2014-05-02 Thread Robert P. J. Day
On Fri, 2 May 2014, Rudolf Streif wrote:


   i think that's what i'm going to submit.
 tomorrow's the submission
 deadline so i have to get something in quick. i
 figure i'll submit
 something like Building an Embedded Linux System
 Using YoctoProject,
 using the BeagleBone Black as the platform
 example.


 I have done a POC generating very small specific appliances using
 OE and lxc, in previous life which you then launch in thousands on
 demands on a big server to do specific jobs like subscriber
 connections etc. I think such a topic would definitely
 interest linuxcon attendees, I don't plan to attend this one but if
 someone wants to take this and develop into a talk I can help.
  

 +1, a presentation like that would be more relevant (and more likely to
 be accepted by the program committee) for LinuxCon than one that evolves
 around the BeagleBone. That has a better fit for ELC.

 It would also be a good opportunity that YP is not limited to embedded
 devices.

  i'll have to wait until i get home and think about this, the
submission deadline is end of today so i need to decide quickly. i
like the above idea, and i would have until august to put something
together. so expect another post after work today, after which i need
to make a snap decision.

  at the risk of asking for help so quickly, since i've never used OE
and lxc, what would a short abstract of that look like? since all i
need is a suitable abstract for the submission, then i can put the
whole thing together between now and then.

  and now, back into the classroom ...

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Otavio Salvador
On Fri, May 2, 2014 at 12:46 PM, Alex J Lennon
ajlen...@dynamicdevices.co.uk wrote:

 On 02/05/2014 16:24, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 11:08 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 14:25, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
 So thanks again for the advice. I think we've cracked it :)
 Could you try the attached patch over Poky?


 I tried the patch, but I'm not sure that it makes a difference I'm afraid

 - with UBOOT_MACHINE =  or UBOOT_CONFIG =  in my .bbappend I still
 get the message about 2009.08 not being available
 - with UBOOT_MACHINE_imx6qsabresd =  .bbappend it still works

Yes but this is becase the u-boot-imx_2009.08 has a
UBOOT_MACHINE_imx6qsabresd setting. So it overrides the UBOOT_MACHINE
one. I think without this patch even UBOOT_MACHINE_imx6qsabresd won't
work.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Undefining a variable in a recipe?

2014-05-02 Thread Alex J Lennon

On 02/05/2014 17:55, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 12:46 PM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 16:24, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 11:08 AM, Alex J Lennon
 ajlen...@dynamicdevices.co.uk wrote:
 On 02/05/2014 14:25, Otavio Salvador wrote:
 On Fri, May 2, 2014 at 10:23 AM, Otavio Salvador
 So thanks again for the advice. I think we've cracked it :)
 Could you try the attached patch over Poky?

 I tried the patch, but I'm not sure that it makes a difference I'm afraid

 - with UBOOT_MACHINE =  or UBOOT_CONFIG =  in my .bbappend I still
 get the message about 2009.08 not being available
 - with UBOOT_MACHINE_imx6qsabresd =  .bbappend it still works
 Yes but this is becase the u-boot-imx_2009.08 has a
 UBOOT_MACHINE_imx6qsabresd setting. So it overrides the UBOOT_MACHINE
 one. I think without this patch even UBOOT_MACHINE_imx6qsabresd won't
 work.


I do seem to be having some strangeness with what it is actually
building now
but at least it seems to be picking up the right recipe version so I
imagine I can get the
right build settings in the .bbappend now.

Thanks again Otavio ( Paul)

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [poky] Error patching gcc-4.8.2

2014-05-02 Thread Elvis Dowson
Hi Khem,

I’m getting an error with poky master branch, when it attempts to patch 
gcc-cross-4.8.2.

Have you seen this happen earlier at your end?

Build Configuration:
BB_VERSION= 1.23.1
BUILD_SYS = x86_64-linux
NATIVELSBSTRING   = Ubuntu-12.10
TARGET_SYS= arm-poky-linux-gnueabi
MACHINE   = zc702-zynq7
DISTRO= poky
DISTRO_VERSION= 1.6+snapshot-20140502
TUNE_FEATURES =  arm armv7a vfp neon zynq
TARGET_FPU= vfp-neon
meta  
meta-yocto
meta-yocto-bsp= master:f7bbe9ce7679714c3dc464d0c382ef9ee2d7ce77
meta-xilinx   = master:869cba51d3db7909077ad0f066b784ebfd3b092d
meta-xilinx-community = master:44187a45f0f0c904fc385f12347ae01c669ba7f2

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Command Error: exit status: 1  Output:
File series fully applied, ends at patch 0031-Disable-sdt.patch
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: 
/tool/yocto/build/zc702/tmp/work-shared/gcc-4.8.2-r0/temp/log.do_patch.20954
ERROR: Task 424 (/tool/yocto/poky/meta/recipes-devtools/gcc/gcc-cross_4.8.bb, 
do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 692 tasks of which 3 didn't need to be rerun and 
1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /tool/yocto/poky/meta/recipes-devtools/gcc/gcc-cross_4.8.bb, do_patch
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

real2m18.089s
user11m16.352s
sys 1m20.140s

Regards,

Elvis Dowson




signature.asc
Description: Message signed with OpenPGP using GPGMail
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH 1/1] dylan: fix C++ standard library headers on OS X

2014-05-02 Thread Richard Purdie
On Thu, 2014-05-01 at 23:02 +, Woodyatt, James wrote:
 commit 562fa987cea60d61c256195adce7e83bf1c1a8c9
 Author: james woodyatt james.woody...@intel.com
 Date:   Thu May 1 14:44:39 2014 -0700
 
 Fix C++ standard library header directory configuration.
 
 Remove the 4.2.1 directory from the --with-gxx-include-dir path provided
 to the configure script for GCC 4.7 in the cross-canadian build.
 
 diff --git a/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend 
 b/recipes-devt
 index 3fcc012..083b930 100644
 --- a/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend
 +++ b/recipes-devtools/gcc/gcc-cross-canadian_4.7.bbappend
 @@ -4,7 +4,7 @@ INSANE_SKIP_${PN}_append_darwinsdk =  staticdev
  LDFLAGS_darwinsdk = ${BUILDSDK_LDFLAGS} -L${libdir}/..
  
  # Change gxx-include-dir
 -EXTRA_OECONF_PATHS_darwinsdk = 
 --with-gxx-include-dir=${SDKPATH}/sysroots/${TU
 +EXTRA_OECONF_PATHS_darwinsdk = 
 --with-gxx-include-dir=${SDKPATH}/sysroots/${TU

 --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_nat

 --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGE
--with-build-sysroot=${STAGING_DIR_TARGET}
 

This patch is truncated at the linewrap unfortunately :(

Cheers,

Richard

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [PATCH 0/2] meta-darwin on dylan branch

2014-05-02 Thread Richard Purdie
On Thu, 2014-05-01 at 19:03 +, Woodyatt, James wrote:
 I’ve discovered some errors in the meta-darwin layer on the dylan branch that 
 currently prevent the meta-toolchain target from building the components 
 included in the OS X variant of the Arduino for Intel Galileo IDE.  
 Follow-ups to comprise the two patches that solve the problem.  These changes 
 may need to be merged upstream, but I haven’t looked.
 
 Here are summary descriptions of the patches:
 
 1. Properly configure util-linux when ncurses is configured 
 —with-libterm=tinfo.
 2. Remove usage of ‘new typename’ constructors in ld64 part of odcctools2 
 package.

The big piece I'm missing here is an understand of which circumstances
these failures occur under?

These things build ok for me so what would I need to change on my system
to reproduce these?

The reason I ask is that it helps to understand the cases we're not
catching and documenting the problems in the commit message can be
extremely useful when looking back at why code exists later.

Cheers,

Richard

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[linux-yocto] [PATCH 01/28] LSI AXM55xx: Validate SRIO link ready status during driver initialization.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Check whether the SRIO link ready status is valid for each driver instance.
Fix an issue with scanning/listing the set of network devices found when
multiple SRIO controller master ports are enabled.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 arch/arm/include/asm/axxia-rio.h|5 -
 arch/arm/mach-axxia/rapidio.c   |   19 +++
 arch/powerpc/include/asm/axxia-rio.h|5 -
 drivers/rapidio/devices/lsi/axxia-rio.c |2 +-
 drivers/rapidio/rio.c   |1 +
 5 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h
index 492d476..8b7fba2 100644
--- a/arch/arm/include/asm/axxia-rio.h
+++ b/arch/arm/include/asm/axxia-rio.h
@@ -5,6 +5,8 @@
 #ifndef __ASM_AXXIA_RIO_H__
 #define __ASM_AXXIA_RIO_H__
 
+#include linux/platform_device.h
+
 /* Constants, Macros, etc. */
 
 #define AXXIA_RIO_SMALL_SYSTEM
@@ -76,7 +78,8 @@ extern int axxia_rio_apio_disable(struct rio_mport *mport);
 extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits);
 extern int axxia_rio_rpio_disable(struct rio_mport *mport);
 
-extern int axxia_rapidio_board_init(int devNum, int *portNdx);
+extern int axxia_rapidio_board_init(struct platform_device *dev, int devNum,
+   int *portNdx);
 
 
 /*/
diff --git a/arch/arm/mach-axxia/rapidio.c b/arch/arm/mach-axxia/rapidio.c
index 82deeaa..244550f 100644
--- a/arch/arm/mach-axxia/rapidio.c
+++ b/arch/arm/mach-axxia/rapidio.c
@@ -38,6 +38,7 @@
  * axxia_rapidio_board_init -
  *   Perform board-specific initialization to support use of RapidIO busses
  *
+ * @dev: [IN] RIO platform device
  * @ndx: [IN] Which instance of SRIOC driver needs support
  * @portNdx: [OUT] Which port to use for the specified controller
  *
@@ -45,24 +46,34 @@
  */
 int
 axxia_rapidio_board_init(
+   struct platform_device *dev,
int devNum,
int *portNdx)
 {
+   /* Reset the RIO port id to zero for this device */
void __iomem *gpregBase = ioremap(0x2010094000, 0x1000);
-   unsigned long srioCfg = 0;
+   unsigned long reg = 0;
 
if (gpregBase == NULL)
return -EFAULT;
 
-   srioCfg = inl((long unsigned int)(gpregBase + 0x60));
+   reg = inl((long unsigned int)(gpregBase + 0x60));
 
-   srioCfg = ~(0xf  (devNum * 4));
+   reg = ~(0xf  (devNum * 4));
 
-   outl_p(srioCfg, (long unsigned int)(gpregBase + 0x60));
+   outl_p(reg, (long unsigned int)(gpregBase + 0x60));
 
(*portNdx) = 0;
 
iounmap(gpregBase);
 
+   /* Verify that this device is actually enabled */
+   ncr_read(NCP_REGION_ID(0x115, 0), 0x23c, 4, reg);
+   if ((reg  (1  (21+(devNum*4 == 0) {
+   printk(KERN_INFO %s: SRIO%d link not ready\n,
+   dev-dev.of_node-full_name, devNum);
+   return -ENXIO;
+   }
+
return 0;
 }
diff --git a/arch/powerpc/include/asm/axxia-rio.h 
b/arch/powerpc/include/asm/axxia-rio.h
index b461b80..7d7865b 100644
--- a/arch/powerpc/include/asm/axxia-rio.h
+++ b/arch/powerpc/include/asm/axxia-rio.h
@@ -5,6 +5,8 @@
 #ifndef __ASM_AXXIA_RIO_H__
 #define __ASM_AXXIA_RIO_H__
 
+#include linux/platform_device.h
+
 /* Constants, Macros, etc. */
 
 #define AXXIA_RIO_SYSMEM_BARRIER() __asm__ __volatile__(msync)
@@ -72,7 +74,8 @@ extern int axxia_rio_apio_disable(struct rio_mport *mport);
 extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits);
 extern int axxia_rio_rpio_disable(struct rio_mport *mport);
 
-static inline int axxia_rapidio_board_init(int devNum, int *portNdx)
+static inline int axxia_rapidio_board_init(struct platform_device *dev,
+  int devNum, int *portNdx)
 {
(*portNdx) = 0;
return 0;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio.c 
b/drivers/rapidio/devices/lsi/axxia-rio.c
index 5868569..4673b6b 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio.c
@@ -1624,7 +1624,7 @@ static int axxia_rio_setup(struct platform_device *dev)
  irq, linkdown_reset))
return -EFAULT;
 
-   rc = axxia_rapidio_board_init(ndx, portNdx);
+   rc = axxia_rapidio_board_init(dev, ndx, portNdx);
if (rc != 0)
return rc;
 
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 5312777..3148271 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -1574,6 +1574,7 @@ retry:
}
kfree(nptr);
mport = rio_get_mport(RIO_ANY_ID, mport);
+   key = 0;
}
rdev = NULL;
 done:
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org

[linux-yocto] [PATCH 00/28] LSI AXXIA updates to 3.4 standard/axxia/base

2014-05-02 Thread Charlie Paul
Second set of patches ready for insertion after the previous 
28 patches get upadated.


Anders Berg (4):
  i2c-axxia: Adjust tLOW,tHIGH to match fast-mode requirements
  i2c-axxia: Avoid timeout when interrupt delayed
  i2c-axxia: Fixed i2c device minor numbers
  i2c: axxia: Add support for 10-bit addressing

David Mercado (4):
  LSI FEMAC Ethernet: Updated for upstream submittal
  kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks
  LSI AXM55xx: Axxia GIC driver improvements (3rd gen)
  LSI AXM55xx: Fix PMU handler issue

Gary McGee (1):
  LSI AXM55xx: DDR retention fixes

John Jacques (4):
  axxia: Device tree and Target Name/Machine Type Update
  axxia: Fix a Size Warning in the SRIO Section of the Device Trees
  arch/powerpc: Updated the UART Driver to Support 3500
  arch/powerpc: Don't Try to Use NAND on Axxia 3500

Michael Bringmann (11):
  LSI AXM55xx: Validate SRIO link ready status during driver
initialization.
  LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.
  LSI AXM55xx: Fixes for mailbox open bounds checks.
  LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.
  LSI AXM55xx: Fix concurrency issue for variable.
  LSI AXM55xx: Various performance fixes for rapidio endpoint code.
  LSI AXM55xx/rapidio: Fix NULL pointer reference in
rio_release_inb_mbox.
  LSI AXM55xx: Various bug fixes for rapidio endpoint controller.
  LSI AXM55xx: Configuration updates and bug fixes for rapidio.
  LSI AXM55xx: Disable linkdown reset configuration.
  LSI AXM55xx: Move datastream APIs and symbols to public header file.

SangeethaRao (2):
  LSI sysdev/pci: Removing the power of 2 size restriction
  LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

ningligong (2):
  LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers
  LSI AXM55xx: Fixed inbound data streaming ISR handling

 arch/arm/boot/dts/axm55xx.dts |4 +-
 arch/arm/boot/dts/axm55xxemu.dts  |   25 +-
 arch/arm/boot/dts/axm55xxemu7.dts |  217 +
 arch/arm/boot/dts/axm55xxsim.dts  |   26 +-
 arch/arm/boot/dts/axm55xxsim16.dts|   26 +-
 arch/arm/include/asm/axxia-rio.h  |5 +-
 arch/arm/mach-axxia/Makefile  |2 +-
 arch/arm/mach-axxia/axxia-gic.c   | 1160 +
 arch/arm/mach-axxia/axxia.c   |   40 +-
 arch/arm/mach-axxia/ddr_retention.c   |  258 +++---
 arch/arm/mach-axxia/ddr_shutdown.c|  332 +++
 arch/arm/mach-axxia/rapidio.c |   19 +-
 arch/powerpc/boot/dts/acp25xx.dts |   37 +-
 arch/powerpc/boot/dts/acp342x.dts |   37 +-
 arch/powerpc/boot/dts/acp344x.dts |   37 +-
 arch/powerpc/boot/dts/acp35xx.dts |   29 +-
 arch/powerpc/include/asm/axxia-rio.h  |5 +-
 arch/powerpc/sysdev/lsi_pci.c |   16 +-
 drivers/i2c/busses/i2c-axxia.c|  115 ++-
 drivers/mtd/nand/lsi_acp_nand.c   |9 +-
 drivers/net/ethernet/lsi/Kconfig  |   15 -
 drivers/net/ethernet/lsi/lsi_acp_mdio.c   |  201 +++--
 drivers/net/ethernet/lsi/lsi_acp_net.c|  871 +--
 drivers/net/ethernet/lsi/lsi_acp_net.h|  261 --
 drivers/rapidio/devices/lsi/axxia-rio-ds.c|  647 --
 drivers/rapidio/devices/lsi/axxia-rio-ds.h|  326 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.c   |  289 +++---
 drivers/rapidio/devices/lsi/axxia-rio-irq.h   |   12 +-
 drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +-
 drivers/rapidio/devices/lsi/axxia-rio.c   |   16 +-
 drivers/rapidio/devices/lsi/axxia-rio.h   |4 +-
 drivers/rapidio/rio.c |   15 +-
 drivers/tty/serial/lsi_acp_serial.c   |   94 +-
 include/linux/rio-axxia.h |  322 +++
 kernel/irq/manage.c   |6 +-
 35 files changed, 3156 insertions(+), 2337 deletions(-)
 create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts
 create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c
 create mode 100644 include/linux/rio-axxia.h

-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 03/28] LSI AXM55xx rapidio? Fixed offset of RAB_OBDSE_XX registers

2014-05-02 Thread Charlie Paul
From: ningligong ning...@lsi.com

The register base for the RAB was wrong changed from
0x10 to 0xC

Added the IB_VIRT stats SLEEPING and TRAN_PENDING

Signed-off-by: ningligong ning...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.h |   10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.h 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.h
index 5c0d263..25633c0 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.h
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.h
@@ -73,9 +73,9 @@
 #define IB_VSID_M_PREFETCH_ENABLE  (2)
 #define IB_VSID_M_PREFETCH_WAKEUP  (4)
 
-#define RAB_OBDSE_CTRL(n)(RAB_REG_BASE + (0x2d28 + (0x10*(n
-#define RAB_OBDSE_STAT(n)(RAB_REG_BASE + (0x2d28 + (0x10*(n)))+0x4)
-#define RAB_OBDSE_DESC_ADDR(n)   (RAB_REG_BASE + (0x2d28 + (0x10*(n)))+0x8)
+#define RAB_OBDSE_CTRL(n)(RAB_REG_BASE + (0x2d28 + (0xC*(n
+#define RAB_OBDSE_STAT(n)(RAB_REG_BASE + (0x2d28 + (0xC*(n)))+0x4)
+#define RAB_OBDSE_DESC_ADDR(n)   (RAB_REG_BASE + (0x2d28 + (0xC*(n)))+0x8)
 
 #define RAB_IBVIRT_M_STAT(n) (RAB_REG_BASE + (0x2ef0 + (0x4*(n
 
@@ -95,6 +95,8 @@
 
 /* stats */
 #define IB_VIRT_M_STAT_ERROR_MASK   0x3FC
+#define IB_VIRT_M_STAT_SLEEPING(111)
+#define IB_VIRT_M_STAT_TRAN_PENDING(110)
 #define IB_VIRT_M_STAT_PDU_DROPPED (1  9)
 #define IB_VIRT_M_STAT_SEG_LOSS(1  8)
 #define IB_VIRT_M_STAT_MTU_LEN_MIS_ERR (1  7)
@@ -242,6 +244,8 @@ struct ibds_virt_m_cfg {
u32 num_hw_written_bufs;
 
u32 alias_reg_value;
+   u16 virt_vsid;
+   u16 num_data_streams;
 
 };
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 04/28] LSI AXM55xx: Fixed inbound data streaming ISR handling

2014-05-02 Thread Charlie Paul
From: ningligong ning...@lsi.com

1. Fixed inbound data stream interrupt service routine to properly
   handle packets received by all virtual VSID.
2. Moved checking for vsid_in_use of an inbound DSE, the vsid_in_use
   is only valid when other two bits are set.
Signed-off-by: ningligong ning...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c |  226 
 1 file changed, 131 insertions(+), 95 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 02d3751..4e55ed7 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -242,6 +242,7 @@ int axxia_open_ob_data_stream(
 {
struct rio_priv *priv = mport-priv;
int rc = 0;
+   struct rio_priv *priv = mport-priv;
 
axxia_api_lock(priv);
 
@@ -379,7 +380,6 @@ int open_ob_data_stream(
__rio_local_write_config_32(mport, RAB_OBDSE_DESC_ADDR(dse_id),
des_chain_start_addr_phy_low);
 
-
h = (ptr_ds_priv-ob_dse_irq[dse_id]);
 
sprintf(ptr_dse_cfg-name, obds-%d, dse_id);
@@ -451,7 +451,6 @@ int axxia_add_ob_data_stream(
int rc = 0;
 
/* sanity check - TBD */
-
ptr_ds_priv = (priv-ds_priv_data);
 
/*
@@ -693,8 +692,10 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
ptr_hdr_desc-dw0);
 
/* free the buffer */
-   kfree((void *)ptr_hdr_desc-virt_data_buf);
-   ptr_hdr_desc-buf_status = DS_DBUF_FREED;
+   if (ptr_hdr_desc-buf_status != DS_DBUF_FREED) {
+   kfree((void *)ptr_hdr_desc-virt_data_buf);
+   ptr_hdr_desc-buf_status = DS_DBUF_FREED;
+   }
 
if (ptr_dse_cfg-hdr_read_ptr ==
(ptr_dse_cfg-max_num_hdr_desc - 1)) {
@@ -725,6 +726,7 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
(dse_stat  0x3F));
 
spin_unlock_irqrestore(ptr_dse_cfg-lock, flags);
+
return;
 }
 
@@ -831,8 +833,8 @@ int axxia_open_ib_data_stream(
int desc_dbuf_size,
int num_entries)
 {
-   struct rio_priv *priv = mport-priv;
int rc = 0;
+   struct rio_priv *priv = mport-priv;
 
axxia_api_lock(priv);
 
@@ -1050,6 +1052,7 @@ int open_ib_data_stream(
ptr_virt_m_cfg-cos = cos;
ptr_virt_m_cfg-source_id = source_id;
ptr_virt_m_cfg-desc_dbuf_size = desc_dbuf_size;
+   ptr_virt_m_cfg-virt_vsid = virt_vsid;
 
desc_chain_start_addr_phy =
virt_to_phys((void *)
@@ -1125,6 +1128,10 @@ int axxia_add_ibds_buffer(
u32 m_id;
u8  found_one = RIO_DS_FALSE;
u32 vsid_addr_reg;
+   u32 vsid;
+   u16 virt_vsid;
+   u32 alias_reg;
+   u32 vsid_m_stats;
 
unsigned long   data_addr_phy;
u32 data_addr_hi;
@@ -1136,11 +1143,20 @@ int axxia_add_ibds_buffer(
 
/* search through the virtual M table to find the one that has
**  the same source_id and cos */
+   /* find the mapping between incoming VSID and internal VSID */
+   __rio_local_read_config_32(mport, RAB_IBDS_VSID_ALIAS, alias_reg);
+
+   /* VSID = {16'b SourceID, 8'bCOS} */
+   vsid = ((source_id  0x)  16) | (cos  0xFF);
+
+   /* calculate the virtual M index */
+   (void)axxio_virt_vsid_convert(vsid, alias_reg, virt_vsid);
+
+
for (m_id = 0; m_id  RIO_MAX_NUM_IBDS_VSID_M; m_id++) {
ptr_virt_m_cfg = (ptr_ds_priv-ibds_vsid_m_cfg[m_id]);
 
-   if ((ptr_virt_m_cfg-source_id == source_id)
-   (ptr_virt_m_cfg-cos == cos)
+   if ((ptr_virt_m_cfg-virt_vsid == virt_vsid)
(ptr_virt_m_cfg-in_use == RIO_DS_TRUE)) {
found_one = RIO_DS_TRUE;
break;
@@ -1207,7 +1223,13 @@ int axxia_add_ibds_buffer(
vsid_addr_reg |= IB_VSID_M_PREFETCH_ENABLE;
 
/* wakeup bit is alway set each time a new buffer is added */
-   vsid_addr_reg |= IB_VSID_M_PREFETCH_WAKEUP;
+   __rio_local_read_config_32(mport,
+   RAB_IBVIRT_M_STAT(m_id),
+   vsid_m_stats);
+
+   if (vsid_m_stats  IB_VIRT_M_STAT_SLEEPING)
+   vsid_addr_reg |= IB_VSID_M_PREFETCH_WAKEUP;
+
__rio_local_write_config_32(mport,
RAB_IBDS_VSID_ADDR_HI(m_id),
vsid_addr_reg);
@@ -1247,96 +1269,93 @@ void ib_dse_vsid_m_irq_handler(struct rio_irq_handler 
*h, u32 state)
u32 dse_stat, vsid_m_stats;
   

[linux-yocto] [PATCH 02/28] LSI AXM55xx: Some code optimizations for AXXIA rapidio mport driver.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Correct 'slot' argument to outb msg callback, and remove unnecessary
memory allocations.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   47 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |6 
 2 files changed, 15 insertions(+), 38 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 91175a0..2ffa34b 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -919,9 +919,6 @@ static void release_dme(struct kref *kref)
struct rio_msg_desc *desc;
int i;
 
-   if (me-tx_ack != NULL)
-   kfree(me-tx_ack);
-
if (me-desc) {
for (i = 0, desc = me-desc; i  me-entries; i++, desc++) {
if (desc-msg_virt != NULL)
@@ -1116,12 +1113,6 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
entries, GFP_KERNEL);
if (!me-descriptors)
goto err;
-   if (ack_buf) {
-   me-tx_ack = kzalloc(sizeof(struct rio_msg_tx_ack) * entries,
-GFP_KERNEL);
-   if (!me-tx_ack)
-   goto err;
-   }
me-entries = entries;
me-dev_id = dev_id;
me-entries_in_use = 0;
@@ -1207,7 +1198,7 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
struct rio_mport *mport = h-mport;
struct rio_priv *priv = mport-priv;
struct rio_msg_dme *mbox = h-data;
-   int i, ack_id = 0;
+   int i;
u32 dme_stat, dw0, dme_no = 31 - CNTLZW(state);
u32 dme_ctrl;
unsigned long flags;
@@ -1244,11 +1235,6 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
 
if ((dw0  DME_DESC_DW0_VALID) 
(dw0  DME_DESC_DW0_READY_MASK)) {
-   struct rio_msg_tx_ack *tx_ack = mbox-tx_ack[ack_id++];
-
-   tx_ack-err_state = DESC_STATE_TO_ERRNO(dw0);
-   tx_ack-cookie = desc-cookie;
-
if (!priv-internalDesc) {
*((u32 *)DESC_TABLE_W0_MEM(mbox, desc-desc_no))
= dw0  DME_DESC_DW0_NXT_DESC_VALID;
@@ -1260,26 +1246,23 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
__ob_dme_dw_dbg(priv, dw0);
 
mbox-entries_in_use--;
-   }
-   }
-   spin_unlock_irqrestore(mbox-lock, flags);
 
-   /**
-* UP-call to net device handler
-*/
-   if (mport-outb_msg[dme_no].mcback) {
-   for (i = 0; i  ack_id; i++) {
-   struct rio_msg_tx_ack *tx_ack = mbox-tx_ack[i];
-
-   __ob_dme_event_dbg(priv, dme_no,
-  1  RIO_OB_DME_TX_DESC_READY);
-   mport-outb_msg[dme_no].mcback(mport,
-  mbox-dev_id,
-  dme_no,
-  tx_ack-err_state,
-  tx_ack-cookie);
+   /**
+   * UP-call to net device handler
+   */
+   if (mport-outb_msg[dme_no].mcback) {
+   __ob_dme_event_dbg(priv, dme_no,
+   1  RIO_OB_DME_TX_DESC_READY);
+
+   mport-outb_msg[dme_no].mcback(mport,
+   mbox-dev_id,
+   dme_no,
+   i,
+   desc-cookie);
+   }
}
}
+   spin_unlock_irqrestore(mbox-lock, flags);
 }
 
 /**
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.h 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
index b456541..d98ebfd 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.h
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
@@ -205,11 +205,6 @@ struct rio_msg_desc {
void *cookie;
 };
 
-struct rio_msg_tx_ack {
-   int err_state;
-   void *cookie;
-};
-
 struct rio_msg_dme {
spinlock_t lock;
char name[16];
@@ -227,7 +222,6 @@ struct rio_msg_dme {
int dme_no;
struct rio_msg_desc *desc;
struct rio_desc *descriptors;
-   struct rio_msg_tx_ack *tx_ack;
 #ifdef CONFIG_SRIO_IRQ_TIME
u64 start_irq_tb;
u64 start_thrd_tb;
-- 
1.7.9.5

-- 
___
linux-yocto mailing list

[linux-yocto] [PATCH 06/28] LSI AXM55xx: Improve concurrency protection in AXXIA rapidio calls.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Added a state variable to the interrupt status so the interrupt
for rapidio. This status helps to identify a clearer state
when the interrupt is processed.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c  |2 ++
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   48 +--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |2 ++
 3 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 4e55ed7..2627b07 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -1819,6 +1819,7 @@ void axxia_rio_ds_port_irq_init(
ptr_ds_priv-ob_dse_irq[i].irq_state_reg_addr =
RAB_INTR_STAT_ODSE;
ptr_ds_priv-ob_dse_irq[i].irq_state_mask = (1  i);
+   ptr_ds_priv-ob_dse_irq[i].irq_state = 0;
ptr_ds_priv-ob_dse_irq[i].thrd_irq_fn = ob_dse_irq_handler;
ptr_ds_priv-ob_dse_irq[i].data = NULL;
ptr_ds_priv-ob_dse_irq[i].release_fn = release_ob_ds;
@@ -1838,6 +1839,7 @@ void axxia_rio_ds_port_irq_init(
ptr_ds_priv-ib_dse_vsid_irq[i].irq_state_reg_addr =
RAB_INTR_STAT_IBSE_VSID_M;
ptr_ds_priv-ib_dse_vsid_irq[i].irq_state_mask = (1  i);
+   ptr_ds_priv-ib_dse_vsid_irq[i].irq_state = 0;
ptr_ds_priv-ib_dse_vsid_irq[i].thrd_irq_fn =
ib_dse_vsid_m_irq_handler;
ptr_ds_priv-ib_dse_vsid_irq[i].data = NULL;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index cb16281..9879b7e 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -348,19 +348,9 @@ static void reset_state_counters(struct rio_priv *priv)
 static irqreturn_t thrd_irq_handler(int irq, void *data)
 {
struct rio_irq_handler *h = data;
-   struct rio_mport *mport = h-mport;
-   u32 state;
 
atomic_inc(thrd_handler_calls);
 
-   /**
-* Get current interrupt state and clear latched state
-* for interrupts handled by current thread.
-*/
-   __rio_local_read_config_32(mport, h-irq_state_reg_addr, state);
-   state = h-irq_state_mask;
-   __rio_local_write_config_32(mport, h-irq_state_reg_addr, state);
-
 #ifdef CONFIG_SRIO_IRQ_TIME
if (atomic_read(h-start_time))
h-thrd_tb = get_tb();
@@ -370,7 +360,7 @@ static irqreturn_t thrd_irq_handler(int irq, void *data)
 * Invoke handler callback
 */
test_and_set_bit(RIO_IRQ_ACTIVE, h-state);
-   h-thrd_irq_fn(h, state);
+   h-thrd_irq_fn(h, h-irq_state);
clear_bit(RIO_IRQ_ACTIVE, h-state);
 
return IRQ_HANDLED;
@@ -386,18 +376,25 @@ static irqreturn_t hw_irq_handler(int irq, void *data)
 {
struct rio_irq_handler *h = data;
struct rio_mport *mport = h-mport;
-   u32 state;
 
atomic_inc(hw_handler_calls);
 
-   __rio_local_read_config_32(mport, h-irq_state_reg_addr, state);
-   if (state  h-irq_state_mask) {
+   /**
+* Get current interrupt state and clear latched state
+* for interrupts handled by current thread.
+*/
+   __rio_local_read_config_32(mport, h-irq_state_reg_addr, h-irq_state);
+   h-irq_state = h-irq_state_mask;
+   __rio_local_write_config_32(mport, h-irq_state_reg_addr, h-irq_state);
+
+   if (h-irq_state  h-irq_state_mask) {
 #ifdef CONFIG_SRIO_IRQ_TIME
if (atomic_read(h-start_time))
h-irq_tb = get_tb();
 #endif
return IRQ_WAKE_THREAD;
}
+
return IRQ_NONE;
 }
 
@@ -1013,7 +1010,7 @@ static inline int choose_ob_dme(
if (len  sz)
continue;
 
-   if (dme-entries  (dme-entries_in_use+1)) {
+   if (dme-entries = (dme-entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1198,10 +1195,10 @@ static void ob_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
struct rio_mport *mport = h-mport;
struct rio_priv *priv = mport-priv;
struct rio_msg_dme *mbox = h-data;
-   int i;
u32 dme_stat, dw0, dme_no = 31 - CNTLZW(state);
u32 dme_ctrl;
unsigned long flags;
+   int i;
 
/**
 * Clear latched state
@@ -1253,7 +1250,6 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
if (mport-outb_msg[dme_no].mcback) {
__ob_dme_event_dbg(priv, dme_no,

[linux-yocto] [PATCH 05/28] LSI AXM55xx: Fixes for mailbox open bounds checks.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 2ffa34b..cb16281 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1013,7 +1013,7 @@ static inline int choose_ob_dme(
if (len  sz)
continue;
 
-   if (dme-entries = (dme-entries_in_use+1)) {
+   if (dme-entries  (dme-entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1290,7 +1290,7 @@ static int open_outb_mbox(struct rio_mport *mport, void 
*dev_id, int dme_no,
u64 descChainStart, descAddr;
int buf_sz = 0;
 
-   if ((entries = 0) || (entries  priv-desc_max_entries))
+   if ((entries  2) || (entries  priv-desc_max_entries))
return -EINVAL;
 
if (test_bit(RIO_IRQ_ENABLED, h-state))
@@ -1648,7 +1648,7 @@ static int open_inb_mbox(struct rio_mport *mport, void 
*dev_id,
if ((mbox  0) || (mbox = RIO_MAX_RX_MBOX))
return -EINVAL;
 
-   if ((entries = 0) || (entries  priv-desc_max_entries))
+   if ((entries  2) || (entries  priv-desc_max_entries))
return -EINVAL;
 
h = priv-ib_dme_irq[mbox];
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 08/28] axxia: Device tree and Target Name/Machine Type Update

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

In some cases, the differences between simulation, emulation,
and hardware are important. This patch updates the device trees
to indicate the correct name and the arch/arm/mach-axxia code
to use it.

Signed-off-by: John Jacques john.jacq...@lsi.com
---
 arch/arm/boot/dts/axm55xxemu.dts|   25 +---
 arch/arm/boot/dts/axm55xxemu7.dts   |  217 +++
 arch/arm/boot/dts/axm55xxsim.dts|2 +-
 arch/arm/boot/dts/axm55xxsim16.dts  |2 +-
 arch/arm/mach-axxia/axxia.c |3 +-
 arch/arm/mach-axxia/ddr_retention.c |   33 --
 6 files changed, 247 insertions(+), 35 deletions(-)
 create mode 100644 arch/arm/boot/dts/axm55xxemu7.dts

diff --git a/arch/arm/boot/dts/axm55xxemu.dts b/arch/arm/boot/dts/axm55xxemu.dts
index 1b22b33..93222c1 100644
--- a/arch/arm/boot/dts/axm55xxemu.dts
+++ b/arch/arm/boot/dts/axm55xxemu.dts
@@ -24,7 +24,7 @@
 
 / {
model = AXM5516;
-   compatible = arm, lsi,axm5516;
+   compatible = arm, lsi,axm5516-emu;
interrupt-parent = gic;
#address-cells = 2;
#size-cells = 2;
@@ -68,29 +68,6 @@
reg = 3;
 cpu-release-addr = 0; // Fixed by the boot loader
};
-
-   /*
-   cpu@4 {
-   device_type = cpu;
-   compatible = arm,cortex-a15;
-   reg = 4;
-cpu-release-addr = 0; // Fixed by the boot loader
-   };
-
-   cpu@5 {
-   device_type = cpu;
-   compatible = arm,cortex-a15;
-   reg = 5;
-cpu-release-addr = 0; // Fixed by the boot loader
-   };
-
-   cpu@6 {
-   device_type = cpu;
-   compatible = arm,cortex-a15;
-   reg = 6;
-cpu-release-addr = 0; // Fixed by the boot loader
-   };
-   */
};
 
clocks {
diff --git a/arch/arm/boot/dts/axm55xxemu7.dts 
b/arch/arm/boot/dts/axm55xxemu7.dts
new file mode 100644
index 000..6da4393
--- /dev/null
+++ b/arch/arm/boot/dts/axm55xxemu7.dts
@@ -0,0 +1,217 @@
+/*
+ * arch/arm/boot/dts/axm55xxemu7.dts
+ *
+ * Copyright (C) 2012 LSI
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x 0x0040;
+
+/ {
+   model = AXM5516;
+   compatible = arm, lsi,axm5516-emu;
+   interrupt-parent = gic;
+   #address-cells = 2;
+   #size-cells = 2;
+
+   chosen { };
+
+   aliases {
+   serial0   = axxia_serial0;
+   timer = axxia_timers;
+   ethernet0 = axxia_femac0;
+   };
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   cpu@0 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 0;
+cpu-release-addr = 0; // Fixed by the boot loader
+   };
+
+   cpu@1 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 1;
+cpu-release-addr = 0; // Fixed by the boot loader
+   };
+
+   cpu@2 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 2;
+cpu-release-addr = 0; // Fixed by the boot loader
+   };
+
+   cpu@3 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 3;
+cpu-release-addr = 0; // Fixed by the boot loader
+   };
+
+   cpu@4 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 4;
+cpu-release-addr = 0; // Fixed by the boot loader
+   };
+
+   cpu@5 {
+   device_type = cpu;
+   compatible = arm,cortex-a15;
+   reg = 5;
+  

[linux-yocto] [PATCH 07/28] LSI AXM55xx: Fix concurrency issue for variable.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Used 'atomic' counter to track available inbound messages between
interrupt and foreground code.
Also, enable both SRIO modules by default with check for SRIO link
ready status to validated the accesses.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 arch/arm/boot/dts/axm55xx.dts   |4 ++--
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   18 --
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |2 +-
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index 1cba111..826a6e6 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -439,7 +439,7 @@
 
 rio0: rapidio@0x31 {
 index = 0;
-status = disabled;
+status = okay;
 #address-cells = 2;
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
@@ -454,7 +454,7 @@
 
 rio1: rapidio@0x314000 {
 index = 1;
-status = disabled;
+status = okay;
 #address-cells = 2;
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 9879b7e..73b5a4c 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1115,7 +1115,7 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
me-entries_in_use = 0;
me-write_idx = 0;
me-read_idx = 0;
-   me-pending = 0;
+   atomic_set(me-pending, 0);
me-tx_dme_tmo = 0;
me-dme_no = dme_no;
 
@@ -1474,6 +1474,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
+   int nPending;
dme_mask ^= (1  dme_no);
 
while (mb-me[letter]-dme_no != dme_no)
@@ -1550,7 +1551,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
me-write_idx = (me-write_idx + 1) %
 me-entries;
num_new++;
-   me-pending++;
+   atomic_inc(me-pending);
if (num_new == me-entries)
break;
}
@@ -1564,7 +1565,8 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_RING_FULL);
 
-   if (me-pending 
+   nPending = atomic_read(me-pending);
+   if (nPending 
mport-inb_msg[mbox_no].mcback) {
 
mport-inb_msg[mbox_no].mcback(mport,
@@ -2345,6 +2347,7 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
struct rio_rx_mbox *mb;
struct rio_msg_dme *me;
unsigned long iflags;
+   int nPending;
void *buf = NULL;
 
if ((mbox  0) || (mbox = RIO_MAX_RX_MBOX))
@@ -2371,7 +2374,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
__rio_local_write_config_32(mport, RAB_INTR_ENAB_IDME, intr);
}
 
-   while (me-pending) {
+   nPending = atomic_read(me-pending);
+   while (nPending) {
struct rio_msg_desc *desc = me-desc[me-read_idx];
u32 dw0, dw1;
 
@@ -2399,7 +2403,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
(dw0  0xff) | DME_DESC_DW0_VALID);
}
me-read_idx = (me-read_idx + 1) % me-entries;
-   me-pending--;
+   atomic_dec(me-pending);
+   nPending--;
__ib_dme_event_dbg(priv, me-dme_no,
   1  RIO_IB_DME_DESC_ERR);
} else {
@@ -2447,7 +2452,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
mb-next_rx_slot = (mb-next_rx_slot + 1) %
mb-ring_size;
me-read_idx = (me-read_idx + 1) % me-entries;
-   me-pending--;
+   atomic_dec(me-pending);
+   nPending--;
goto done;
}
}
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.h 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.h
index fde7140..7ed5fd8 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.h
+++ 

[linux-yocto] [PATCH 09/28] i2c-axxia: Adjust tLOW, tHIGH to match fast-mode requirements

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

Adjusted the controller setup to meet the timing requirements for I2C fast-mode
on the SCL signal (tLOW and tHIGH). For fast-mode, a 33/66 duty cycle of the
SCL is used to match the minimum timing requirements of 1.3/0.6 for tLOW/tHIGH.

Signed-off-by: Anders Berg anders.b...@lsi.com
---
 drivers/i2c/busses/i2c-axxia.c |   22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 519cda7..e58292b 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -165,6 +165,7 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
u32 divisor = clk_get_rate(idev-i2c_clk) / idev-bus_clk_rate;
u32 clk_mhz = clk_get_rate(idev-i2c_clk) / 100;
u32 t_setup;
+   u32 t_high, t_low;
u32 tmo_clk;
u32 prescale;
unsigned long timeout;
@@ -185,15 +186,22 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
/* Enable Master Mode */
writel(0x1, idev-regs-global_control);
 
+   if (idev-bus_clk_rate = 10) {
+   /* Standard mode SCL 50/50, tSU:DAT = 250 ns */
+   t_high  = divisor*1/2;
+   t_low   = divisor*1/2;
+   t_setup = ns_to_clk(250, clk_mhz);
+   } else {
+   /* Fast mode SCL 33/66, tSU:DAT = 100 ns */
+   t_high  = divisor*1/3;
+   t_low   = divisor*2/3;
+   t_setup = ns_to_clk(100, clk_mhz);
+   }
+
/* SCL High Time */
-   writel(divisor/2, idev-regs-scl_high_period);
+   writel(t_high, idev-regs-scl_high_period);
/* SCL Low Time */
-   writel(divisor/2, idev-regs-scl_low_period);
-
-   t_setup = (idev-bus_clk_rate = 10) ?
-   ns_to_clk(250, clk_mhz) : /* Standard mode tSU:DAT = 250 ns */
-   ns_to_clk(100, clk_mhz); /* Fast mode tSU:DAT = 100 ns */
-
+   writel(t_low, idev-regs-scl_low_period);
/* SDA Setup Time */
writel(t_setup, idev-regs-sda_setup_time);
/* SDA Hold Time, 300ns */
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 10/28] LSI AXM55xx: Various performance fixes for rapidio endpoint code.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Increased the inbox mail buffer size by 8 times.
Removed __devinit from the initialization routines

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |   24 +---
 drivers/rapidio/devices/lsi/axxia-rio.c |4 ++--
 drivers/rapidio/rio.c   |9 ++---
 3 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 73b5a4c..6a4d227 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1010,7 +1010,7 @@ static inline int choose_ob_dme(
if (len  sz)
continue;
 
-   if (dme-entries = (dme-entries_in_use+1)) {
+   if (dme-entries  (dme-entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1474,7 +1474,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
-   int nPending;
dme_mask ^= (1  dme_no);
 
while (mb-me[letter]-dme_no != dme_no)
@@ -1514,7 +1513,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
 #endif
/**
 * Set Valid flag to 0 on each desc with a new message.
-* Flag is reset when the message beloning to the desc
+* Flag is reset when the message belonging to the desc
 * is fetched in get_inb_message().
 * HW descriptor update and fetch is in order.
 */
@@ -1545,6 +1544,12 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
dw0  ~DME_DESC_DW0_VALID);
}
 
+   if (mport-inb_msg[mbox_no].mcback)
+   mport-inb_msg[mbox_no].mcback(mport,
+   me-dev_id,
+   mbox_no,
+   desc-desc_no);
+
__ib_dme_dw_dbg(priv, dw0);
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_PUSH);
@@ -1565,16 +1570,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_RING_FULL);
 
-   nPending = atomic_read(me-pending);
-   if (nPending 
-   mport-inb_msg[mbox_no].mcback) {
-
-   mport-inb_msg[mbox_no].mcback(mport,
-  me-dev_id,
-  mbox_no,
-  letter);
-   }
-
if (dme_stat  IB_DME_STAT_SLEEPING) {
struct rio_msg_desc *desc;
u32 dme_ctrl;
@@ -2129,8 +2124,7 @@ static struct rio_msg_desc *get_ob_desc(struct rio_mport 
*mport,
   DESC_TABLE_W0(desc-desc_no),
   dw0);
}
-   if (!(dw0  DME_DESC_DW0_VALID) ||
-   (dw0  DME_DESC_DW0_ERROR_MASK)) {
+   if (!(dw0  DME_DESC_DW0_VALID)) {
if (desc_num != mb-write_idx)
return NULL;
if (desc_num == mb-write_idx)
diff --git a/drivers/rapidio/devices/lsi/axxia-rio.c 
b/drivers/rapidio/devices/lsi/axxia-rio.c
index 4673b6b..1f1fc39 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio.c
@@ -1369,7 +1369,7 @@ static int rio_mport_dtb_setup(struct platform_device 
*dev,
return -ENOMEM;
}
rio_init_dbell_res(mport-riores[RIO_DOORBELL_RESOURCE], 0, 0x);
-   rio_init_mbox_res(mport-riores[RIO_INB_MBOX_RESOURCE], 0, 8);
+   rio_init_mbox_res(mport-riores[RIO_INB_MBOX_RESOURCE], 0, 64);
rio_init_mbox_res(mport-riores[RIO_OUTB_MBOX_RESOURCE], 0, 3);
sprintf(mport-name, RIO%d mport, mport-id);
 
@@ -1743,7 +1743,7 @@ err_ops:
 /*
   The probe function for RapidIO peer-to-peer network.
 */
-static int __devinit axxia_of_rio_rpn_probe(struct platform_device *dev)
+static int axxia_of_rio_rpn_probe(struct platform_device *dev)
 {
IODP(KERN_INFO Setting up RapidIO peer-to-peer network %s\n,
 

[linux-yocto] [PATCH 12/28] LSI AXM55xx: Various bug fixes for rapidio endpoint controller.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Fix lockup issue processing inbound message descriptor chains.
Revise processing code for inbound/outbound message descriptor
chains to reduce overhead / improve performance.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |  108 ---
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |3 +-
 drivers/rapidio/devices/lsi/axxia-rio.c |2 +-
 drivers/rapidio/devices/lsi/axxia-rio.h |1 +
 drivers/rapidio/rio.c   |2 +-
 5 files changed, 85 insertions(+), 31 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 6a4d227..ae965f9 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1115,7 +1115,8 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
me-entries_in_use = 0;
me-write_idx = 0;
me-read_idx = 0;
-   atomic_set(me-pending, 0);
+   me-last_invalid_desc = 0;
+   me-last_compl_idx = 0;
me-tx_dme_tmo = 0;
me-dme_no = dme_no;
 
@@ -1223,6 +1224,9 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
for (i = 0; i  mbox-entries; i++) {
struct rio_msg_desc *desc = mbox-desc[i];
 
+   if (mbox-last_compl_idx != desc-desc_no)
+   continue;
+
if (!priv-internalDesc) {
dw0 = *((u32 *)DESC_TABLE_W0_MEM(mbox, desc-desc_no));
} else {
@@ -1243,6 +1247,8 @@ static void ob_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ob_dme_dw_dbg(priv, dw0);
 
mbox-entries_in_use--;
+   mbox-last_compl_idx = (mbox-last_compl_idx + 1) %
+   mbox-entries;
 
/**
* UP-call to net device handler
@@ -1532,6 +1538,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
if ((dw0  DME_DESC_DW0_READY_MASK) 
(dw0  DME_DESC_DW0_VALID)) {
 
+#ifdef OBSOLETE_BZ47185
/* Some chips clear this bit, some don't.
** Make sure in any event. */
if (!priv-internalDesc) {
@@ -1543,6 +1550,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
DESC_TABLE_W0(desc-desc_no),
dw0  ~DME_DESC_DW0_VALID);
}
+#endif /* OBSOLETE_BZ47185 */
 
if (mport-inb_msg[mbox_no].mcback)
mport-inb_msg[mbox_no].mcback(mport,
@@ -1556,7 +1564,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
me-write_idx = (me-write_idx + 1) %
 me-entries;
num_new++;
-   atomic_inc(me-pending);
if (num_new == me-entries)
break;
}
@@ -1570,6 +1577,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_RING_FULL);
 
+#ifdef OBSOLETE_BZ47185
if (dme_stat  IB_DME_STAT_SLEEPING) {
struct rio_msg_desc *desc;
u32 dme_ctrl;
@@ -1610,6 +1618,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
 RAB_IB_DME_CTRL(dme_no), dme_ctrl);
}
}
+#endif /* OBSOLETE_BZ47185 */
}
 }
 
@@ -1762,6 +1771,8 @@ static int open_inb_mbox(struct rio_mport *mport, void 
*dev_id,
 */
desc--;
dw0 |= DME_DESC_DW0_NXT_DESC_VALID;
+   dw0 = ~DME_DESC_DW0_VALID;
+   me-last_invalid_desc = desc-desc_no;
if (!priv-internalDesc) {
descChainStart =
(uintptr_t)virt_to_phys(me-descriptors);
@@ -2104,19 +2115,14 @@ void axxia_close_outb_mbox(struct rio_mport *mport, int 
mboxDme)
 static struct rio_msg_desc *get_ob_desc(struct rio_mport *mport,
struct rio_msg_dme *mb)
 {
-   int i, desc_num = mb-write_idx;
+   int desc_num = mb-write_idx;
struct rio_priv *priv = mport-priv;
+   struct rio_msg_desc *desc = mb-desc[desc_num];
+   int nxt_write_idx = (mb-write_idx + 1) % mb-entries;
+   u32 dw0;
 
-   /**
-* HW descriptor 

[linux-yocto] [PATCH 14/28] LSI AXM55xx: Disable linkdown reset configuration.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 arch/powerpc/boot/dts/acp25xx.dts |2 ++
 arch/powerpc/boot/dts/acp35xx.dts |2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index 02f6a28..b5463c5 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -292,7 +292,9 @@
 device_type = rapidio;
 reg = 0x0020 0x0056 0x0 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0021 0x 0x0 0x4000;
+   /*
 linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
+   */
interrupt-parent = MPIC;
 interrupts = 30 2;
 outb-dmes = 2 0x0003 1 0x0001;
diff --git a/arch/powerpc/boot/dts/acp35xx.dts 
b/arch/powerpc/boot/dts/acp35xx.dts
index a26061d..8fd366f 100644
--- a/arch/powerpc/boot/dts/acp35xx.dts
+++ b/arch/powerpc/boot/dts/acp35xx.dts
@@ -403,7 +403,9 @@
 device_type = rapidio;
 reg = 0x0020 0x0056 0x0 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0021 0x 0x0 0x4000;
+   /*
 linkdown-reset = 0x0200 0x100 0x0020 0x0040A000 0x0 
0x1;
+   */
 interrupt-parent = MPIC;
 interrupts = 56 2;
 outb-dmes = 2 0x0003 1 0x0001;
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 13/28] LSI AXM55xx: Configuration updates and bug fixes for rapidio.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Update the powerpc FDT settings for the latest AXXIA RIO code.
Update the ARM/PowerPC LSI configuration to build AXXIA RIO by default.
Add support to reset the AXXIA RIO controller when a Link Reset Request
symbol is received.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 arch/powerpc/boot/dts/acp25xx.dts |   35 ++
 arch/powerpc/boot/dts/acp342x.dts |   37 +++---
 arch/powerpc/boot/dts/acp344x.dts |   37 +++---
 arch/powerpc/boot/dts/acp35xx.dts |   27 +++
 drivers/rapidio/devices/lsi/axxia-rio-irq.c   |   64 +++--
 drivers/rapidio/devices/lsi/axxia-rio-irq.h   |1 +
 drivers/rapidio/devices/lsi/axxia-rio-sysfs.c |   15 +++---
 drivers/rapidio/devices/lsi/axxia-rio.c   |2 +-
 8 files changed, 123 insertions(+), 95 deletions(-)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index 1207631..02f6a28 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -283,27 +283,20 @@
 ;
 };
 
-rio0: rapidio@f002 {
-compatible = lsi,rapidio-delta;
+rio0: rapidio@0x21 {
+index = 0;
+status = okay;
+#address-cells = 2;
+#size-cells = 2;
+compatible = axxia,rapidio-delta;
 device_type = rapidio;
-enabled = 0;
-#size = 0;/* 0 = (256, small system)
- * 1 = (65536, large system) */
-/*
-#host-device-id = 1;
-*/
-/* =0 for enum;  0 for disc */
-/*
-num-dme = 1 0 1;
-*/
-/* (#outb-mseg, #outb-sseg, #inb */
-/*
-num-odme-mseg-desc = 2 128 128;
-num-odme-sseg-desc = 1 256;
-num-idme-desc = 1 512;
-*/
-reg = 0xf002 0x2 0x1000; /* SRIO Conf region */
-interrupt-parent = MPIC;
-interrupts = 30 0x2 /* NCP_INTR_MPIC_SRC_AXIS_SRIO */;
+reg = 0x0020 0x0056 0x0 0x1000; /* SRIO Conf 0 region */
+ranges = 0x0 0x0 0x0021 0x 0x0 0x4000;
+linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
+   interrupt-parent = MPIC;
+interrupts = 30 2;
+outb-dmes = 2 0x0003 1 0x0001;
+   enable_ds = 1;
 };
+
 };
diff --git a/arch/powerpc/boot/dts/acp342x.dts 
b/arch/powerpc/boot/dts/acp342x.dts
index c9c8a35..99d2858 100644
--- a/arch/powerpc/boot/dts/acp342x.dts
+++ b/arch/powerpc/boot/dts/acp342x.dts
@@ -284,27 +284,22 @@
 ;
 };
 
-rio0: rapidio@f002 {
-compatible = lsi,rapidio-delta;
+rio0: rapidio@0x208000 {
+index = 0;
+status = okay;
+#address-cells = 2;
+#size-cells = 2;
+compatible = axxia,rapidio-delta;
 device_type = rapidio;
-enabled = 0;
-#size = 0;/* 0 = (256, small system)
- * 1 = (65536, large system) */
-/*
-#host-device-id = 1;
-*/
-/* =0 for enum;  0 for disc */
-/*
-num-dme = 1 0 1;
-*/
-/* (#outb-mseg, #outb-sseg, #inb */
-/*
-num-odme-mseg-desc = 2 128 128;
-num-odme-sseg-desc = 1 256;
-num-idme-desc = 1 512;
-*/
-reg = 0xf002 0x2 0x1000; /* SRIO Conf region */
-interrupt-parent = MPIC;
-interrupts = 30 0x2 /* NCP_INTR_MPIC_SRC_AXIS_SRIO */;
+reg = 0x0020 0x0042 0x0 0x1000; /* SRIO Conf 0 region */
+ranges = 0x0 0x0 0x0020 0x8000 0x0 0x4000;
+   /*
+linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
+   */
+   interrupt-parent = MPIC;
+interrupts = 30 2;
+outb-dmes = 2 0x0003 1 0x0001;
+   enable_ds = 1;
 };
+
 };
diff --git a/arch/powerpc/boot/dts/acp344x.dts 
b/arch/powerpc/boot/dts/acp344x.dts
index 1207631..51fa547 100644
--- a/arch/powerpc/boot/dts/acp344x.dts
+++ b/arch/powerpc/boot/dts/acp344x.dts
@@ -283,27 +283,22 @@
 ;
 };
 
-rio0: rapidio@f002 {
-compatible = lsi,rapidio-delta;
+rio0: rapidio@0x208000 {
+index = 0;
+status = okay;
+#address-cells = 2;
+#size-cells = 2;
+compatible = axxia,rapidio-delta;
 device_type = rapidio;
-enabled = 0;
-   

[linux-yocto] [PATCH 15/28] LSI AXM55xx: Move datastream APIs and symbols to public header file.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 drivers/rapidio/devices/lsi/axxia-rio-ds.c  |  539 ++-
 drivers/rapidio/devices/lsi/axxia-rio-ds.h  |  330 +---
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |6 +-
 drivers/rapidio/devices/lsi/axxia-rio.c |6 +-
 drivers/rapidio/devices/lsi/axxia-rio.h |3 +-
 include/linux/rio-axxia.h   |  322 
 6 files changed, 634 insertions(+), 572 deletions(-)
 create mode 100644 include/linux/rio-axxia.h

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 2627b07..0e5be61 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -44,24 +44,23 @@
 /* #define ALLOC_BUF_BY_KERNEL 1 */
 
 static inline void __ib_virt_m_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 virt_m_stat);
 
 static inline void __ob_dse_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dse_stat);
 
 static inline void __ob_dse_dw_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dw0);
 
 static inline void __ib_dse_dw_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 dw0);
 
-
 static inline void __ib_virt_m_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 virt_m_stat)
 {
if (virt_m_stat  IB_VIRT_M_STAT_ERROR_MASK) {
@@ -92,7 +91,7 @@ static inline void __ib_virt_m_dbg(
 }
 
 static inline void __ob_dse_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dse_stat)
 {
if (dse_stat  OB_DSE_STAT_ERROR_MASK) {
@@ -111,7 +110,7 @@ static inline void __ob_dse_dbg(
 }
 
 static inline void __ob_dse_dw_dbg(
-   struct rio_ds_obds_dse_stats *ptr_ob_stats,
+   struct axxia_rio_ds_obds_dse_stats *ptr_ob_stats,
u32 dw0)
 {
if (dw0  OB_DSE_DESC_ERROR_MASK) {
@@ -123,7 +122,7 @@ static inline void __ob_dse_dw_dbg(
 }
 
 static inline void __ib_dse_dw_dbg(
-   struct rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
+   struct axxia_rio_ds_ibds_vsid_m_stats *ptr_ib_stats,
u32 dw0)
 {
if (dw0  IB_DSE_DESC_ERROR_MASK) {
@@ -154,16 +153,16 @@ static inline void __ib_dse_dw_dbg(
  * Returns %0 on success
  /
 int axxia_data_stream_global_cfg(
-   struct rio_mport*mport,
+   struct rio_mport   *mport,
int mtu,
int ibds_avsid_mapping)
 {
-   struct rio_priv *priv = mport-priv;
-   struct rio_ds_priv  *ptr_ds_priv = (priv-ds_priv_data);
-   struct ibds_virt_m_cfg  *ptr_virt_m_cfg;
-   struct rio_obds_dse_cfg *ptr_dse_cfg;
-   int reg_val;
-   u32 mtu_value = 0;
+   struct rio_priv*priv = mport-priv;
+   struct axxia_rio_ds_cfg *ptr_ds_cfg = (priv-ds_cfg_data);
+   struct axxia_ibds_virt_m_cfg  *ptr_virt_m_cfg;
+   struct axxia_rio_obds_dse_cfg *ptr_dse_cfg;
+   int reg_val;
+   u32 mtu_value = 0;
int i;
 
/* sanity check */
@@ -176,13 +175,13 @@ int axxia_data_stream_global_cfg(
**  IBDS ALIAS M is used.
*/
for (i = 0; i  RIO_MAX_NUM_IBDS_VSID_M; i++) {
-   ptr_virt_m_cfg = (ptr_ds_priv-ibds_vsid_m_cfg[i]);
+   ptr_virt_m_cfg = (ptr_ds_cfg-ibds_vsid_m_cfg[i]);
if (ptr_virt_m_cfg-in_use == RIO_DS_TRUE)
return -EINVAL;
}
 
for (i = 0; i  RIO_MAX_NUM_OBDS_DSE; i++) {
-   ptr_dse_cfg = (ptr_ds_priv-obds_dse_cfg[i]);
+   ptr_dse_cfg = (ptr_ds_cfg-obds_dse_cfg[i]);
if (ptr_dse_cfg-in_use == RIO_DS_TRUE)
return -EINVAL;
}
@@ -203,8 +202,8 @@ int axxia_data_stream_global_cfg(
__rio_local_write_config_32(mport, RAB_IBDS_VSID_ALIAS, reg_val);
 
/* save information in the system */
-   ptr_ds_priv-mtu = mtu;
-   ptr_ds_priv-ibds_avsid_mapping = ibds_avsid_mapping;
+   ptr_ds_cfg-mtu = mtu;
+   ptr_ds_cfg-ibds_avsid_mapping = ibds_avsid_mapping;
 
return 0;
 }
@@ -240,7 +239,6 @@ int axxia_open_ob_data_stream(
int num_header_entries,
int num_data_entries)
 {
-   struct rio_priv *priv = mport-priv;
int rc = 0;
struct rio_priv *priv = mport-priv;
 
@@ -280,19 +278,20 @@ int open_ob_data_stream(

[linux-yocto] [PATCH 16/28] i2c-axxia: Avoid timeout when interrupt delayed

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

Changed the order in which the interrupt conditions are checked in the
interrupt handler. Need to check for transfer-complete before timeout-error,
otherwise a delayed interrupt may report a false timeout error (since the
timeout may expire after the transfer was completed).

Signed-off-by: Anders Berg anders.b...@lsi.com
---
 drivers/i2c/busses/i2c-axxia.c |   50 ++--
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index e58292b..43b433b 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -334,33 +334,6 @@ axxia_i2c_isr(int irq, void *_dev)
/* Clear interrupt */
writel(0x01, idev-regs-interrupt_status);
 
-   if (unlikely(status  MST_STATUS_ERR)) {
-   idev-msg_err = status  MST_STATUS_ERR;
-   i2c_int_disable(idev, ~0);
-   dev_err(idev-dev, error %s, rx=%u/%u tx=%u/%u\n,
-   status_str(idev-msg_err),
-   readl(idev-regs-mst_rx_bytes_xfrd),
-   readl(idev-regs-mst_rx_xfer),
-   readl(idev-regs-mst_tx_bytes_xfrd),
-   readl(idev-regs-mst_tx_xfer));
-   complete(idev-msg_complete);
-   return IRQ_HANDLED;
-   }
-
-   /* Stop completed? */
-   if (status  MST_STATUS_SCC) {
-   i2c_int_disable(idev, ~0);
-   complete(idev-msg_complete);
-   }
-
-   /* Transfer done? */
-   if (status  (MST_STATUS_SNS | MST_STATUS_SS)) {
-   if (i2c_m_rd(idev-msg)  idev-msg_xfrd  idev-msg-len)
-   axxia_i2c_empty_rx_fifo(idev);
-   i2c_int_disable(idev, ~0);
-   complete(idev-msg_complete);
-   }
-
/* RX FIFO needs service? */
if (i2c_m_rd(idev-msg)  (status  MST_STATUS_RFL))
axxia_i2c_empty_rx_fifo(idev);
@@ -373,6 +346,29 @@ axxia_i2c_isr(int irq, void *_dev)
i2c_int_disable(idev, MST_STATUS_TFL);
}
 
+   if (status  MST_STATUS_SCC) {
+   /* Stop completed? */
+   i2c_int_disable(idev, ~0);
+   complete(idev-msg_complete);
+   } else if (status  (MST_STATUS_SNS | MST_STATUS_SS)) {
+   /* Transfer done? */
+   if (i2c_m_rd(idev-msg)  idev-msg_xfrd  idev-msg-len)
+   axxia_i2c_empty_rx_fifo(idev);
+   i2c_int_disable(idev, ~0);
+   complete(idev-msg_complete);
+   } else if (unlikely(status  MST_STATUS_ERR)) {
+   /* Transfer error? */
+   idev-msg_err = status  MST_STATUS_ERR;
+   i2c_int_disable(idev, ~0);
+   dev_err(idev-dev, error %s, rx=%u/%u tx=%u/%u\n,
+   status_str(status),
+   readl(idev-regs-mst_rx_bytes_xfrd),
+   readl(idev-regs-mst_rx_xfer),
+   readl(idev-regs-mst_tx_bytes_xfrd),
+   readl(idev-regs-mst_tx_xfer));
+   complete(idev-msg_complete);
+   }
+
return IRQ_HANDLED;
 }
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yo...@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 19/28] LSI AXM55xx: Axxia GIC driver improvements (3rd gen)

2014-05-02 Thread Charlie Paul
From: David Mercado david.merc...@windriver.com

Introduce the use of slow bus locking to allow use of Linux RPC
mechanism, remove unnecessary memory barriers, etc.

Signed-off-by: David Mercado david.merc...@windriver.com
---
 arch/arm/mach-axxia/axxia-gic.c | 1109 ---
 1 file changed, 563 insertions(+), 546 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index 8a8e8eb..701d65f 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -3,7 +3,7 @@
  *
  *  Cloned from linux/arch/arm/common/gic.c
  *
- *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
+ *  Copyright (C) 2013 LSI Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -33,24 +33,11 @@
  * registers are banked per-cpu for these sources.
  */
 
-#include linux/init.h
-#include linux/kernel.h
-#include linux/err.h
 #include linux/module.h
-#include linux/list.h
-#include linux/smp.h
-#include linux/cpu_pm.h
-#include linux/cpumask.h
 #include linux/io.h
-#include linux/of.h
 #include linux/of_address.h
-#include linux/of_irq.h
-#include linux/irqdomain.h
-#include linux/interrupt.h
-#include linux/percpu.h
-#include linux/slab.h
+#include linux/cpu_pm.h
 
-#include asm/irq.h
 #include asm/exception.h
 #include asm/smp_plat.h
 #include asm/mach/irq.h
@@ -87,13 +74,7 @@ enum axxia_ext_ipi_num {
MAX_AXM_IPI_NUM
 };
 
-/*
- * Some big arbritary number that won't ever conflict with
- * the IPI numbers defined in arch/arm/kernel/smp.c
- */
-#define AXXIA_RPC 0xff
-
-/* RPC Message types. */
+/* MUX Message types. */
 enum axxia_mux_msg_type {
MUX_MSG_CALL_FUNC = 0,
MUX_MSG_CALL_FUNC_SINGLE,
@@ -113,11 +94,6 @@ static void muxed_ipi_message_pass(const struct cpumask 
*mask,
struct axxia_mux_msg *info;
int cpu;
 
-   /*
-* Order previous accesses before accesses in the IPI handler.
-*/
-   dmb();
-
for_each_cpu(cpu, mask) {
info = per_cpu(ipi_mux_msg, cpu_logical_map(cpu));
info-msg |= 1  ipi_num;
@@ -129,8 +105,6 @@ static void axxia_ipi_demux(struct pt_regs *regs)
struct axxia_mux_msg *info = __get_cpu_var(ipi_mux_msg);
u32 all;
 
-   mb();
-
do {
all = xchg(info-msg, 0);
if (all  (1  MUX_MSG_CALL_FUNC))
@@ -153,19 +127,54 @@ struct gic_chip_data {
union gic_base dist_base;
union gic_base cpu_base;
 #ifdef CONFIG_CPU_PM
-   u32 saved_spi_enable[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 32)];
-   u32 saved_spi_conf[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 16)];
-   u32 saved_spi_target[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 4)];
-   u32 __percpu *saved_ppi_enable;
-   u32 __percpu *saved_ppi_conf;
+   u32 saved_spi_enable[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 32)]
+   [MAX_NUM_CLUSTERS];
+   u32 saved_spi_conf[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 16)]
+ [MAX_NUM_CLUSTERS];
+   u32 saved_spi_target[DIV_ROUND_UP(MAX_GIC_INTERRUPTS, 4)]
+   [MAX_NUM_CLUSTERS];
+   u32 __percpu *saved_ppi_enable[MAX_NUM_CLUSTERS];
+   u32 __percpu *saved_ppi_conf[MAX_NUM_CLUSTERS];
 #endif
struct irq_domain *domain;
unsigned int gic_irqs;
 };
 
+enum gic_rpc_func_mask {
+   IRQ_MASK = 0x01,
+   IRQ_UNMASK = 0x02,
+   SET_TYPE = 0x04,
+   SET_AFFINITY = 0x08,
+   CLR_AFFINITY = 0x10,
+   GIC_NOTIFIER = 0x20,
+   MAX_GIC_FUNC_MASK
+};
+
+
+#ifdef CONFIG_CPU_PM
+struct gic_notifier_data {
+   struct notifier_block *self;
+   unsigned long cmd;
+   void *v;
+};
+#endif
+
+struct gic_rpc_data {
+   struct irq_data *d;
+   u32 func_mask;
+   u32 cpu, oldcpu;
+   u32 type;
+   const struct cpumask *mask_val;
+#ifdef CONFIG_CPU_PM
+   struct gic_notifier_data gn_data;
+#endif
+};
+
 static DEFINE_RAW_SPINLOCK(irq_controller_lock);
+static DEFINE_MUTEX(irq_bus_lock);
 
-static struct gic_chip_data gic_data[MAX_NUM_CLUSTERS] __read_mostly;
+static struct gic_chip_data gic_data __read_mostly;
+static struct gic_rpc_data gic_rpc_data = {NULL, 0, 0, 0, 0, NULL};
 
 #define gic_data_dist_base(d)  ((d)-dist_base.common_base)
 #define gic_data_cpu_base(d)   ((d)-cpu_base.common_base)
@@ -188,88 +197,88 @@ static inline unsigned int gic_irq(struct irq_data *d)
return d-hwirq;
 }
 
-typedef void axxia_call_func_t(void *info);
-
-struct axxia_gic_rpc {
-   int cpu;
-   axxia_call_func_t *func;
-   void *info;
-};
-
-static DEFINE_PER_CPU_SHARED_ALIGNED(struct axxia_gic_rpc, axxia_gic_rpc);
-
-void axxia_gic_handle_gic_rpc(void)
-{
-   u32 this_cpu = cpu_logical_map(smp_processor_id());
-   int cpu;
-
-   for_each_possible_cpu(cpu)
-   {
-   struct axxia_gic_rpc *slot = per_cpu(axxia_gic_rpc, 

[yocto] [AB] PublishLayerTarballs git archives the wrong directory

2014-05-02 Thread Jate S
I am running off of the master branch.

I hope this log message is readable. The key is to know that I have a
meta-oe repo in the build directory and that the last line shows it's
running in build instead of build/meta-oe.

 git archive --format=tar HEAD
--prefix=meta-oe-40e0f371f3eb1628655c484feac0cebf810737b4/ | bzip2 -c
 meta-oe-40e0f371f3eb1628655c484feac0cebf810737b4.tar.bz2; md5sum
meta-oe-40e0f371f3eb1628655c484feac0cebf810737b4.tar.bz2 
meta-oe-40e0f371f3eb1628655c484feac0cebf810737b4.tar.bz2.md5sum; mkdir
-p /home/jate/tmp/yab/publish/builds/qemux86/20140501-1; rsync -av
meta-oe-40e0f371f3eb1628655c484feac0cebf810737b4.tar.bz2*
/home/jate/tmp/yab/publish/builds/qemux86/20140501-1
 in dir /home/jate/yocto-autobuilder/yocto-slave/qemux86/build
(timeout 10 secs)

I think that it should be changing directory to meta-oe, but the code
is just missing that. This happens with all the other repourl's in my
config too. The generated tarballs are of the same size (of poky).


Cheers


- Jate S.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [linux-yocto] [PATCH 10/28] LSI AXM55xx: Various performance fixes for rapidio endpoint code.

2014-05-02 Thread Bruce Ashfield

On 14-05-02 03:16 PM, Charlie Paul wrote:

From: Michael Bringmann michael.bringm...@lsi.com

Increased the inbox mail buffer size by 8 times.


Is there a reason why it was increased ? Were events being lost under load ?

.. that's what we want to see in the commit message.


Removed __devinit from the initialization routines


Again, this really should be two commits.

Bruce



Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
  drivers/rapidio/devices/lsi/axxia-rio-irq.c |   24 +---
  drivers/rapidio/devices/lsi/axxia-rio.c |4 ++--
  drivers/rapidio/rio.c   |9 ++---
  3 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 73b5a4c..6a4d227 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1010,7 +1010,7 @@ static inline int choose_ob_dme(
if (len  sz)
continue;

-   if (dme-entries = (dme-entries_in_use+1)) {
+   if (dme-entries  (dme-entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1474,7 +1474,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
-   int nPending;
dme_mask ^= (1  dme_no);

while (mb-me[letter]-dme_no != dme_no)
@@ -1514,7 +1513,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
  #endif
/**
 * Set Valid flag to 0 on each desc with a new message.
-* Flag is reset when the message beloning to the desc
+* Flag is reset when the message belonging to the desc
 * is fetched in get_inb_message().
 * HW descriptor update and fetch is in order.
 */
@@ -1545,6 +1544,12 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
dw0  ~DME_DESC_DW0_VALID);
}

+   if (mport-inb_msg[mbox_no].mcback)
+   mport-inb_msg[mbox_no].mcback(mport,
+   me-dev_id,
+   mbox_no,
+   desc-desc_no);
+
__ib_dme_dw_dbg(priv, dw0);
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_PUSH);
@@ -1565,16 +1570,6 @@ static void ib_dme_irq_handler(struct rio_irq_handler 
*h, u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_RING_FULL);

-   nPending = atomic_read(me-pending);
-   if (nPending 
-   mport-inb_msg[mbox_no].mcback) {
-
-   mport-inb_msg[mbox_no].mcback(mport,
-  me-dev_id,
-  mbox_no,
-  letter);
-   }
-
if (dme_stat  IB_DME_STAT_SLEEPING) {
struct rio_msg_desc *desc;
u32 dme_ctrl;
@@ -2129,8 +2124,7 @@ static struct rio_msg_desc *get_ob_desc(struct rio_mport 
*mport,
   DESC_TABLE_W0(desc-desc_no),
   dw0);
}
-   if (!(dw0  DME_DESC_DW0_VALID) ||
-   (dw0  DME_DESC_DW0_ERROR_MASK)) {
+   if (!(dw0  DME_DESC_DW0_VALID)) {
if (desc_num != mb-write_idx)
return NULL;
if (desc_num == mb-write_idx)
diff --git a/drivers/rapidio/devices/lsi/axxia-rio.c 
b/drivers/rapidio/devices/lsi/axxia-rio.c
index 4673b6b..1f1fc39 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio.c
@@ -1369,7 +1369,7 @@ static int rio_mport_dtb_setup(struct platform_device 
*dev,
return -ENOMEM;
}
rio_init_dbell_res(mport-riores[RIO_DOORBELL_RESOURCE], 0, 0x);
-   rio_init_mbox_res(mport-riores[RIO_INB_MBOX_RESOURCE], 0, 8);
+   rio_init_mbox_res(mport-riores[RIO_INB_MBOX_RESOURCE], 0, 64);
rio_init_mbox_res(mport-riores[RIO_OUTB_MBOX_RESOURCE], 0, 3);
sprintf(mport-name, RIO%d mport, mport-id);

@@ -1743,7 +1743,7 @@ err_ops:
  /*
The probe function for RapidIO 

Re: [yocto] [poky] Error patching gcc-4.8.2

2014-05-02 Thread Khem Raj
Elvis

On Fri, May 2, 2014 at 12:06 PM, Elvis Dowson elvis.dow...@gmail.com wrote:
 Have you seen this happen earlier at your end?

I am subsumed with gcc 4.9 work however haven't seen this happening so far.
may be you should clean the build tree and retry
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [poky] Error patching gcc-4.8.2

2014-05-02 Thread Elvis Dowson
Hi Khem,

On May 3, 2014, at 7:24, Khem Raj raj.k...@gmail.com wrote:

 I am subsumed with gcc 4.9 work however haven't seen this happening so far.
 may be you should clean the build tree and retry

This was with a clean build.

There are a bunch of changes to the gcc recipes done by Richard Purdie
starting with this one, which appears to have triggered the build failure with 
the gcc-4.8.2 recipe

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=03a0f8e8b4e286bfcc0076e7380ce26d1b1b106a

Reverting to commit 17daa2ba6280304771c5fe52b94eb56f0c087490 for poky
master branch helps complete the build. This was a commit from 3 days ago

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=17daa2ba6280304771c5fe52b94eb56f0c087490

Regards,

Elvis Dowson


signature.asc
Description: Message signed with OpenPGP using GPGMail
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[linux-yocto] [PATCH 00/28] Resubmit LSI AXXIA updates to 3.4 standard/axxia/base

2014-05-02 Thread Charlie Paul
Sorry Bruce, those two patches appeared in my tree after a rebase.
I will put the --cc-supress in my submittals

Anders Berg (7):
  axxia: Fixed earlyprintk
  axxia: Define arch_is_coherent()
  ARM: 7465/1: Handle 4GB memory sizes in device tree and
mem=size@start option
  ARM: LPAE: use phys_addr_t in alloc_init_pud()
  ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM
  arm: mmu: Fixed checkpatch issues with mmu
  drivers/i2c-axxia: Support I2C_M_RECV_LEN

David Mercado (2):
  LSI AXM55xx: Enable multi-cluster wfe/sev
  LSI AXM55XX: Add PMU support

John Jacques (6):
  arch/arm/mach-axxi: Updated DDR Retention to Wokr from Interrupt
Context
  arch/arm/mach-axxia: Clear MTC Errors During Initialization
  LSI: Fix Device Tree compatible fields
  powerpc/mpic: Disable preemption when calling mpic_processor_id()
  arm/mach-axxia: Same build for HW and simlation and DDR Retention
Reset and clock init.
  axxia: Remove Wrapper Functions

Michael Bringmann (1):
  LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct
boundary, Expand valid condition.

Paul Butler (8):
  drivers/rapidio/devices: Initial Submittal of LSI rapidio
  drivers/rapidio: new files
  drivers/rapidio: modified files
  arm: rapidio updates
  powerpc: rapidio updates
  include: rapidio updates
  drivers: rapidio updates
  arm/mach-axxia: Updated PCIe driver to set PCIe

SangeethaRao (3):
  arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500
emulation
  drivers/usb: USB driver/dts on PPC was broken.
  arch/arm/mach-axxia: added support for ncr_read/ncr_write

ningligong (1):
  drivers/rapidio/lsi: squash a bunch rapidio stuff together and
Cleanup

 arch/arm/Kconfig|   19 +
 arch/arm/Kconfig.debug  |9 +
 arch/arm/Makefile   |3 -
 arch/arm/boot/dts/axm-sim.dts   |  403 
 arch/arm/boot/dts/axm55xx.dts   |   50 +-
 arch/arm/boot/dts/axm55xxemu.dts|   21 +-
 arch/arm/boot/dts/axm55xxsim.dts|   94 +-
 arch/arm/boot/dts/axm55xxsim16.dts  |  439 
 arch/arm/include/asm/axxia-rio.h|  135 ++
 arch/arm/include/asm/rio.h  |   37 +
 arch/arm/include/asm/setup.h|   14 +-
 arch/arm/include/asm/spinlock.h |4 +
 arch/arm/kernel/perf_event_v7.c |3 +-
 arch/arm/kernel/setup.c |   70 +-
 arch/arm/mach-axxia/Kconfig |3 -
 arch/arm/mach-axxia/Makefile|3 +-
 arch/arm/mach-axxia/axxia-gic.c |   25 +-
 arch/arm/mach-axxia/axxia.c |  123 +-
 arch/arm/mach-axxia/axxia.h |2 +-
 arch/arm/mach-axxia/clock.c |  185 +-
 arch/arm/mach-axxia/ddr_retention.c |  300 ++-
 arch/arm/mach-axxia/include/mach/debug-macro.S  |   16 +-
 arch/arm/mach-axxia/include/mach/hardware.h |   25 +-
 arch/arm/mach-axxia/include/mach/irqs.h |1 +
 arch/arm/mach-axxia/include/mach/memory.h   |   19 +
 arch/arm/mach-axxia/include/mach/ncr.h  |   44 +
 arch/arm/mach-axxia/ncr.c   |  597 +
 arch/arm/mach-axxia/pci.c   |7 +-
 arch/arm/mach-axxia/platsmp.c   |  155 +-
 arch/arm/mach-axxia/rapidio.c   |   68 +
 arch/arm/mach-axxia/wrappers.c  |  176 --
 arch/arm/mm/mmu.c   |   82 +-
 arch/powerpc/boot/dts/ACP344xV2.dts |   20 +-
 arch/powerpc/boot/dts/acp25xx.dts   |   16 +-
 arch/powerpc/boot/dts/acp342x.dts   |   21 +-
 arch/powerpc/boot/dts/acp344x.dts   |   16 +-
 arch/powerpc/boot/dts/lsi_acp342x.dts   |  317 +++
 arch/powerpc/boot/dts/lsi_acp344x.dts   |  355 +++
 arch/powerpc/include/asm/axxia-rio.h|  107 +
 arch/powerpc/include/asm/rio.h  |   46 +
 arch/powerpc/platforms/44x/Makefile |3 +-
 arch/powerpc/platforms/44x/acprio.c |   65 +
 arch/powerpc/platforms/44x/acpx1.c  |1 +
 arch/powerpc/sysdev/Makefile|2 -
 arch/powerpc/sysdev/lsi_acp_wrappers.c  |  132 --
 arch/powerpc/sysdev/lsi_pci.c   |   19 +-
 arch/powerpc/sysdev/mpic.c  |  119 +-
 drivers/i2c/busses/i2c-axxia.c  |  193 +-
 drivers/misc/Kconfig|2 +-
 drivers/misc/lsi-mtc.c  |9 +-
 drivers/misc/lsi-ncr.c  |  334 +--
 drivers/misc/lsi-smmon.c|  374 ++--
 drivers/net/ethernet/lsi/lsi_acp_net.c  |9 +-
 drivers/net/rionet.c|  135 +-
 drivers/rapidio/Kconfig |   85 +
 drivers/rapidio/Makefile|4 +-
 

[linux-yocto] [PATCH 04/28] arm: rapidio updates

2014-05-02 Thread Charlie Paul
From: Paul Butler paul.but...@windriver.com

- Added the RapidIO management options
- Added the rio device to the axm55xx
- Created the rio architecture support for arm
- Added a file to support the RAPIDIO Bus registration

Signed-off-by: Paul Butler paul.but...@windriver.com
---
 arch/arm/Kconfig |   18 +
 arch/arm/boot/dts/axm55xx.dts|   16 
 arch/arm/include/asm/axxia-rio.h |   82 ++
 arch/arm/include/asm/rio.h   |   33 +++
 arch/arm/mach-axxia/Makefile |1 +
 arch/arm/mach-axxia/clock.c  |5 +++
 arch/arm/mach-axxia/rapidio.c|   44 
 7 files changed, 199 insertions(+)
 create mode 100644 arch/arm/include/asm/axxia-rio.h
 create mode 100644 arch/arm/include/asm/rio.h
 create mode 100644 arch/arm/mach-axxia/rapidio.c

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0b98e83..370eca8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -344,6 +344,7 @@ config ARCH_AXXIA
select PCI
select PCI_DOMAINS if PCI
select ARCH_SUPPORTS_MSI if PCI
+select HAS_RAPIDIO if (!PREEMPT_RTB)
help
  This enables support for the LSI Axxia boards.
 
@@ -2358,3 +2359,20 @@ source security/Kconfig
 source crypto/Kconfig
 
 source lib/Kconfig
+
+menu RapidIO management options
+
+config HAS_RAPIDIO
+   bool
+   default n
+
+config RAPIDIO
+   bool RapidIO support
+   depends on HAS_RAPIDIO || PCI
+   help
+ If you say Y here, the kernel will include drivers and
+ infrastructure code to support RapidIO interconnect devices.
+
+source drivers/rapidio/Kconfig
+
+endmenu
diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index aac791d..7ecb177 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -35,6 +35,7 @@
serial0   = axxia_serial0;
timer = axxia_timers;
ethernet0 = axxia_femac0;
+   rapidio0  = rio0;
};
 
cpus {
@@ -423,6 +424,21 @@
reg = 0x20 0x10098000 0 0x3000;
interrupts = 0 45 4;
};
+
+rio0: rapidio {
+index = 0;
+status = disabled;
+#address-cells = 2;
+#size-cells = 2;
+compatible = axxia,rapidio-delta;
+device_type = rapidio;
+reg = 0x0020 0x20142000 0x0 0x1000; /* SRIO Conf 0 region */
+ranges = 0x0 0x0 0x0031 0x 0x0 0x4000;
+linkdown-reset = 0x0200 0x100 0x0020 0x1000 0x0 
0x1;
+interrupts = 0 89 4;
+outb-dmes = 2 0x0003 1 0x;
+};
+
 };
 
 /*
diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h
new file mode 100644
index 000..f244c85
--- /dev/null
+++ b/arch/arm/include/asm/axxia-rio.h
@@ -0,0 +1,82 @@
+/*
+ * RapidIO support for LSI Axxia parts
+ *
+ */
+#ifndef __ASM_AXXIA_RIO_H__
+#define __ASM_AXXIA_RIO_H__
+
+/* Constants, Macros, etc. */
+
+#define AXXIA_RIO_SMALL_SYSTEM
+
+#define AXXIA_RIO_SYSMEM_BARRIER()
+
+#define AXXIA_RIO_DISABLE_MACHINE_CHECK()
+#define AXXIA_RIO_ENABLE_MACHINE_CHECK()
+#define AXXIA_RIO_IF_MACHINE_CHECK(mcsr)   (mcsr = 0)
+
+#define IN_SRIO8(a, v, ec) {v = inb((long unsigned int)a); ec = 0;}
+#define IN_SRIO16(a, v, ec){v = inw((long unsigned int)a); ec = 0;}
+#define IN_SRIO32(a, v, ec){v = inl((long unsigned int)a); ec = 0;}
+
+#define OUT_SRIO8(a, v)outb_p(v, (long unsigned int) a)
+#define OUT_SRIO16(a, v)   outw_p(v, (long unsigned int) a)
+#define OUT_SRIO32(a, v)   outl_p(v, (long unsigned int) a)
+
+#define _SWAP32(x) x)  0x00FF)  24) | (((x)  0xFF00)   
8) | (((x)  0x00FF)  8) | (((x)  0xFF00)  24))
+#define CORRECT_GRIO(a)_SWAP32(a)
+#define CORRECT_RAB(a) (a)
+
+/* ACP RIO board-specific stuff */
+
+extern int axxia_rio_apio_enable(struct rio_mport *mport, u32 mask, u32 bits);
+extern int axxia_rio_apio_disable(struct rio_mport *mport);
+extern int axxia_rio_rpio_enable(struct rio_mport *mport, u32 mask, u32 bits);
+extern int axxia_rio_rpio_disable(struct rio_mport *mport);
+
+extern int axxia_rapidio_board_init(void);
+
+
+/*/
+/* ACP RIO operational stuff */
+/*/
+
+/**
+ * CNTLZW - Count leading zeros word
+ * @val: value from which count number of leading zeros
+ *
+ * Return: number of zeros
+ */
+static inline u32 CNTLZW(u32 val)
+{
+   int n = 0;
+   if (val == 0)
+   return 32;
+   if ((val  0x) == 0)
+   n += 16; val = val  16;
+   /*        
+   // 16 bits from left are zero! so we omit 16 left bits */
+   if ((val  0xFF00) == 0)
+   n = n + 8; val = val  8;
+ 

[linux-yocto] [PATCH 06/28] include: rapidio updates

2014-05-02 Thread Charlie Paul
From: Paul Butler paul.but...@windriver.com

This patch adds the register definitions,
support for PW messages, destination IDs, direct IO and
driver support.

Signed-off-by: Paul Butler paul.but...@windriver.com
---
 include/asm-generic/vmlinux.lds.h |   10 ++
 include/linux/rio.h   |  231 ++---
 include/linux/rio_dio.h   |   67 +++
 include/linux/rio_drv.h   |  202 +---
 include/linux/rio_ids.h   |7 ++
 include/linux/rio_regs.h  |   26 +
 include/linux/riopw.h |   30 +
 7 files changed, 490 insertions(+), 83 deletions(-)
 create mode 100644 include/linux/rio_dio.h
 create mode 100644 include/linux/riopw.h

diff --git a/include/asm-generic/vmlinux.lds.h 
b/include/asm-generic/vmlinux.lds.h
index 5d2ca6f..290711d 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -274,6 +274,16 @@
}   \
\
/* RapidIO route ops */ \
+   .rio_dev_fixup : AT(ADDR(.rio_dev_fixup) - LOAD_OFFSET) {   \
+   VMLINUX_SYMBOL(__start_rio_dev_fixup_early) = .;\
+   *(.rio_dev_fixup_early) \
+   VMLINUX_SYMBOL(__end_rio_dev_fixup_early) = .;  \
+   VMLINUX_SYMBOL(__start_rio_dev_fixup_enable) = .;   \
+   *(.rio_dev_fixup_enable)\
+   VMLINUX_SYMBOL(__end_rio_dev_fixup_enable) = .; \
+   }   \
+   \
+   /* RapidIO route ops */ \
.rio_ops: AT(ADDR(.rio_ops) - LOAD_OFFSET) {\
VMLINUX_SYMBOL(__start_rio_switch_ops) = .; \
*(.rio_switch_ops)  \
diff --git a/include/linux/rio.h b/include/linux/rio.h
index 4d50611..ef300e2 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -20,6 +20,8 @@
 #include linux/errno.h
 #include linux/device.h
 #include linux/rio_regs.h
+#include linux/radix-tree.h
+#include asm/rio.h
 
 #define RIO_NO_HOPCOUNT-1
 #define RIO_INVALID_DESTID 0x
@@ -37,10 +39,14 @@
   entry is invalid (no route
   exists for the device ID) */
 
+#define RIO_INVALID_ROUTE_WEIGHT   0xff  /* Indicates that a route weight
+   entry is invalid (no route
+   exists for the device ID) */
+
 #define RIO_MAX_ROUTE_ENTRIES(size)(size ? (1  16) : (1  8))
 #define RIO_ANY_DESTID(size)   (size ? 0x : 0xff)
 
-#define RIO_MAX_MBOX   4
+#define RIO_MAX_MBOX   8
 #define RIO_MAX_MSG_SIZE   0x1000
 
 /*
@@ -77,6 +83,9 @@
 #define RIO_CTAG_RESRVD0xfffe /* Reserved */
 #define RIO_CTAG_UDEVID0x0001 /* Unique device identifier */
 
+#define RIO_DEVICE_INSERTION1
+#define RIO_DEVICE_EXTRACTION   2
+
 extern struct bus_type rio_bus_type;
 extern struct device rio_bus;
 extern struct list_head rio_devices;   /* list of all devices */
@@ -85,6 +94,15 @@ struct rio_mport;
 struct rio_dev;
 union rio_pw_msg;
 
+struct rio_switch_port {
+   struct rio_dev *rdev;
+#ifdef CONFIG_RAPIDIO_DYNAMIC_ROUTES
+   u8 *route_weights_table;
+#endif
+};
+
+#define NEW_STYLE 1
+
 /**
  * struct rio_switch - RIO switch info
  * @node: Node in global list of switches
@@ -104,7 +122,12 @@ union rio_pw_msg;
 struct rio_switch {
struct list_head node;
u16 switchid;
+#ifdef OLD_STYLE
u8 *route_table;
+#else
+   u32 port_init;
+   int update_lut;
+#endif
u32 port_ok;
int (*add_entry) (struct rio_mport *mport, u16 destid, u8 hopcount,
  u16 table, u16 route_destid, u8 route_port);
@@ -119,7 +142,9 @@ struct rio_switch {
int (*em_init) (struct rio_dev *dev);
int (*em_handle) (struct rio_dev *dev, u8 swport);
int (*sw_sysfs) (struct rio_dev *dev, int create);
-   struct rio_dev *nextdev[0];
+#ifdef OLD_STYLE
+   struct rio_switch_port port[0];
+#endif
 };
 
 /**
@@ -151,10 +176,19 @@ struct rio_switch {
  * @prev: Previous RIO device connected to the current one
  * @rswitch: struct rio_switch (if valid for this device)
  */
+#ifdef NEW_STYLE
+struct rio_dyn {
+   int prev_port;
+   u16 prev_destid;
+   u32 swpinfo;
+};
+#endif
+
 struct rio_dev {
struct list_head global_list;   /* node in list of all RIO devices */
struct list_head net_list;  /* node in per net list */
- 

[linux-yocto] [PATCH 05/28] powerpc: rapidio updates

2014-05-02 Thread Charlie Paul
From: Paul Butler paul.but...@windriver.com

Add the rapidio device to the powerpc tree
Add the rapidio support for the powerpc 44x lsi board

Signed-off-by: Paul Butler paul.but...@windriver.com
---
 arch/powerpc/boot/dts/lsi_acp342x.dts |  317 +
 arch/powerpc/boot/dts/lsi_acp344x.dts |  355 +
 arch/powerpc/include/asm/axxia-rio.h  |  103 ++
 arch/powerpc/include/asm/rio.h|   41 
 arch/powerpc/platforms/44x/Makefile   |3 +-
 arch/powerpc/platforms/44x/acprio.c   |   65 ++
 arch/powerpc/platforms/44x/acpx1.c|1 +
 7 files changed, 884 insertions(+), 1 deletion(-)
 create mode 100644 arch/powerpc/boot/dts/lsi_acp342x.dts
 create mode 100644 arch/powerpc/boot/dts/lsi_acp344x.dts
 create mode 100644 arch/powerpc/include/asm/axxia-rio.h
 create mode 100644 arch/powerpc/platforms/44x/acprio.c

diff --git a/arch/powerpc/boot/dts/lsi_acp342x.dts 
b/arch/powerpc/boot/dts/lsi_acp342x.dts
new file mode 100644
index 000..da6066e
--- /dev/null
+++ b/arch/powerpc/boot/dts/lsi_acp342x.dts
@@ -0,0 +1,317 @@
+/*
+ * Device Tree Source for IBM Embedded PPC 476 Platform
+ *
+ * Copyright 2009 Torez Smith, IBM Corporation.
+ *
+ * Based on earlier code:
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer jwbo...@linux.vnet.ibm.com, David Gibson d...@au1.ibm.com
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed as is without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x 0x0040;
+
+/ {
+   #address-cells = 2;
+   #size-cells = 1;
+   model = ibm,acpx1-4xx;
+   compatible = ibm,acpx1-4xx,ibm,47x-AMP;
+   dcr-parent = {/cpus/cpu@0};
+
+   aliases {
+   serial0 = UART0;
+   serial1 = UART1;
+   rapidio0 = rio0;
+   ethernet0 = FEMAC;
+   };
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   cpu@0 {
+   device_type = cpu;
+   model = PowerPC,4xx; // real CPU changed in sim
+   reg = 0;
+clock-frequency = 0x5f5e1000;
+timebase-frequency = 0x5f5e1000;
+   i-cache-line-size = 32;
+   d-cache-line-size = 32;
+   i-cache-size = 32768;
+   d-cache-size = 32768;
+   dcr-controller;
+   dcr-access-method = native;
+   status = ok;
+   reset-type = 3; // 1=core, 2=chip, 3=system (default)
+   };
+   cpu@1 {
+   device_type = cpu;
+   model = PowerPC,4xx; // real CPU changed in sim
+   reg = 1;
+clock-frequency = 0x5f5e1000;
+timebase-frequency = 0x5f5e1000;
+   i-cache-line-size = 32;
+   d-cache-line-size = 32;
+   i-cache-size = 32768;
+   d-cache-size = 32768;
+   dcr-controller;
+   dcr-access-method = native;
+   status = disabled;
+   enable-method = spin-table;
+   cpu-release-addr = 0 0x2040;
+   reset-type = 3; // 1=core, 2=chip, 3=system (default)
+   };
+   };
+
+memory@0 {
+device_type = memory;
+reg = 0x 0x 0x1000;
+};
+
+memory@8000 {
+device_type = memory;
+reg = 0x 0x 0x;
+};
+
+   MPIC: interrupt-controller {
+   compatible = chrp,open-pic;
+   interrupt-controller;
+   dcr-reg = 0xffc0 0x0003;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   pic-no-reset;
+   };
+
+   plb {
+   /* Could be PLB6, doesn't matter */
+   compatible = ibm,plb-4xx, ibm,plb4;
+   #address-cells = 2;
+   #size-cells = 1;
+   ranges;
+   clock-frequency = 0; // Filled in by zImage
+
+   POB0: opb {
+   compatible = ibm,opb-4xx, ibm,opb;
+   #address-cells = 1;
+   #size-cells = 1;
+   /* Wish there was a nicer way of specifying a full 
32-bit
+  range */
+   ranges = 0x 0x0020 0x 0x8000
+ 0x8000 0x0020 0x8000 0x8000;
+   clock-frequency = 0; // Filled in by zImage
+   UART0: serial@00404000 {
+

[linux-yocto] [PATCH 08/28] axxia: Fixed earlyprintk

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

Add static mapping of the UART registers for CONFIG_DEBUG_LL. Also depends on
commit 2f409a to fix a bug with LPAE and static mappings.

Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/Kconfig.debug |9 +
 arch/arm/mach-axxia/axxia.c|   13 
 arch/arm/mach-axxia/include/mach/debug-macro.S |   16 ---
 arch/arm/mach-axxia/include/mach/hardware.h|   25 +++-
 4 files changed, 50 insertions(+), 13 deletions(-)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 85348a0..762903c 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -89,6 +89,15 @@ choice
bool Kernel low-level debugging on 9263 and 9g45
depends on HAVE_AT91_DBGU1
 
+   config AXXIA_DEBUG_LL_UART0
+   bool Kernel low-level debugging via UART0
+   depends on ARCH_AXXIA
+   help
+   This enables the low-level debugging via the UART0
+   and should be used
+   with the
+   AXXIA hardware
+
config DEBUG_CLPS711X_UART1
bool Kernel low-level debugging messages via UART1
depends on ARCH_CLPS711X
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index df63dbd..7b725ef 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -46,6 +46,7 @@
 #include asm/mach/time.h
 #include asm/hardware/cache-l2x0.h
 #include asm/hardware/gic.h
+#include mach/hardware.h
 #include mach/timers.h
 #include mach/axxia-gic.h
 #include axxia.h
@@ -62,8 +63,20 @@ static const char *axxia_dt_match[] __initconst = {
 
 static void __iomem *ssp_base;
 
+static struct map_desc axxia_static_mappings[] __initdata = {
+#ifdef CONFIG_DEBUG_LL
+   {
+   .virtual=  AXXIA_DEBUG_UART_VIRT,
+   .pfn= __phys_to_pfn(AXXIA_DEBUG_UART_PHYS),
+   .length = SZ_4K,
+   .type   = MT_DEVICE
+   },
+#endif
+};
+
 void __init axxia_dt_map_io(void)
 {
+   iotable_init(axxia_static_mappings, ARRAY_SIZE(axxia_static_mappings));
 }
 
 void __init axxia_dt_init_early(void)
diff --git a/arch/arm/mach-axxia/include/mach/debug-macro.S 
b/arch/arm/mach-axxia/include/mach/debug-macro.S
index 83d6670..3a3755b 100644
--- a/arch/arm/mach-axxia/include/mach/debug-macro.S
+++ b/arch/arm/mach-axxia/include/mach/debug-macro.S
@@ -10,6 +10,8 @@
  * published by the Free Software Foundation.
  */
 
+#include mach/hardware.h
+
 /*
  * -- NOTE --
  *
@@ -19,19 +21,9 @@
 #error Axxia Peripherals Are Only Accessible Using the LPAE!
 #endif
 
-#define UART0_PHYSICAL_ADDRESS 0x00201008ULL
-#define UART1_PHYSICAL_ADDRESS 0x002010081000ULL
-#define UART2_PHYSICAL_ADDRESS 0x002010082000ULL
-#define UART3_PHYSICAL_ADDRESS 0x002010083000ULL
-
-#define UART0_VIRTUAL_ADDRESS 0xf008
-#define UART1_VIRTUAL_ADDRESS 0xf0081000
-#define UART2_VIRTUAL_ADDRESS 0xf0082000
-#define UART3_VIRTUAL_ADDRESS 0xf0083000
-
.macro  addruart, rp, rv, tmp
-   ldr \rp, =0x1008
-   ldr \rv, =0xf008
+   ldr \rp, =(AXXIA_DEBUG_UART_PHYS  0x)
+   ldr \rv, =AXXIA_DEBUG_UART_VIRT
.endm
 
 #include asm/hardware/debug-pl01x.S
diff --git a/arch/arm/mach-axxia/include/mach/hardware.h 
b/arch/arm/mach-axxia/include/mach/hardware.h
index 40a8c17..ce3790f 100644
--- a/arch/arm/mach-axxia/include/mach/hardware.h
+++ b/arch/arm/mach-axxia/include/mach/hardware.h
@@ -1 +1,24 @@
-/* empty */
+/*
+ * arch/arm/mach-axxia/include/mach/hardware.h
+ *
+ * Copyright (c) 2013 LSI Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+#ifndef __MACH_HARDWARE_H
+#define __MACH_HARDWARE_H
+
+#define AXXIA_UART0_PHYS   0x201008
+#define AXXIA_UART1_PHYS   0x2010081000
+#define AXXIA_UART2_PHYS   0x2010082000
+#define AXXIA_UART3_PHYS   0x2010083000
+
+#ifdef CONFIG_AXXIA_DEBUG_LL_UART0
+#define AXXIA_DEBUG_UART_VIRT  0xf008
+#define AXXIA_DEBUG_UART_PHYS  AXXIA_UART0_PHYS
+#endif
+
+#endif
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 09/28] axxia: Define arch_is_coherent()

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

By defining arch_is_coherent() == 1, we can avoid unnecessary cache maintenance
operations and the dma_alloc_coherent() will return normal memory.

Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/Kconfig  |1 +
 arch/arm/mach-axxia/include/mach/memory.h |   19 +++
 drivers/usb/host/ehci-ci13612.c   |   12 ++--
 3 files changed, 26 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mach-axxia/include/mach/memory.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 370eca8..f763ad1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -340,6 +340,7 @@ config ARCH_AXXIA
select ARM_TIMER_SP804
select ICST
select NEED_MACH_IO_H
+   select NEED_MACH_MEMORY_H
select ZONE_DMA
select PCI
select PCI_DOMAINS if PCI
diff --git a/arch/arm/mach-axxia/include/mach/memory.h 
b/arch/arm/mach-axxia/include/mach/memory.h
new file mode 100644
index 000..9df2aaf
--- /dev/null
+++ b/arch/arm/mach-axxia/include/mach/memory.h
@@ -0,0 +1,19 @@
+/*
+ * arch/arm/mach-axxia/include/mach/memory.h
+ *
+ * Copyright (c) 2013 LSI Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#ifndef __ASM_ARCH_MEMORY_H
+#define __ASM_ARCH_MEMORY_H
+
+#include mach/hardware.h
+
+#define arch_is_coherent() 1
+
+#endif
diff --git a/drivers/usb/host/ehci-ci13612.c b/drivers/usb/host/ehci-ci13612.c
index 2a30dab..b995a32 100644
--- a/drivers/usb/host/ehci-ci13612.c
+++ b/drivers/usb/host/ehci-ci13612.c
@@ -138,8 +138,7 @@ ci13612_fixup_usbcmd_rs(struct ehci_hcd *ehci)
port_status = ehci_readl(ehci, ehci-regs-port_status[0]);
pr_info(ehci-ci13612: port_status = 0x%x\n, port_status);
if (port_status  0x100) {
-   pr_err(ehci-ci13612: USB port is in reset status, 
-  not able to change HC status to run\n);
+   pr_err(ehci-ci13612: USB port is in reset status, not able to 
change HC status to run\n);
return -EFAULT;
}
return 0;
@@ -171,7 +170,7 @@ ci13612_fixup_txpburst(struct ehci_hcd *ehci)
ehci_writel(ehci, burst_size, ehci-regs-reserved[1]);
 }
 #else
-#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while(0)
+#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while (0)
 #endif
 
 static int ci13612_ehci_run(struct usb_hcd *hcd)
@@ -260,7 +259,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev)
pdev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
pdev-dev.dma_mask = pdev-dev.coherent_dma_mask;
 
-   hcd = usb_create_hcd(ci13612_hc_driver, pdev-dev, 
dev_name(pdev-dev));
+   hcd = usb_create_hcd(ci13612_hc_driver, pdev-dev,
+   dev_name(pdev-dev));
if (!hcd) {
retval = -ENOMEM;
goto fail_create_hcd;
@@ -285,8 +285,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev)
/* Set address bits [39:32] to zero */
writel(0x0, gpreg_base + 0x8);
 #ifndef CONFIG_LSI_USB_SW_WORKAROUND
-   /* hprot pass-through (let the controller drive hprot[0:3] */
-   writel(0x100, gpreg_base + 0x74);
+   /* hprot cachable and bufferable */
+   writel(0xc, gpreg_base + 0x74);
 #endif
iounmap(gpreg_base);
}
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 12/28] ARM: LPAE: use phys_addr_t in alloc_init_pud()

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

  commit 20d6956d8cd2452cec0889ff040f18afc03c2e6b upstream

  This patch fixes the alloc_init_pud() function to use phys_addr_t instead of
  unsigned long when passing in the phys argument.

  This is an extension to commit 97092e0 (ARM:
  pgtable: use phys_addr_t for physical addresses), which applied similar 
changes
  elsewhere in the ARM memory management code.

  Signed-off-by: Vitaly Andrianov vita...@ti.com
  Signed-off-by: Cyril Chemparathy cy...@ti.com
  Acked-by: Nicolas Pitre n...@linaro.org
  Acked-by: Catalin Marinas catalin.mari...@arm.com
  Tested-by: Santosh Shilimkar santosh.shilim...@ti.com
  Tested-by: Subash Patel subash...@samsung.com
  Signed-off-by: Will Deacon will.dea...@arm.comarm: mmu: Fix truncated 
40-bit physaddr (LPAE)
  Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/mm/mmu.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index f117e1f..0acc475 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -628,7 +628,7 @@ static void __init alloc_init_section(pud_t *pud, unsigned 
long addr,
 }
 
 static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr,
-   unsigned long end, unsigned long phys, const struct mem_type *type)
+   unsigned long end, phys_addr_t phys, const struct mem_type *type)
 {
pud_t *pud = pud_offset(pgd, addr);
unsigned long next;
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 17/28] arch/arm/mach-axxia: Clear MTC Errors During Initialization

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

The MTC status registers are not cleared by a reset.  So, clear them
during driver initialization.

Signed-off-by: John Jacques john.jacq...@lsi.com
---
 drivers/misc/lsi-mtc.c |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/lsi-mtc.c b/drivers/misc/lsi-mtc.c
index ebbdac8..8e1ae77 100644
--- a/drivers/misc/lsi-mtc.c
+++ b/drivers/misc/lsi-mtc.c
@@ -2731,6 +2731,7 @@ mtc_dev_ioctl(struct file *filp, unsigned int cmd, 
unsigned long arg)
{
struct ncp_axis_mtc_MTC_CONFIG0_REG_ADDR_r_t cfg0 = { 0 
};
int start_stop;
+
if (copy_from_user
((void *)start_stop, (void *)arg, sizeof(int))) {
printk(KERN_DEBUG MTC Error ioctl\n);
@@ -2740,6 +2741,10 @@ mtc_dev_ioctl(struct file *filp, unsigned int cmd, 
unsigned long arg)
if ((start_stop != 0)  (start_stop != 1))
return -EINVAL;
 
+   /* clear interrupt status before hit start */
+   if (start_stop == 1)
+   dev-regs-int_status = 0x7f;
+
cfg0 =
*((struct ncp_axis_mtc_MTC_CONFIG0_REG_ADDR_r_t *)
  (dev-regs-config0));
@@ -3080,6 +3085,8 @@ static long _mtc_config(struct mtc_device *dev, struct 
lsi_mtc_cfg_t *pMTCCfg)
   dev-regs-config1, dev-regs-execute);
 
 #endif
-   /* test */
+   /* clear ecc interrupt status */
+   dev-regs-ecc_int_status = 0xf;
+
return 0;
 }
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 19/28] arm/mach-axxia: Updated PCIe driver to set PCIe

2014-05-02 Thread Charlie Paul
From: Paul Butler paul.but...@windriver.com

 BASE_ADDR1 register

Updated PCIe driver to set PCIe BASE_ADDR1 register to 0x0 without
which PCIe inbound access wasn't working and we were seeing several
suprious PEI interrupts including BAR mismatch interrupt.

Signed-off-by: SangeethaRao sangeetha@lsi.com
Signed-off-by: Paul Butler paul.but...@windriver.com
---
 arch/arm/mach-axxia/pci.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-axxia/pci.c b/arch/arm/mach-axxia/pci.c
index 2600892..49565e8 100644
--- a/arch/arm/mach-axxia/pci.c
+++ b/arch/arm/mach-axxia/pci.c
@@ -667,20 +667,23 @@ static int axxia_pcie_setup(int portno, struct 
pci_sys_data *sys)
 
/* Configure the inbound window size */
inbound_size = (u32) resource_size(port-inbound);
-   writel(inbound_size, port-regs + PCIE_RC_BAR0_SIZE);
+   writel(~(inbound_size-1), port-regs + PCIE_RC_BAR0_SIZE);
 
/* Verify BAR0 size */
{
u32 bar0_size;
writel(~0, port-regs + PCI_BASE_ADDRESS_0);
bar0_size = readl(port-regs + PCI_BASE_ADDRESS_0);
-   if ((bar0_size  ~0xf) != inbound_size)
+   if ((bar0_size  ~0xf) != ~(inbound_size-1))
pr_err(PCIE%d: Config BAR0 failed\n, port-index);
}
 
/* Set the BASE0 address to start of PCIe base */
writel(port-pci_bar, port-regs + PCI_BASE_ADDRESS_0);
 
+   /* Set the BASE1 address to 0x0 */
+   writel(0x0, port-regs + PCI_BASE_ADDRESS_1);
+
/* Setup TPAGE registers for inbound mapping
 *
 * We set the MSB of each TPAGE to select 128-bit AXI access. For the
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 10/28] LSI AXM55xx: Enable multi-cluster wfe/sev

2014-05-02 Thread Charlie Paul
From: David Mercado david.merc...@windriver.com

By default, the system does not enable the use of ARM wfe/sev instructions
across clusters, which breaks things like arch_spin_lock. This patch enables
this feature.

LSI AXM55xx: Disable use of wfe/sev in arch_spin_lock

By default, the system does not enable the use of ARM wfe/sev instructions
across clusters, which breaks things like arch_spin_lock. The previous
solution to enable wfe/sev to work across clusters still resulted in CPU
stalls. This patch instead removes the use of wfe/sev in arch/arm/include/
asm/spinlock.h altogether.

Signed-off-by: David Mercado david.merc...@windriver.com
---
 arch/arm/include/asm/spinlock.h |4 
 arch/arm/mach-axxia/axxia.c |1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/include/asm/spinlock.h b/arch/arm/include/asm/spinlock.h
index 65fa3c8..022ef90 100644
--- a/arch/arm/include/asm/spinlock.h
+++ b/arch/arm/include/asm/spinlock.h
@@ -37,6 +37,10 @@
\
nop.w \
 )
+#elif CONFIG_ARCH_AXXIA || CONFIG_ARCH_AXXIA_SIM
+/* Disable use of wfe/sev in Axxia. */
+#define SEV
+#define WFE(cond)
 #else
 #define SEVALT_SMP(sev, nop)
 #define WFE(cond)  ALT_SMP(wfe cond, nop)
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 7b725ef..d87bb61 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -253,6 +253,7 @@ l3_set_pstate(void __iomem *l3ctrl, unsigned int req, 
unsigned int act)
 void __init axxia_dt_init(void)
 {
void __iomem *l3ctrl;
+   void __iomem *apb2ser3_base;
int rc;
 
/* Enable L3-cache */
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 13/28] ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

  commit 36418c516b31bff4ff949c7c618430a1a514debe upstream

  With !HIGHMEM, sanity_check_meminfo checks for banks that completely or
  partially overlap the vmalloc region. The test for partial overlap checks
  __va(bank-start + bank-size)  vmalloc_min. This is not appropriate if
  there is a non-linear translation between virtual and physical addresses,
  as bank-start + bank-size is actually in the bank following the one being
  interrogated.

  In most cases, even when using SPARSEMEM, this is not problematic as the
  subsequent bank will start at a higher va than the one in question. However
  if the physical to virtual address conversion is not monotonic increasing,
  the incorrect test could result in a bank not being truncated when it
  should be.

  This patch ensures we perform the va-pa conversion on memory from the
  bank we are interested in, not the following one.

  Reported-by: ??? (Steve) zhanzhe...@gmail.com
  Signed-off-by: Jonathan Austin jonathan.aus...@arm.com
  Acked-by: Nicolas Pitre n...@linaro.org
  Signed-off-by: Russell King rmk+ker...@arm.linux.org.ukarm/mmu:
   Fix detection of vmalloc area overlap
  Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/mm/mmu.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 0acc475..571102e 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -967,8 +967,8 @@ void __init sanity_check_meminfo(void)
 * Check whether this memory bank would partially overlap
 * the vmalloc area.
 */
-   if (__va(bank-start + bank-size)  vmalloc_min ||
-   __va(bank-start + bank-size)  __va(bank-start)) {
+   if (__va(bank-start + bank-size - 1) = vmalloc_min ||
+   __va(bank-start + bank-size - 1) = __va(bank-start)) {
unsigned long newsize = vmalloc_min - __va(bank-start);
printk(KERN_NOTICE Truncating RAM at %.8llx-%.8llx 
   to -%.8llx (vmalloc region overlap).\n,
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 16/28] arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500 emulation

2014-05-02 Thread Charlie Paul
From: SangeethaRao sangeetha@lsi.com

Signed-off-by: SangeethaRao sangeetha@lsi.com
---
 arch/powerpc/sysdev/lsi_pci.c |   19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/sysdev/lsi_pci.c b/arch/powerpc/sysdev/lsi_pci.c
index a25d396..75bdf53 100644
--- a/arch/powerpc/sysdev/lsi_pci.c
+++ b/arch/powerpc/sysdev/lsi_pci.c
@@ -20,6 +20,7 @@
 #include mm/mmu_decl.h
 
 #include ppc4xx_pci.h
+#include ../../../drivers/misc/lsi-ncr.h
 
 #include linux/interrupt.h
 
@@ -70,6 +71,7 @@ fixup_acp_pci_bridge(struct pci_dev *dev)
 
 DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5101, fixup_acp_pci_bridge);
 DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5108, fixup_acp_pci_bridge);
+DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5102, fixup_acp_pci_bridge);
 
 static int __init acp_parse_dma_ranges(struct pci_controller *hose,
  void __iomem *reg,
@@ -954,6 +956,7 @@ acp_pciex_port_setup_hose(struct pciex_port *port)
u32 pci_status;
u32 link_state;
u32 pci_config;
+   u32 version;
 
/* Check if primary bridge */
if (of_get_property(port-node, primary, NULL))
@@ -1060,6 +1063,17 @@ acp_pciex_port_setup_hose(struct pciex_port *port)
}
}
 
+   /* get the device version */
+   if (0 != ncr_read(NCP_REGION_ID(0x16, 0xff), 0x0, 4, version)) {
+   printk(KERN_ERR Unable to detect ACP revision!\n);
+   goto fail;
+   }
+
+   port-acpChipType = (version  0xff);
+   printk(KERN_INFO Using PEI register set for ACP chipType %d\n,
+   port-acpChipType);
+
+
/*
 * Set bus numbers on our root port
*/
@@ -1171,11 +1185,6 @@ static void __init probe_acp_pciex_bridge(struct 
device_node *np)
return;
}
 
-
-   port-acpChipType = 0x2;
-   printk(KERN_INFO Using PEI register set for ACP chipType %d\n,
-   port-acpChipType);
-
/* Check for the PLX work-around. */
field = of_get_property(np, plx, NULL);
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 20/28] LSI AXM55XX: Add PMU support

2014-05-02 Thread Charlie Paul
From: David Mercado david.merc...@windriver.com

This patch adds PMU support to the Axxia AXM55xx platform. Note that
on this platform, all PMU IRQ lines are OR'ed together into a single
IRQ, and therefore, this implementation uses a rotating IRQ affinity
scheme to deal with it.

Signed-off-by: David Mercado david.merc...@windriver.com
---
 arch/arm/kernel/perf_event_v7.c |3 +-
 arch/arm/mach-axxia/axxia-gic.c |   25 --
 arch/arm/mach-axxia/axxia.c |   55 +++
 arch/arm/mach-axxia/include/mach/irqs.h |1 +
 4 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 7deaa7f..ae7d9d8 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -95,6 +95,7 @@ enum armv7_a5_perf_types {
 
 /* ARMv7 Cortex-A15 specific event types */
 enum armv7_a15_perf_types {
+   ARMV7_A15_PERFCTR_CPU_CYCLES= 0x11,
ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_READ = 0x40,
ARMV7_A15_PERFCTR_L1_DCACHE_ACCESS_WRITE= 0x41,
ARMV7_A15_PERFCTR_L1_DCACHE_REFILL_READ = 0x42,
@@ -489,7 +490,7 @@ static const unsigned 
armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
  * Cortex-A15 HW events mapping
  */
 static const unsigned armv7_a15_perf_map[PERF_COUNT_HW_MAX] = {
-   [PERF_COUNT_HW_CPU_CYCLES]  = ARMV7_PERFCTR_CPU_CYCLES,
+   [PERF_COUNT_HW_CPU_CYCLES]  = ARMV7_A15_PERFCTR_CPU_CYCLES,
[PERF_COUNT_HW_INSTRUCTIONS]= ARMV7_PERFCTR_INSTR_EXECUTED,
[PERF_COUNT_HW_CACHE_REFERENCES]= 
ARMV7_PERFCTR_L1_DCACHE_ACCESS,
[PERF_COUNT_HW_CACHE_MISSES]= 
ARMV7_PERFCTR_L1_DCACHE_REFILL,
diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index e5ad304..8a8e8eb 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -283,6 +283,10 @@ static void gic_mask_irq(struct irq_data *d)
if ((irqid = IPI0_CPU0)  (irqid  MAX_AXM_IPI_NUM))
return;
 
+   /* Don't mess with the PMU IRQ either. */
+   if (irqid == IRQ_PMU)
+   return;
+
/* Deal with PPI interrupts directly. */
if ((irqid  16)  (irqid  32)) {
_gic_mask_irq(d);
@@ -327,6 +331,10 @@ static void gic_unmask_irq(struct irq_data *d)
if ((irqid = IPI0_CPU0)  (irqid  MAX_AXM_IPI_NUM))
return;
 
+   /* Don't mess with the PMU IRQ either. */
+   if (irqid == IRQ_PMU)
+   return;
+
/* Deal with PPI interrupts directly. */
if ((irqid  15)  (irqid  32)) {
_gic_unmask_irq(d);
@@ -565,8 +573,8 @@ static int gic_set_affinity(struct irq_data *d,
 * different than the prior cluster, remove the IRQ affinity
 * on the old cluster.
 */
-   if ((cpu_logical_map(cpu) / CORES_PER_CLUSTER) !=
-   (irq_cpuid[irqid] / CORES_PER_CLUSTER)) {
+   if ((irqid != IRQ_PMU)  ((cpu_logical_map(cpu) / CORES_PER_CLUSTER) !=
+   (irq_cpuid[irqid] / CORES_PER_CLUSTER))) {
/*
 * If old cpu assignment falls within the same cluster as
 * the cpu we're currently running on, set the IRQ affinity
@@ -775,6 +783,11 @@ static void __cpuinit gic_dist_init(struct gic_chip_data 
*gic)
}
 
/*
+* Set the PMU IRQ to the first cpu in this cluster.
+*/
+   writeb_relaxed(0x01, base + GIC_DIST_TARGET + IRQ_PMU);
+
+   /*
 * Set Axxia IPI interrupts to be edge triggered.
 */
for (i = IPI0_CPU0; i  MAX_AXM_IPI_NUM; i++) {
@@ -797,6 +810,14 @@ static void __cpuinit gic_dist_init(struct gic_chip_data 
*gic)
   base + GIC_DIST_ENABLE_SET + enableoff);
}
 
+   /*
+* Do the initial enable of the PMU IRQ here.
+*/
+   enablemask = 1  (IRQ_PMU % 32);
+   enableoff = (IRQ_PMU / 32) * 4;
+   writel_relaxed(enablemask,
+  base + GIC_DIST_ENABLE_SET + enableoff);
+
writel_relaxed(1, base + GIC_DIST_CTRL);
 }
 
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 0e368a4..1c1f20e 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -46,6 +46,7 @@
 #include asm/mach/time.h
 #include asm/hardware/cache-l2x0.h
 #include asm/hardware/gic.h
+#include asm/pmu.h
 #include mach/hardware.h
 #include mach/timers.h
 #include mach/axxia-gic.h
@@ -178,6 +179,58 @@ static struct of_dev_auxdata axxia_auxdata_lookup[] 
__initdata = {
{}
 };
 
+static struct resource axxia_pmu_resources[] = {
+   [0] = {
+   .start  = IRQ_PMU,
+   .end= IRQ_PMU,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+/*
+ * The PMU IRQ lines of four cores are wired together into a single interrupt.
+ * Bounce the interrupt 

[linux-yocto] [PATCH 11/28] ARM: 7465/1: Handle 4GB memory sizes in device tree and mem=size@start option

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

commit a5d5f7daa744b34477c4a12728bde0a1694a1707 upstream

The memory regions which are passed to arm_add_memory() from
device tree blobs via early_init_dt_add_memory_arch() can
have sizes which are larger than will fit in a 32 bit integer,
so switch to using a phys_addr_t to hold them, to avoid
silently dropping the top 32 bits of the size. Similarly, use
phys_addr_t in early_mem() so that mem=size@start command line
options specifying more than 4GB behave sensibly.

Acked-by: Will Deacon will.dea...@arm.com
Signed-off-by: Peter Maydell peter.mayd...@linaro.org
Signed-off-by: Russell King rmk+ker...@arm.linux.org.ukarm: Allow =4GB RAM 
to be configured
Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/include/asm/setup.h |   14 -
 arch/arm/kernel/setup.c  |   70 +-
 2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 23ebc0c..0fbe56d 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -173,14 +173,14 @@ struct tagtable {
int (*parse)(const struct tag *);
 };
 
-#define tag_member_present(tag,member) \
+#define tag_member_present(tag, member)\
((unsigned long)(((struct tag *)0L)-member + 1)   \
= (tag)-hdr.size * 4)
 
 #define tag_next(t)((struct tag *)((__u32 *)(t) + (t)-hdr.size))
 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type))  2)
 
-#define for_each_tag(t,base)   \
+#define for_each_tag(t, base)  \
for (t = base; t-hdr.size; t = tag_next(t))
 
 #ifdef __KERNEL__
@@ -196,7 +196,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, 
fn }
 
 struct membank {
phys_addr_t start;
-   unsigned long size;
+   phys_addr_t size;
unsigned int highmem;
 };
 
@@ -207,17 +207,17 @@ struct meminfo {
 
 extern struct meminfo meminfo;
 
-#define for_each_bank(iter,mi) \
+#define for_each_bank(iter, mi)\
for (iter = 0; iter  (mi)-nr_banks; iter++)
 
 #define bank_pfn_start(bank)   __phys_to_pfn((bank)-start)
 #define bank_pfn_end(bank) __phys_to_pfn((bank)-start + (bank)-size)
 #define bank_pfn_size(bank)((bank)-size  PAGE_SHIFT)
-#define bank_phys_start(bank)  (bank)-start
+#define bank_phys_start(bank)  ((bank)-start)
 #define bank_phys_end(bank)((bank)-start + (bank)-size)
-#define bank_phys_size(bank)   (bank)-size
+#define bank_phys_size(bank)   ((bank)-size)
 
-extern int arm_add_memory(phys_addr_t start, unsigned long size);
+extern int arm_add_memory(phys_addr_t start, phys_addr_t size);
 extern void early_print(const char *str, ...);
 extern void dump_machine_table(void);
 
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 467155b..ad28e29 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -328,7 +328,7 @@ static void __init cacheid_init(void)
cacheid = CACHEID_VIVT;
}
 
-   printk(CPU: %s data cache, %s instruction cache\n,
+   printk(KERN_INFO CPU: %s data cache, %s instruction cache\n,
cache_is_vivt() ? VIVT :
cache_is_vipt_aliasing() ? VIPT aliasing :
cache_is_vipt_nonaliasing() ? PIPT / VIPT nonaliasing : 
unknown,
@@ -358,7 +358,7 @@ void __init early_print(const char *str, ...)
 #ifdef CONFIG_DEBUG_LL
printascii(buf);
 #endif
-   printk(%s, buf);
+   printk(KERN_INFO %s, buf);
 }
 
 static void __init feat_v6_fixup(void)
@@ -419,13 +419,13 @@ void cpu_init(void)
msrcpsr_c, %7
:
: r (stk),
- PLC (PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
+ PLC(PSR_F_BIT | PSR_I_BIT | IRQ_MODE),
  I (offsetof(struct stack, irq[0])),
- PLC (PSR_F_BIT | PSR_I_BIT | ABT_MODE),
+ PLC(PSR_F_BIT | PSR_I_BIT | ABT_MODE),
  I (offsetof(struct stack, abt[0])),
- PLC (PSR_F_BIT | PSR_I_BIT | UND_MODE),
+ PLC(PSR_F_BIT | PSR_I_BIT | UND_MODE),
  I (offsetof(struct stack, und[0])),
- PLC (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
+ PLC(PSR_F_BIT | PSR_I_BIT | SVC_MODE)
: r14);
 }
 
@@ -454,9 +454,10 @@ static void __init setup_processor(void)
 */
list = lookup_processor_type(read_cpuid_id());
if (!list) {
-   printk(CPU configuration botched (ID %08x), unable 
-  to continue.\n, read_cpuid_id());
-   while (1);
+   printk(KERN_INFO CPU configuration botched (ID %08x), unable 
to continue.\n,
+   read_cpuid_id());
+   while (1)
+   ;
}
 
cpu_name = list-cpu_name;
@@ -475,7 +476,7 @@ static void __init setup_processor(void)

[linux-yocto] [PATCH 22/28] LSI: Fix Device Tree compatible fields

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

The latest boot loader updates the frequency of the clocks in the
device tree; it expects there to be a place to put them.

Fix the device trees for ACP and AXM platforms such that the compatible
field uses the form manufacturer,model.

Signed-off-by: John Jacques john.jacq...@lsi.com
Signed-off-by: David Mercado david.merc...@windriver.com
Signed-off-by: Paul Butler paul.but...@windriver.com
---
 arch/arm/boot/dts/axm55xx.dts   |4 ++--
 arch/arm/boot/dts/axm55xxemu.dts|   21 +++--
 arch/powerpc/boot/dts/ACP344xV2.dts |   20 ++--
 arch/powerpc/boot/dts/acp25xx.dts   |   16 
 arch/powerpc/boot/dts/acp342x.dts   |   14 +++---
 arch/powerpc/boot/dts/acp344x.dts   |   16 
 6 files changed, 54 insertions(+), 37 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index f18550b..f0b325d 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -232,7 +232,7 @@
};
 
axxia_femac0: femac@0x201012 {
-   compatible = acp-femac;
+   compatible = lsi,acp-femac;
device_type = network;
reg = 0x20 0x1012 0 0x1000,
  0x20 0x10121000 0 0x1000,
@@ -314,7 +314,7 @@
 
USB0: usb@004a4000 {
device_type = usb;
-   compatible = acp-usb;
+   compatible = lsi,acp-usb;
enabled = 0;
reg = 0x20 0x1014 0x0 002,
  0x20 0x10094000 0x0 0002000;
diff --git a/arch/arm/boot/dts/axm55xxemu.dts b/arch/arm/boot/dts/axm55xxemu.dts
index 99d7a70..1b22b33 100644
--- a/arch/arm/boot/dts/axm55xxemu.dts
+++ b/arch/arm/boot/dts/axm55xxemu.dts
@@ -1,5 +1,5 @@
 /*
- * arch/arm/boot/dts/axm5500-sim.dts
+ * arch/arm/boot/dts/axm55xxemu.dts
  *
  * Copyright (C) 2012 LSI
  *
@@ -93,6 +93,23 @@
*/
};
 
+   clocks {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   cpu {
+   frequency = 0; /* Filled in by the boot loader. */
+   };
+
+   peripheral {
+   frequency = 0; /* Filled in by the boot loader. */
+   };
+
+   emmc {
+   frequency = 0; /* Filled in by the boot loader. */
+   };
+   };
+
memory@ {
device_type = memory;
reg = 0 0x 0 0x1000;
@@ -153,7 +170,7 @@
};
 
 axxia_femac0: femac@0x201012 {
-compatible = acp-femac;
+compatible = lsi,acp-femac;
device_type = network;
reg = 0x20 0x1012 0 0x1000,
  0x20 0x10121000 0 0x1000,
diff --git a/arch/powerpc/boot/dts/ACP344xV2.dts 
b/arch/powerpc/boot/dts/ACP344xV2.dts
index 1a4040f..72db6b4 100644
--- a/arch/powerpc/boot/dts/ACP344xV2.dts
+++ b/arch/powerpc/boot/dts/ACP344xV2.dts
@@ -135,7 +135,7 @@
 clock-frequency = 0; // Filled in by zImage
 UART0: serial@00404000 {
 device_type = serial;
-compatible = acp-uart0;
+compatible = lsi,acp-uart0;
 enabled = 0;
 reg = 0x00404000 0x1000;
 clock-reg = 0x00408040 0x20;
@@ -146,7 +146,7 @@
 };
 UART1: serial@00405000 {
 device_type = serial;
-compatible = acp-uart1;
+compatible = lsi,acp-uart1;
 enabled = 0;
 reg = 0x00405000 0x1000;
 clock-reg = 0x00408060 0x20;
@@ -157,7 +157,7 @@
 };
 USB0: usb@004a4000 {
 device_type = usb;
-compatible = acp-usb;
+compatible = lsi,acp-usb;
 enabled = 0;
 reg = 0x004a 0x0002
   0x0040c000 0x1000;
@@ -167,7 +167,7 @@
 I2C: i2c@00403000 {
#address-cells = 1;
#size-cells = 0;
-compatible = acp-i2c;
+compatible = lsi,acp-i2c;
 enabled = 0;
reg = 0x403000 0x1000 0x408020 0x1000;
 interrupt-parent = MPIC;
@@ -182,7 +182,7 @@
#address-cells = 1;
#size-cells = 0;
   

[linux-yocto] [PATCH 18/28] drivers/usb: USB driver/dts on PPC was broken.

2014-05-02 Thread Charlie Paul
From: SangeethaRao sangeetha@lsi.com

Fixed the DTS to have correct entries and updated USB driver
to exclude 55xx relevant code from PPC build

drivers/usb: added a new ehci halt function

New halt function halts the EHCI controller.
This is to be called during startup since spinlocks are not
initialized at that point.

Signed-off-by: SangeethaRao sangeetha@lsi.com
---
 arch/powerpc/boot/dts/acp342x.dts |7 ---
 drivers/usb/host/ehci-ci13612.c   |   30 +-
 2 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/acp342x.dts 
b/arch/powerpc/boot/dts/acp342x.dts
index 4db67df..8e400e3 100644
--- a/arch/powerpc/boot/dts/acp342x.dts
+++ b/arch/powerpc/boot/dts/acp342x.dts
@@ -112,9 +112,10 @@
 };
 USB0: usb@004a4000 {
 device_type = usb;
-compatible = acp-usb;
-enabled = 0;
-reg = 0x004a4000 0x0002;
+compatible = lsi,acp-usb;
+enabled = 1;
+   reg = 0x20 0x004A 0x0 002,
+   0x20 0x0040C000 0x0 0001000;
 interrupt-parent = MPIC;
 interrupts = 31;
 };
diff --git a/drivers/usb/host/ehci-ci13612.c b/drivers/usb/host/ehci-ci13612.c
index b995a32..3badbd8 100644
--- a/drivers/usb/host/ehci-ci13612.c
+++ b/drivers/usb/host/ehci-ci13612.c
@@ -32,6 +32,8 @@
 #include ehci-ci13612.h
 
 
+static int ci13612_ehci_halt(struct ehci_hcd *ehci);
+
 #ifdef CONFIG_LSI_USB_SW_WORKAROUND
 static void ci13612_usb_setup(struct usb_hcd *hcd)
 {
@@ -104,7 +106,7 @@ static int ci13612_ehci_init(struct usb_hcd *hcd)
ehci-sbrn = 0x20;
 
/* Reset is only allowed on a stopped controller */
-   ehci_halt(ehci);
+   ci13612_ehci_halt(ehci);
 
/* reset controller */
ehci_reset(ehci);
@@ -183,8 +185,11 @@ static int ci13612_ehci_run(struct usb_hcd *hcd)
if (retval)
return retval;
 
+
+#ifndef CONFIG_LSI_USB_SW_WORKAROUND
/* Setup AMBA interface to force INCR16 busts when possible */
writel(3, USB_SBUSCFG);
+#endif
 
retval = ehci_run(hcd);
if (retval)
@@ -192,10 +197,12 @@ static int ci13612_ehci_run(struct usb_hcd *hcd)
 
ci13612_fixup_txpburst(ehci);
 
+#ifndef CONFIG_LSI_USB_SW_WORKAROUND
/* Set ITC (bits [23:16]) to zero for interrupt on every micro-frame */
tmp = ehci_readl(ehci, ehci-regs-command);
tmp = 0x;
ehci_writel(ehci, tmp  0x, ehci-regs-command);
+#endif
 
return retval;
 }
@@ -238,6 +245,7 @@ static int ci13612_ehci_probe(struct platform_device *pdev)
 
irq = platform_get_irq(pdev, 0);
if (irq  0) {
+   dev_dbg(pdev-dev, error getting irq number\n);
retval = irq;
goto fail_create_hcd;
}
@@ -255,9 +263,12 @@ static int ci13612_ehci_probe(struct platform_device *pdev)
return -ENODEV;
}
 
+
+#ifndef CONFIG_LSI_USB_SW_WORKAROUND
/* Device using 32-bit addressing */
pdev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
pdev-dev.dma_mask = pdev-dev.coherent_dma_mask;
+#endif
 
hcd = usb_create_hcd(ci13612_hc_driver, pdev-dev,
dev_name(pdev-dev));
@@ -316,6 +327,18 @@ static int ci13612_ehci_remove(struct platform_device 
*pdev)
return 0;
 }
 
+static int ci13612_ehci_halt(struct ehci_hcd *ehci)
+{
+   u32 temp;
+
+   temp = ehci_readl(ehci, ehci-regs-command);
+   temp = ~CMD_RUN;
+   ehci_writel(ehci, temp, ehci-regs-command);
+
+   return handshake(ehci, ehci-regs-status,
+   STS_HALT, STS_HALT, 16 * 125);
+}
+
 MODULE_ALIAS(platform:ci13612-ehci);
 
 static struct of_device_id ci13612_match[] = {
@@ -323,6 +346,10 @@ static struct of_device_id ci13612_match[] = {
.type   = usb,
.compatible = lsi,acp-usb,
},
+   {
+   .type   = usb,
+   .compatible = acp-usb,
+   },
{},
 };
 
@@ -333,4 +360,5 @@ static struct platform_driver ci13612_ehci_driver = {
.name = ci13612-ehci,
.of_match_table = ci13612_match,
},
+
 };
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 23/28] powerpc/mpic: Disable preemption when calling mpic_processor_id()

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

  commit 32dda05f4ec2b854b594bd91590c46c5197d77e1 upstream

  Otherwise, we get a debug traceback due to the use of
  smp_processor_id() (or get_paca()) inside hard_smp_processor_id().
  mpic_host_map() is just looking for a default CPU, so it doesn't matter
  if we migrate after getting the CPU ID.

  Signed-off-by: Scott Wood scottw...@freescale.com
  Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org
  Signed-off-by: John Jacques john.jacq...@lsi.com
---
 arch/powerpc/sysdev/mpic.c |  119 +---
 1 file changed, 68 insertions(+), 51 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 9ee7043..a3d7951 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -142,7 +142,7 @@ static u32 mpic_infos[][MPIC_IDX_END] = {
},
 };
 
-#define MPIC_INFO(name) mpic-hw_set[MPIC_IDX_##name]
+#define MPIC_INFO(name) (mpic-hw_set[MPIC_IDX_##name])
 
 #else /* CONFIG_MPIC_WEIRD */
 
@@ -169,7 +169,7 @@ static inline u32 _mpic_read(enum mpic_reg_type type,
 struct mpic_reg_bank *rb,
 unsigned int reg)
 {
-   switch(type) {
+   switch (type) {
 #ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
return dcr_read(rb-dhost, reg);
@@ -183,10 +183,10 @@ static inline u32 _mpic_read(enum mpic_reg_type type,
 }
 
 static inline void _mpic_write(enum mpic_reg_type type,
-  struct mpic_reg_bank *rb,
-  unsigned int reg, u32 value)
+   struct mpic_reg_bank *rb,
+   unsigned int reg, u32 value)
 {
-   switch(type) {
+   switch (type) {
 #ifdef CONFIG_PPC_DCR
case mpic_access_dcr:
dcr_write(rb-dhost, reg, value);
@@ -213,7 +213,8 @@ static inline u32 _mpic_ipi_read(struct mpic *mpic, 
unsigned int ipi)
return _mpic_read(type, mpic-gregs, offset);
 }
 
-static inline void _mpic_ipi_write(struct mpic *mpic, unsigned int ipi, u32 
value)
+static inline void _mpic_ipi_write(struct mpic *mpic,
+   unsigned int ipi, u32 value)
 {
unsigned int offset = MPIC_INFO(GREG_IPI_VECTOR_PRI_0) +
  (ipi * MPIC_INFO(GREG_IPI_STRIDE));
@@ -250,14 +251,16 @@ static inline u32 _mpic_cpu_read(struct mpic *mpic, 
unsigned int reg)
return _mpic_read(mpic-reg_type, mpic-cpuregs[cpu], reg);
 }
 
-static inline void _mpic_cpu_write(struct mpic *mpic, unsigned int reg, u32 
value)
+static inline void _mpic_cpu_write(struct mpic *mpic,
+   unsigned int reg, u32 value)
 {
unsigned int cpu = mpic_processor_id(mpic);
 
_mpic_write(mpic-reg_type, mpic-cpuregs[cpu], reg, value);
 }
 
-static inline u32 _mpic_irq_read(struct mpic *mpic, unsigned int src_no, 
unsigned int reg)
+static inline u32 _mpic_irq_read(struct mpic *mpic,
+   unsigned int src_no, unsigned int reg)
 {
unsigned intisu = src_no  mpic-isu_shift;
unsigned intidx = src_no  mpic-isu_mask;
@@ -289,16 +292,16 @@ static inline void _mpic_irq_write(struct mpic *mpic, 
unsigned int src_no,
 #endif
 }
 
-#define mpic_read(b,r) _mpic_read(mpic-reg_type,(b),(r))
-#define mpic_write(b,r,v)  _mpic_write(mpic-reg_type,(b),(r),(v))
-#define mpic_ipi_read(i)   _mpic_ipi_read(mpic,(i))
-#define mpic_ipi_write(i,v)_mpic_ipi_write(mpic,(i),(v))
-#define mpic_tm_read(i)_mpic_tm_read(mpic,(i))
-#define mpic_tm_write(i,v) _mpic_tm_write(mpic,(i),(v))
-#define mpic_cpu_read(i)   _mpic_cpu_read(mpic,(i))
-#define mpic_cpu_write(i,v)_mpic_cpu_write(mpic,(i),(v))
-#define mpic_irq_read(s,r) _mpic_irq_read(mpic,(s),(r))
-#define mpic_irq_write(s,r,v)  _mpic_irq_write(mpic,(s),(r),(v))
+#define mpic_read(b, r)_mpic_read(mpic-reg_type, (b), (r))
+#define mpic_write(b, r, v)_mpic_write(mpic-reg_type, (b), (r), (v))
+#define mpic_ipi_read(i)   _mpic_ipi_read(mpic, (i))
+#define mpic_ipi_write(i, v)   _mpic_ipi_write(mpic, (i), (v))
+#define mpic_tm_read(i)_mpic_tm_read(mpic, (i))
+#define mpic_tm_write(i, v)_mpic_tm_write(mpic, (i), (v))
+#define mpic_cpu_read(i)   _mpic_cpu_read(mpic, (i))
+#define mpic_cpu_write(i, v)   _mpic_cpu_write(mpic, (i), (v))
+#define mpic_irq_read(s, r)_mpic_irq_read(mpic, (s), (r))
+#define mpic_irq_write(s, r, v)_mpic_irq_write(mpic, (s), (r), (v))
 
 
 /*
@@ -333,7 +336,7 @@ static inline void mpic_map(struct mpic *mpic,
_mpic_map_mmio(mpic, phys_addr, rb, offset, size);
 }
 #else /* CONFIG_PPC_DCR */
-#define mpic_map(m,p,b,o,s)_mpic_map_mmio(m,p,b,o,s)
+#define mpic_map(m, p, b, o, s)_mpic_map_mmio(m, p, b, o, s)
 #endif /* !CONFIG_PPC_DCR */
 
 
@@ -345,7 +348,8 @@ static void __init mpic_test_broken_ipi(struct mpic *mpic)
 {
u32 r;
 
-  

[linux-yocto] [PATCH 25/28] drivers/i2c-axxia: Support I2C_M_RECV_LEN

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

Add support for the I2C_M_RECV_LEN flag to enable SMBus block data transfers.

scripts/setlocalversion strips out the tag if there is a match
since the Linux version is in Makefile.  Without the tag information,
there is no way to get back to the specific tag used in defect
reports etc.  This patch adds, in the LSI Axxia case, the lsi tag.

Add a timeout condition to the soft reset code.

Currently this will time out when running on simulator since it fails to clear
the soft reset bit.

Signed-off-by: John Jacques john.jacq...@lsi.com
Signed-off-by: Anders Berg anders.b...@lsi.com
---
 drivers/i2c/busses/i2c-axxia.c |  193 +---
 scripts/setlocalversion|8 ++
 2 files changed, 130 insertions(+), 71 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 8061998..519cda7 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -27,7 +27,8 @@
 #include linux/module.h
 
 #define SCL_WAIT_TIMEOUT_NS 2500
-#define I2C_TIMEOUT (msecs_to_jiffies(1000))
+#define I2C_XFER_TIMEOUT(msecs_to_jiffies(500))
+#define I2C_STOP_TIMEOUT(msecs_to_jiffies(100))
 #define TX_FIFO_SIZE8
 #define RX_FIFO_SIZE8
 
@@ -123,12 +124,10 @@ struct axxia_i2c_dev {
int irq;
/* xfer completion object */
struct completion msg_complete;
-   /* pointer to current message data */
-   u8 *msg_buf;
-   /* size of unsent data in the message buffer */
-   size_t msg_buf_remaining;
-   /* identifies read transfers */
-   int msg_read;
+   /* pointer to current message */
+   struct i2c_msg *msg;
+   /* number of bytes transferred in msg */
+   size_t msg_xfrd;
/* error code for completed message */
int msg_err;
/* current i2c bus clock rate */
@@ -168,10 +167,21 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
u32 t_setup;
u32 tmo_clk;
u32 prescale;
+   unsigned long timeout;
 
dev_dbg(idev-dev, rate=%uHz per_clk=%uMHz - ratio=1:%u\n,
idev-bus_clk_rate, clk_mhz, divisor);
 
+   /* Reset controller */
+   writel(0x01, idev-regs-soft_reset);
+   timeout = jiffies + msecs_to_jiffies(100);
+   while (readl(idev-regs-soft_reset)  1) {
+   if (time_after(jiffies, timeout)) {
+   dev_warn(idev-dev, Soft reset failed\n);
+   break;
+   }
+   }
+
/* Enable Master Mode */
writel(0x1, idev-regs-global_control);
 
@@ -186,8 +196,8 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
 
/* SDA Setup Time */
writel(t_setup, idev-regs-sda_setup_time);
-   /* SDA Hold Time, 5ns */
-   writel(ns_to_clk(5, clk_mhz), idev-regs-sda_hold_time);
+   /* SDA Hold Time, 300ns */
+   writel(ns_to_clk(300, clk_mhz), idev-regs-sda_hold_time);
/* Filter 50ns spikes */
writel(ns_to_clk(50, clk_mhz), idev-regs-spike_fltr_len);
 
@@ -228,15 +238,40 @@ axxia_i2c_init(struct axxia_i2c_dev *idev)
 }
 
 static int
-axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev)
+i2c_m_rd(const struct i2c_msg *msg)
 {
-   size_t rx_fifo_avail = readl(idev-regs-mst_rx_fifo);
-   int bytes_to_transfer = min(rx_fifo_avail, idev-msg_buf_remaining);
+   return (msg-flags  I2C_M_RD) != 0;
+}
 
-   idev-msg_buf_remaining -= bytes_to_transfer;
+static int
+i2c_m_recv_len(const struct i2c_msg *msg)
+{
+   return (msg-flags  I2C_M_RECV_LEN) != 0;
+}
 
-   while (0  bytes_to_transfer--)
-   *idev-msg_buf++ = readl(idev-regs-mst_data);
+static int
+axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev)
+{
+   struct i2c_msg *msg = idev-msg;
+   size_t rx_fifo_avail = readl(idev-regs-mst_rx_fifo);
+   int bytes_to_transfer = min(rx_fifo_avail, msg-len - idev-msg_xfrd);
+
+   while (0  bytes_to_transfer--) {
+   int c = readl(idev-regs-mst_data);
+   if (idev-msg_xfrd == 0  i2c_m_recv_len(msg)) {
+   if (c == 0 || c  I2C_SMBUS_BLOCK_MAX) {
+   idev-msg_err = -EPROTO;
+   i2c_int_disable(idev, ~0);
+   dev_err(idev-dev,
+   invalid SMBus block size (%d)\n, c);
+   complete(idev-msg_complete);
+   break;
+   }
+   msg-len += c;
+   writel(msg-len, idev-regs-mst_rx_xfer);
+   }
+   msg-buf[idev-msg_xfrd++] = c;
+   }
 
return 0;
 }
@@ -244,18 +279,16 @@ axxia_i2c_empty_rx_fifo(struct axxia_i2c_dev *idev)
 static int
 axxia_i2c_fill_tx_fifo(struct axxia_i2c_dev *idev)
 {
+   struct i2c_msg *msg = idev-msg;
size_t tx_fifo_avail = TX_FIFO_SIZE - readl(idev-regs-mst_tx_fifo);
-   int 

[linux-yocto] [PATCH 28/28] axxia: Remove Wrapper Functions

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

These functions were temporary.  They were added to allow
development to continue on an external module that was not,
at the time, released under the GPL.

Signed-off-by: John Jacques john.jacq...@lsi.com
Signed-off-by: Paul Butler paul.but...@windriver.com
---
 arch/arm/mach-axxia/Makefile   |1 -
 arch/arm/mach-axxia/wrappers.c |  140 
 arch/powerpc/sysdev/Makefile   |2 -
 arch/powerpc/sysdev/lsi_acp_wrappers.c |  132 --
 4 files changed, 275 deletions(-)
 delete mode 100644 arch/arm/mach-axxia/wrappers.c
 delete mode 100644 arch/powerpc/sysdev/lsi_acp_wrappers.c

diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile
index 85cee8f..47e386b 100644
--- a/arch/arm/mach-axxia/Makefile
+++ b/arch/arm/mach-axxia/Makefile
@@ -1,7 +1,6 @@
 #
 # Makefile for the linux kernel.
 #
-obj-y   += wrappers.o
 obj-y  += axxia.o
 obj-y  += clock.o
 obj-y   += io.o
diff --git a/arch/arm/mach-axxia/wrappers.c b/arch/arm/mach-axxia/wrappers.c
deleted file mode 100644
index 4d49825..000
--- a/arch/arm/mach-axxia/wrappers.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * arch/arm/mach-axxia/wrappers.c
- *
- * Copyright (C) 2013 LSI
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
 USA
- */
-
-#include linux/module.h
-#include asm/irq.h
-#include linux/io.h
-#include linux/irqdomain.h
-#include linux/skbuff.h
-#include linux/platform_device.h
-
-/*
-  
==
-  
==
-  MDIO
-  
==
-  
==
-*/
-
-/*
-  
==
-  
==
-  Platform Device Registration
-  
==
-  
==
-*/
-
-/*
-  
--
-  acp_platform_device_register
-*/
-
-int
-acp_platform_device_register(struct platform_device *pdev)
-{
-   return platform_device_register(pdev);
-}
-EXPORT_SYMBOL(acp_platform_device_register);
-
-/*
-  
--
-  acp_platform_device_unregister
-*/
-
-void
-acp_platform_device_unregister(struct platform_device *pdev)
-{
-   platform_device_unregister(pdev);
-
-   return;
-}
-EXPORT_SYMBOL(acp_platform_device_unregister);
-
-/*
-  
-  
-  SKB
-  
-  
-*/
-
-/*
-  
-  acp_skb_tstamp_tx
-*/
-
-void
-acp_skb_tstamp_tx(struct sk_buff *orig_skb,
- struct skb_shared_hwtstamps *hwtstamps) {
-   skb_tstamp_tx(orig_skb, hwtstamps);
-}
-EXPORT_SYMBOL(acp_skb_tstamp_tx);
-
-/*
-  
-  
-  Interrupts
-  
-  
-*/
-
-/*
- * -
- * acp_irq_create_mapping
- */
-unsigned int acp_irq_create_mapping(struct irq_domain *host,
-   irq_hw_number_t hwirq)
-{
-   unsigned int mapped_irq;
-
-   preempt_disable();
-   mapped_irq = irq_create_mapping(host, hwirq);
-   

[linux-yocto] [PATCH 27/28] LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct boundary, Expand valid condition.

2014-05-02 Thread Charlie Paul
From: Michael Bringmann michael.bringm...@lsi.com

Add additional spinlocks/mutexes to each controller state to increase
concurrency and performance.  Fix some bound checks for full outbound
DME descriptor chains, correct a lockup/delay issue with errors in the
outbound DME chains, and remove a delay loop.

rapidio/LSI AXM55xx: Correct some boundary checks for argument values.

Also correct formatting of platform-specific function code.

LSI AXM55xx: Expand valid condition checks for inbound message DME chains.

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
 arch/arm/include/asm/axxia-rio.h|   31 --
 drivers/rapidio/devices/lsi/axxia-rio-ds.c  |   22 ++--
 drivers/rapidio/devices/lsi/axxia-rio-irq.c |  156 ---
 drivers/rapidio/devices/lsi/axxia-rio-irq.h |   13 +--
 drivers/rapidio/devices/lsi/axxia-rio.c |3 +-
 drivers/rapidio/devices/lsi/axxia-rio.h |   16 ++-
 6 files changed, 101 insertions(+), 140 deletions(-)

diff --git a/arch/arm/include/asm/axxia-rio.h b/arch/arm/include/asm/axxia-rio.h
index e01d6a3..492d476 100644
--- a/arch/arm/include/asm/axxia-rio.h
+++ b/arch/arm/include/asm/axxia-rio.h
@@ -94,21 +94,32 @@ static inline u32 CNTLZW(u32 val)
int n = 0;
if (val == 0)
return 32;
-   if ((val  0x) == 0)
-   n += 16; val = val  16;
+
+   if ((val  0x) == 0) {
+   n += 16;
+   val = val  16;
+   }
/*        
// 16 bits from left are zero! so we omit 16 left bits */
-   if ((val  0xFF00) == 0)
-   n = n + 8; val = val  8;
+   if ((val  0xFF00) == 0) {
+   n = n + 8;
+   val = val  8;
+   }
/* 8 left bits are 0 */
-   if ((val  0xF000) == 0)
-   n = n + 4; val = val  4;
+   if ((val  0xF000) == 0) {
+   n = n + 4;
+   val = val  4;
+   }
/* 4 left bits are 0 */
-   if ((val  0xC000) == 0)
-   n = n + 2, val = val  2;
+   if ((val  0xC000) == 0) {
+   n = n + 2;
+   val = val  2;
+   }
/* 110 2 left bits are zero */
-   if ((val  0x8000) == 0)
-   n = n + 1, val = val  1;
+   if ((val  0x8000) == 0) {
+   n = n + 1;
+   val = val  1;
+   }
/* first left bit is zero */
return n;
 }
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index f4f44a6..02d3751 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -240,9 +240,10 @@ int axxia_open_ob_data_stream(
int num_header_entries,
int num_data_entries)
 {
+   struct rio_priv *priv = mport-priv;
int rc = 0;
 
-   axxia_api_lock();
+   axxia_api_lock(priv);
 
rc = open_ob_data_stream(mport,
dev_id,
@@ -250,7 +251,7 @@ int axxia_open_ob_data_stream(
num_header_entries,
num_data_entries);
 
-   axxia_api_unlock();
+   axxia_api_unlock(priv);
 
return rc;
 }
@@ -747,12 +748,12 @@ int axxia_close_ob_data_stream(
struct rio_ds_hdr_desc  *ptr_hdr_desc;
u32dse_ctrl, i;
 
-   axxia_api_lock();
+   axxia_api_lock(priv);
 
ptr_dse_cfg = (ptr_ds_priv-obds_dse_cfg[dse_id]);
 
if (ptr_dse_cfg-in_use == RIO_DS_FALSE) {
-   axxia_api_unlock();
+   axxia_api_unlock(priv);
return 0;
}
 
@@ -791,7 +792,7 @@ int axxia_close_ob_data_stream(
/* release the IRQ handler */
release_irq_handler((ptr_ds_priv-ob_dse_irq[dse_id]));
 
-   axxia_api_unlock();
+   axxia_api_unlock(priv);
 
return 0;
 }
@@ -830,9 +831,10 @@ int axxia_open_ib_data_stream(
int desc_dbuf_size,
int num_entries)
 {
+   struct rio_priv *priv = mport-priv;
int rc = 0;
 
-   axxia_api_lock();
+   axxia_api_lock(priv);
 
rc = open_ib_data_stream(mport,
 dev_id,
@@ -840,7 +842,7 @@ int axxia_open_ib_data_stream(
 cos,
 desc_dbuf_size,
 num_entries);
-   axxia_api_unlock();
+   axxia_api_unlock(priv);
 
return rc;
 }
@@ -1522,7 +1524,7 @@ int axxia_close_ib_data_stream(
struct rio_ids_data_desc *ptr_data_desc;
u8  virt_vsid;
 
-   axxia_api_lock();
+   axxia_api_lock(priv);
 
for (i = 0; i  (ptr_ds_priv-num_ibds_virtual_m); i++) {
ptr_virt_m_cfg = (ptr_ds_priv-ibds_vsid_m_cfg[i]);
@@ 

[linux-yocto] [PATCH 20/28] LSI sysdev/pci: Removing the power of 2 size restriction

2014-05-02 Thread Charlie Paul
From: SangeethaRao sangeetha@lsi.com

This patch removes the power of 2 size restriction
for PCIe inbound mapping in LSI PCIe driver

Signed-off-by: SangeethaRao sangeetha@lsi.com
---
 arch/powerpc/sysdev/lsi_pci.c |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/sysdev/lsi_pci.c b/arch/powerpc/sysdev/lsi_pci.c
index 75bdf53..f485343 100644
--- a/arch/powerpc/sysdev/lsi_pci.c
+++ b/arch/powerpc/sysdev/lsi_pci.c
@@ -114,8 +114,9 @@ static int __init acp_parse_dma_ranges(struct 
pci_controller *hose,
 * within 32 bits space
 */
if (cpu_addr != 0 || pci_addr  0x) {
-   printk(KERN_WARNING %s: Ignored unsupported dma range
-   0x%016llx...0x%016llx - 0x%016llx\n,
+   printk(KERN_WARNING %s: Ignored unsupported \
+   dma range\
+   0x%016llx...0x%016llx - 0x%016llx\n,\
   hose-dn-full_name,
   pci_addr, pci_addr + size - 1, cpu_addr);
continue;
@@ -148,15 +149,14 @@ static int __init acp_parse_dma_ranges(struct 
pci_controller *hose,
 * DMA bounce buffers
 */
if (size  total_memory) {
-   printk(KERN_ERR %s: dma-ranges too small 
-  (size=%llx total_memory=%llx)\n,
+   printk(KERN_ERR %s: dma-ranges too small \
+  (size=%llx total_memory=%llx)\n,\
   hose-dn-full_name, size, (u64)total_memory);
return -ENXIO;
}
 
-   /* Check we are a power of 2 size and that base is a multiple of size*/
-   if ((size  (size - 1)) != 0  ||
-   (res-start  (size - 1)) != 0) {
+   /* Check that base is a multiple of size*/
+   if ((res-start  (size - 1)) != 0) {
printk(KERN_ERR %s: dma-ranges unaligned\n,
   hose-dn-full_name);
return -ENXIO;
@@ -288,7 +288,7 @@ static int acp_pciex_validate_bdf(struct pciex_port *port,
/* Check we are within the mapped range */
if (bus-number  port-hose-last_busno) {
if (!message) {
-   printk(KERN_WARNING Warning! Probing bus %u
+   printk(KERN_WARNING Warning! Probing bus %u\
out of range !\n, bus-number);
message++;
}
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 22/28] arch/powerpc: Updated the UART Driver to Support 3500

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

Added code to support the UART on the 3500 board

Signed-off-by: John Jacques john.jacq...@lsi.com
---
 drivers/tty/serial/lsi_acp_serial.c |   94 +++
 1 file changed, 51 insertions(+), 43 deletions(-)

diff --git a/drivers/tty/serial/lsi_acp_serial.c 
b/drivers/tty/serial/lsi_acp_serial.c
index a41eab2..0f9f7ce 100644
--- a/drivers/tty/serial/lsi_acp_serial.c
+++ b/drivers/tty/serial/lsi_acp_serial.c
@@ -81,9 +81,8 @@ struct uart_acp_port {
unsigned int interrupt_mask;
unsigned int old_status;
void *timer_base;
-   unsigned long divisor;
-   unsigned char ibrd;
-   unsigned char fbrd;
+   unsigned short ibrd;
+   unsigned short fbrd;
 };
 
 /*
@@ -119,25 +118,10 @@ struct uart_acp_port {
 static int
 get_clock_stuff(struct uart_acp_port *port, int baud_rate)
 {
-   unsigned long divisor;
unsigned long ibrd;
unsigned long fbrd;
 
-   /*
- Since the IBDR (integer part of the baud rate
- divisor) is a 16 bit quatity, find the minimum load
- value that will let the IBDR/FBDR result in the
- desired baud rate.
-   */
-
-   if (100  per_clock) {
-   divisor = per_clock / 2500;
-   ibrd = 2500 / (16 * baud_rate);
-   } else {
-   /* Emulation is much slower... */
-   divisor = per_clock / 325;
-   ibrd = 325 / (16 * baud_rate);
-   }
+   ibrd = per_clock / (16 * baud_rate);
 
/*
 * The following formula is from the ARM document (ARM DDI 0183E).
@@ -164,36 +148,15 @@ get_clock_stuff(struct uart_acp_port *port, int baud_rate)
 * 2 * (16 * baud_rate)
 */
 
-   port-port.uartclk = (per_clock / divisor);
+   port-port.uartclk = per_clock;
 
fbrd = port-port.uartclk % (16 * baud_rate);
fbrd *= 128;
fbrd += (16 * baud_rate);
fbrd /= (2 * (16 * baud_rate));
 
-   port-divisor = (divisor - 1);
-   port-ibrd = (unsigned char) ibrd;
-   port-fbrd = (unsigned char) fbrd;
-
-   if (port-divisor != in_le32(port-timer_base + TIMER_LOAD)) {
-   while (0 ==
-  (in_le32((const volatile unsigned *)
-   (port-port.membase + UART01x_FR)) 
-   UART011_FR_TXFE))
-   ;
-
-   while (0 !=
-  (in_le32((const volatile unsigned *)
-   (port-port.membase + UART01x_FR)) 
-   UART01x_FR_BUSY))
-   ;
-
-   out_le32((port-timer_base + TIMER_CONTROL), 0);
-   out_le32((port-timer_base + TIMER_LOAD), port-divisor);
-   out_le32((port-timer_base + TIMER_CONTROL),
-(TIMER_CONTROL_ENABLE |
- TIMER_CONTROL_MODE));
-   }
+   port-ibrd = (unsigned short) ibrd;
+   port-fbrd = (unsigned short) fbrd;
 
return 0;
 }
@@ -1135,6 +1098,51 @@ acp_serial_add_ports(struct uart_driver *driver)
ret = -ENOMEM;
}
 
+   np = of_find_compatible_node(NULL, NULL, lsi,acp3500);
+
+   if (NULL == np) {
+   unsigned long divisor;
+
+   /*
+ In the 3500 case, the peripheral clock is connected
+ directly to the UART.  If this isn't 3500, set up
+ the second timer (which is in between the peripheral
+ clock and the UART) and adjust per_clock
+ accordingly.
+   */
+
+   if (100  per_clock) {
+   divisor = per_clock / 2500;
+   per_clock = 2500;
+   } else {
+   /* Emulation is much slower... */
+   divisor = per_clock / 325;
+   per_clock = 325;
+   }
+
+   --divisor;
+
+   if (divisor != in_le32(uap-timer_base + TIMER_LOAD)) {
+   while (0 ==
+  (in_le32((const volatile unsigned *)
+   (uap-port.membase + UART01x_FR)) 
+   UART011_FR_TXFE))
+   ;
+
+   while (0 !=
+  (in_le32((const volatile unsigned *)
+   (uap-port.membase + UART01x_FR)) 
+   UART01x_FR_BUSY))
+   ;
+
+   out_le32((uap-timer_base + TIMER_CONTROL), 0);
+   out_le32((uap-timer_base + TIMER_LOAD), divisor);
+   out_le32((uap-timer_base + TIMER_CONTROL),
+(TIMER_CONTROL_ENABLE |
+ TIMER_CONTROL_MODE));
+   }

[linux-yocto] [PATCH 18/28] kernel/irq/manage.c: Fix irq_set_affinity to allow use with buslocks

2014-05-02 Thread Charlie Paul
From: David Mercado david.merc...@windriver.com

Fix irq_set_affinity() to allow usage of buslocks with slow bus
IRQ controllers, such as the LSI Axxia GIC.

Signed-off-by: David Mercado david.merc...@windriver.com
---
 kernel/irq/manage.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c891fe3..4291484 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -180,16 +180,16 @@ int __irq_set_affinity_locked(struct irq_data *data, 
const struct cpumask *mask)
  */
 int irq_set_affinity(unsigned int irq, const struct cpumask *mask)
 {
-   struct irq_desc *desc = irq_to_desc(irq);
unsigned long flags;
+   struct irq_desc *desc = irq_get_desc_buslock(irq, flags,
+IRQ_GET_DESC_CHECK_GLOBAL);
int ret;
 
if (!desc)
return -EINVAL;
 
-   raw_spin_lock_irqsave(desc-lock, flags);
ret =  __irq_set_affinity_locked(irq_desc_get_irq_data(desc), mask);
-   raw_spin_unlock_irqrestore(desc-lock, flags);
+   irq_put_desc_busunlock(desc, flags);
return ret;
 }
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 21/28] axxia: Fix a Size Warning in the SRIO Section of the Device Trees

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

Signed-off-by: John Jacques john.jacq...@lsi.com
---
 arch/powerpc/boot/dts/acp25xx.dts |2 +-
 arch/powerpc/boot/dts/acp342x.dts |2 +-
 arch/powerpc/boot/dts/acp344x.dts |2 +-
 arch/powerpc/boot/dts/acp35xx.dts |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/acp25xx.dts 
b/arch/powerpc/boot/dts/acp25xx.dts
index b5463c5..9893cf9 100644
--- a/arch/powerpc/boot/dts/acp25xx.dts
+++ b/arch/powerpc/boot/dts/acp25xx.dts
@@ -290,7 +290,7 @@
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
 device_type = rapidio;
-reg = 0x0020 0x0056 0x0 0x1000; /* SRIO Conf 0 region */
+reg = 0x0020 0x0056 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0021 0x 0x0 0x4000;
/*
 linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
diff --git a/arch/powerpc/boot/dts/acp342x.dts 
b/arch/powerpc/boot/dts/acp342x.dts
index 99d2858..6e02a8c 100644
--- a/arch/powerpc/boot/dts/acp342x.dts
+++ b/arch/powerpc/boot/dts/acp342x.dts
@@ -291,7 +291,7 @@
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
 device_type = rapidio;
-reg = 0x0020 0x0042 0x0 0x1000; /* SRIO Conf 0 region */
+reg = 0x0020 0x0042 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0020 0x8000 0x0 0x4000;
/*
 linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
diff --git a/arch/powerpc/boot/dts/acp344x.dts 
b/arch/powerpc/boot/dts/acp344x.dts
index 51fa547..2c25007 100644
--- a/arch/powerpc/boot/dts/acp344x.dts
+++ b/arch/powerpc/boot/dts/acp344x.dts
@@ -290,7 +290,7 @@
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
 device_type = rapidio;
-reg = 0x0020 0x0042 0x0 0x1000; /* SRIO Conf 0 region */
+reg = 0x0020 0x0042 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0020 0x8000 0x0 0x4000;
/*
 linkdown-reset = 0x0200 0x100 0x0020 0x0043 0x0 
0x1;
diff --git a/arch/powerpc/boot/dts/acp35xx.dts 
b/arch/powerpc/boot/dts/acp35xx.dts
index 8fd366f..0bf153f 100644
--- a/arch/powerpc/boot/dts/acp35xx.dts
+++ b/arch/powerpc/boot/dts/acp35xx.dts
@@ -401,7 +401,7 @@
 #size-cells = 2;
 compatible = axxia,rapidio-delta;
 device_type = rapidio;
-reg = 0x0020 0x0056 0x0 0x1000; /* SRIO Conf 0 region */
+reg = 0x0020 0x0056 0x1000; /* SRIO Conf 0 region */
 ranges = 0x0 0x0 0x0021 0x 0x0 0x4000;
/*
 linkdown-reset = 0x0200 0x100 0x0020 0x0040A000 0x0 
0x1;
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 25/28] arch/powerpc: Don't Try to Use NAND on Axxia 3500

2014-05-02 Thread Charlie Paul
From: John Jacques john.jacq...@lsi.com

If NAND is enabled and the board is 3500 then
gracefully exit with the error message

NAND not compatible with 3500

Signed-off-by: John Jacques john.jacq...@lsi.com
---
 drivers/mtd/nand/lsi_acp_nand.c |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/lsi_acp_nand.c b/drivers/mtd/nand/lsi_acp_nand.c
index c3165d9..1cac342 100644
--- a/drivers/mtd/nand/lsi_acp_nand.c
+++ b/drivers/mtd/nand/lsi_acp_nand.c
@@ -3471,6 +3471,13 @@ lsi_nand_init(void)
static const char *part_probe_types[]
= { cmdlinepart, ofpart, NULL };
 
+   np = of_find_compatible_node(NULL, NULL, lsi,acp3500);
+
+   if (NULL != np) {
+   printk(KERN_ERR NAND Support is Not Yet Available on 3500\n);
+   return -1;
+   }
+
memset(ppdata, 0, sizeof(ppdata));
 
np = of_find_node_by_type(np, nand);
@@ -3490,7 +3497,7 @@ lsi_nand_init(void)
enabled = of_get_property(np, enabled, NULL);
 
if (!enabled || (enabled  (0 == *enabled))) {
-   printk(ACP NAND Controller Isn't Enabled.\n);
+   printk(KERN_INFO ACP NAND Controller Isn't 
Enabled.\n);
return -ENODEV;
}
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 27/28] LSI AXM55xx i2c: Adding support for AXM3500 I2C driver

2014-05-02 Thread Charlie Paul
From: SangeethaRao sangeetha@lsi.com

This patch adds i2c support for the 3500 board

Signed-off-by: SangeethaRao sangeetha@lsi.com
---
 drivers/i2c/busses/i2c-axxia.c |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-axxia.c b/drivers/i2c/busses/i2c-axxia.c
index 43b433b..b2cdbba 100644
--- a/drivers/i2c/busses/i2c-axxia.c
+++ b/drivers/i2c/busses/i2c-axxia.c
@@ -14,7 +14,6 @@
 #include linux/init.h
 #include linux/platform_device.h
 #include linux/clk.h
-#include linux/clkdev.h
 #include linux/err.h
 #include linux/i2c.h
 #include linux/io.h
@@ -501,6 +500,10 @@ axxia_i2c_probe(struct platform_device *pdev)
u32 bus = pdev-id;
int irq = 0;
int ret = 0;
+   int speed_property = 0;
+
+   speed_property = of_find_compatible_node(NULL, NULL,
+   lsi,axxia35xx) != NULL;
 
base = of_iomap(np, 0);
if (!base) {
@@ -537,7 +540,11 @@ axxia_i2c_probe(struct platform_device *pdev)
 
of_property_read_u32(np, bus, bus);
 
-   of_property_read_u32(np, clock-frequency, idev-bus_clk_rate);
+   if (speed_property)
+   of_property_read_u32(np, speed, idev-bus_clk_rate);
+   else
+   of_property_read_u32(np, clock-frequency,
+idev-bus_clk_rate);
 
if (idev-bus_clk_rate == 0)
idev-bus_clk_rate = 10; /* default clock rate */
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 23/28] i2c-axxia: Fixed i2c device minor numbers

2014-05-02 Thread Charlie Paul
From: Anders Berg anders.b...@lsi.com

Added missing 'bus' property to the I2C device tree nodes (simulation dts
files). This is needed to get the I2C adapters numbered starting with 0.

Signed-off-by: Anders Berg anders.b...@lsi.com
---
 arch/arm/boot/dts/axm55xxsim.dts   |   24 
 arch/arm/boot/dts/axm55xxsim16.dts |   24 
 2 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xxsim.dts b/arch/arm/boot/dts/axm55xxsim.dts
index b20b09a..511defa 100644
--- a/arch/arm/boot/dts/axm55xxsim.dts
+++ b/arch/arm/boot/dts/axm55xxsim.dts
@@ -306,45 +306,37 @@
 I2C0: i2c@0x02010084000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 0;
-/* bus_name = auto; */
-/* bus = 2; */
 reg = 0x20 0x10084000 0x00 0x1000;
interrupts = 0 19 4;
+bus = 0;
+enabled = 0;
 };
 
 I2C1: i2c@0x02010085000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 1;
-/* bus_name = auto; */
-/* bus = 3; */
 reg = 0x20 0x10085000 0x00 0x1000;
interrupts = 0 20 4;
+bus = 1;
+enabled = 0;
 };
 
 I2C2: i2c@0x02010086000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 2;
-/* bus_name = auto; */
-/* bus = 4; */
 reg = 0x20 0x10086000 0x00 0x1000;
interrupts = 0 21 4;
+bus = 2;
+enabled = 0;
 };
 
 SMB: i2c@0x02010087000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 3;
-bus_name = smb;
-/* bus = 5; */
 reg = 0x20 0x10087000 0x00 0x1000;
interrupts = 0 22 4;
+bus = 3;
+enabled = 0;
 };
 };
 
diff --git a/arch/arm/boot/dts/axm55xxsim16.dts 
b/arch/arm/boot/dts/axm55xxsim16.dts
index 0ce2ff4..1ddba7c 100644
--- a/arch/arm/boot/dts/axm55xxsim16.dts
+++ b/arch/arm/boot/dts/axm55xxsim16.dts
@@ -390,45 +390,37 @@
 I2C0: i2c@0x02010084000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 0;
-/* bus_name = auto; */
-/* bus = 2; */
 reg = 0x20 0x10084000 0x00 0x1000;
interrupts = 0 19 4;
+bus = 0;
+enabled = 0;
 };
 
 I2C1: i2c@0x02010085000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 1;
-/* bus_name = auto; */
-/* bus = 3; */
 reg = 0x20 0x10085000 0x00 0x1000;
interrupts = 0 20 4;
+bus = 1;
+enabled = 0;
 };
 
 I2C2: i2c@0x02010086000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 2;
-/* bus_name = auto; */
-/* bus = 4; */
 reg = 0x20 0x10086000 0x00 0x1000;
interrupts = 0 21 4;
+bus = 2;
+enabled = 0;
 };
 
 SMB: i2c@0x02010087000 {
 compatible = lsi,api2c;
 device_type = i2c;
-enabled = 0;
-port = 3;
-bus_name = smb;
-/* bus = 5; */
 reg = 0x20 0x10087000 0x00 0x1000;
interrupts = 0 22 4;
+bus = 3;
+enabled = 0;
 };
 };
 
-- 
1.7.9.5

-- 
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


[linux-yocto] [PATCH 26/28] LSI AXM55xx: Fix PMU handler issue

2014-05-02 Thread Charlie Paul
From: David Mercado david.merc...@windriver.com

The AXM55xx has the PMU IRQ lines from each core in a cluster OR'ed
together. As a workaround for this, a PMU handler extension was created
in the BSP to dynamically call irq_set_affinity() to rotate the PMU IRQ
assignment as needed, in order to maintain perf accuracy. However, with
the introduction of the Axxia GIC driver slow bus implementation,
irq_set_affinity() cannot be called directly from interrupt context.

Instead, the PMU IRQ handler extension is removed from the BSP and the
rotation of IRQ affinity is performed directly within the Axxia GIC
driver.

Signed-off-by: David Mercado david.merc...@windriver.com
---
 arch/arm/mach-axxia/axxia-gic.c |   25 +
 arch/arm/mach-axxia/axxia.c |   37 -
 2 files changed, 25 insertions(+), 37 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia-gic.c b/arch/arm/mach-axxia/axxia-gic.c
index 701d65f..c716dc9 100644
--- a/arch/arm/mach-axxia/axxia-gic.c
+++ b/arch/arm/mach-axxia/axxia-gic.c
@@ -907,6 +907,10 @@ asmlinkage void __exception_irq_entry 
axxia_gic_handle_irq(struct pt_regs *regs)
u32 irqstat, irqnr;
struct gic_chip_data *gic = gic_data;
void __iomem *cpu_base = gic_data_cpu_base(gic);
+   void __iomem *dist_base = gic_data_dist_base(gic);
+   u32 pcpu = cpu_logical_map(smp_processor_id());
+   u32 cluster = pcpu / CORES_PER_CLUSTER;
+   u32 next, mask;
 
do {
irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
@@ -967,6 +971,27 @@ asmlinkage void __exception_irq_entry 
axxia_gic_handle_irq(struct pt_regs *regs)
writel_relaxed(irqnr, cpu_base + GIC_CPU_EOI);
break;
 
+   case IRQ_PMU:
+   /*
+* The PMU IRQ line is OR'ed among all cores
+* within a cluster, so no way to tell which
+* core actually generated this interrupt.
+* Therefore, rotate PMU IRQ affinity to allow
+* perf to work as accurately as possible. Skip
+* over offline cpus.
+*/
+   do {
+   next = (++pcpu % CORES_PER_CLUSTER) +
+   (cluster * CORES_PER_CLUSTER);
+   } while (!cpu_online(next));
+
+   mask = 0x01  (next % CORES_PER_CLUSTER);
+   raw_spin_lock(irq_controller_lock);
+   writeb_relaxed(mask, dist_base +
+   GIC_DIST_TARGET + IRQ_PMU);
+   raw_spin_unlock(irq_controller_lock);
+   /* Fall through ... */
+
default:
/* External interrupt */
handle_IRQ(irqnr, regs);
diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index af85305..81d39d1 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -192,48 +192,11 @@ static struct resource axxia_pmu_resources[] = {
},
 };
 
-/*
- * The PMU IRQ lines of four cores are wired together into a single interrupt.
- * Bounce the interrupt to other cores if it's not ours.
- */
-#define CORES_PER_CLUSTER  4
-static irqreturn_t axxia_pmu_handler(int irq, void *dev, irq_handler_t handler)
-{
-   irqreturn_t ret = handler(irq, dev);
-   int cpu = smp_processor_id();
-   int cluster = cpu / CORES_PER_CLUSTER;
-   int other;
-
-   if (ret == IRQ_NONE) {
-
-   /* Look until we find another cpu that's online. */
-   do {
-   other = (++cpu % CORES_PER_CLUSTER) +
-   (cluster * CORES_PER_CLUSTER);
-   } while (!cpu_online(other));
-
-   irq_set_affinity(irq, cpumask_of(other));
-   }
-
-   /*
-* We should be able to get away with the amount of IRQ_NONEs we give,
-* while still having the spurious IRQ detection code kick in if the
-* interrupt really starts hitting spuriously.
-*/
-   return ret;
-}
-
-static struct arm_pmu_platdata axxia_pmu_platdata = {
-   .handle_irq = axxia_pmu_handler,
-};
-
-
 static struct platform_device pmu_device = {
.name   = arm-pmu,
.id = ARM_PMU_DEVICE_CPU,
.num_resources  = ARRAY_SIZE(axxia_pmu_resources),
.resource   = axxia_pmu_resources,
-   .dev.platform_data  = axxia_pmu_platdata,
 };
 
 static inline void
-- 
1.7.9.5

-- 
___
linux-yocto mailing list

Re: [linux-yocto] [PATCH 04/28] LSI AXM55xx: Fixed inbound data streaming ISR handling

2014-05-02 Thread Bruce Ashfield

On 14-05-02 03:16 PM, Charlie Paul wrote:

From: ningligong ning...@lsi.com

1. Fixed inbound data stream interrupt service routine to properly
handle packets received by all virtual VSID.


I don't think that we necessarily need it fixed for this commit, but as
a learning exercise, this commit has two issues.

  - We should have a description of what the improper handling was, and
what the symptoms were: device didn't work, device performance 
as low .. etc.


  - When you have a list of changes in a commit, it is a sign that it
really should have been two commits. It means that if there's an
issue with one of the changes, they all get dropped, and since we
are not familiar with the code we can't really tell what is what.

Please pass the feedback along to the developer, and if you can get
a quick turn around, an updated commit header would be ideal.

Bruce


2. Moved checking for vsid_in_use of an inbound DSE, the vsid_in_use
is only valid when other two bits are set.
Signed-off-by: ningligong ning...@lsi.com
---
  drivers/rapidio/devices/lsi/axxia-rio-ds.c |  226 
  1 file changed, 131 insertions(+), 95 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-ds.c 
b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
index 02d3751..4e55ed7 100755
--- a/drivers/rapidio/devices/lsi/axxia-rio-ds.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-ds.c
@@ -242,6 +242,7 @@ int axxia_open_ob_data_stream(
  {
struct rio_priv *priv = mport-priv;
int rc = 0;
+   struct rio_priv *priv = mport-priv;

axxia_api_lock(priv);

@@ -379,7 +380,6 @@ int open_ob_data_stream(
__rio_local_write_config_32(mport, RAB_OBDSE_DESC_ADDR(dse_id),
des_chain_start_addr_phy_low);

-
h = (ptr_ds_priv-ob_dse_irq[dse_id]);

sprintf(ptr_dse_cfg-name, obds-%d, dse_id);
@@ -451,7 +451,6 @@ int axxia_add_ob_data_stream(
int rc = 0;

/* sanity check - TBD */
-
ptr_ds_priv = (priv-ds_priv_data);

/*
@@ -693,8 +692,10 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
ptr_hdr_desc-dw0);

/* free the buffer */
-   kfree((void *)ptr_hdr_desc-virt_data_buf);
-   ptr_hdr_desc-buf_status = DS_DBUF_FREED;
+   if (ptr_hdr_desc-buf_status != DS_DBUF_FREED) {
+   kfree((void *)ptr_hdr_desc-virt_data_buf);
+   ptr_hdr_desc-buf_status = DS_DBUF_FREED;
+   }

if (ptr_dse_cfg-hdr_read_ptr ==
(ptr_dse_cfg-max_num_hdr_desc - 1)) {
@@ -725,6 +726,7 @@ void ob_dse_irq_handler(struct rio_irq_handler *h, u32 
state)
(dse_stat  0x3F));

spin_unlock_irqrestore(ptr_dse_cfg-lock, flags);
+
return;
  }

@@ -831,8 +833,8 @@ int axxia_open_ib_data_stream(
int desc_dbuf_size,
int num_entries)
  {
-   struct rio_priv *priv = mport-priv;
int rc = 0;
+   struct rio_priv *priv = mport-priv;

axxia_api_lock(priv);

@@ -1050,6 +1052,7 @@ int open_ib_data_stream(
ptr_virt_m_cfg-cos = cos;
ptr_virt_m_cfg-source_id = source_id;
ptr_virt_m_cfg-desc_dbuf_size = desc_dbuf_size;
+   ptr_virt_m_cfg-virt_vsid = virt_vsid;

desc_chain_start_addr_phy =
virt_to_phys((void *)
@@ -1125,6 +1128,10 @@ int axxia_add_ibds_buffer(
u32 m_id;
u8  found_one = RIO_DS_FALSE;
u32 vsid_addr_reg;
+   u32 vsid;
+   u16 virt_vsid;
+   u32 alias_reg;
+   u32 vsid_m_stats;

unsigned long   data_addr_phy;
u32 data_addr_hi;
@@ -1136,11 +1143,20 @@ int axxia_add_ibds_buffer(

/* search through the virtual M table to find the one that has
**  the same source_id and cos */
+   /* find the mapping between incoming VSID and internal VSID */
+   __rio_local_read_config_32(mport, RAB_IBDS_VSID_ALIAS, alias_reg);
+
+   /* VSID = {16'b SourceID, 8'bCOS} */
+   vsid = ((source_id  0x)  16) | (cos  0xFF);
+
+   /* calculate the virtual M index */
+   (void)axxio_virt_vsid_convert(vsid, alias_reg, virt_vsid);
+
+
for (m_id = 0; m_id  RIO_MAX_NUM_IBDS_VSID_M; m_id++) {
ptr_virt_m_cfg = (ptr_ds_priv-ibds_vsid_m_cfg[m_id]);

-   if ((ptr_virt_m_cfg-source_id == source_id)
-   (ptr_virt_m_cfg-cos == cos) 
+   if ((ptr_virt_m_cfg-virt_vsid == virt_vsid)
(ptr_virt_m_cfg-in_use == RIO_DS_TRUE)) {
found_one = RIO_DS_TRUE;
break;
@@ -1207,7 +1223,13 @@ int 

Re: [linux-yocto] [PATCH 05/28] LSI AXM55xx: Fixes for mailbox open bounds checks.

2014-05-02 Thread Bruce Ashfield

The same comments apply here. We should always describe the symptom of
what we are fixing.

What was broken before this change ?

Bruce

On 14-05-02 03:16 PM, Charlie Paul wrote:

From: Michael Bringmann michael.bringm...@lsi.com

Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
  drivers/rapidio/devices/lsi/axxia-rio-irq.c |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 2ffa34b..cb16281 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1013,7 +1013,7 @@ static inline int choose_ob_dme(
if (len  sz)
continue;

-   if (dme-entries = (dme-entries_in_use+1)) {
+   if (dme-entries  (dme-entries_in_use+1)) {
(*ob_dme) = dme;
(*buf_sz) = sz;
return ret + i;
@@ -1290,7 +1290,7 @@ static int open_outb_mbox(struct rio_mport *mport, void 
*dev_id, int dme_no,
u64 descChainStart, descAddr;
int buf_sz = 0;

-   if ((entries = 0) || (entries  priv-desc_max_entries))
+   if ((entries  2) || (entries  priv-desc_max_entries))
return -EINVAL;

if (test_bit(RIO_IRQ_ENABLED, h-state))
@@ -1648,7 +1648,7 @@ static int open_inb_mbox(struct rio_mport *mport, void 
*dev_id,
if ((mbox  0) || (mbox = RIO_MAX_RX_MBOX))
return -EINVAL;

-   if ((entries = 0) || (entries  priv-desc_max_entries))
+   if ((entries  2) || (entries  priv-desc_max_entries))
return -EINVAL;

h = priv-ib_dme_irq[mbox];



--
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto


Re: [linux-yocto] [PATCH 07/28] LSI AXM55xx: Fix concurrency issue for variable.

2014-05-02 Thread Bruce Ashfield

On 14-05-02 03:16 PM, Charlie Paul wrote:

From: Michael Bringmann michael.bringm...@lsi.com

Used 'atomic' counter to track available inbound messages between
interrupt and foreground code.
Also, enable both SRIO modules by default with check for SRIO link
ready status to validated the accesses.


Are these two changes related ? There's only a tenuous linkage between
the two. As such, they should be two commits.

Bruce



Signed-off-by: Michael Bringmann michael.bringm...@lsi.com
---
  arch/arm/boot/dts/axm55xx.dts   |4 ++--
  drivers/rapidio/devices/lsi/axxia-rio-irq.c |   18 --
  drivers/rapidio/devices/lsi/axxia-rio-irq.h |2 +-
  3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/arch/arm/boot/dts/axm55xx.dts b/arch/arm/boot/dts/axm55xx.dts
index 1cba111..826a6e6 100644
--- a/arch/arm/boot/dts/axm55xx.dts
+++ b/arch/arm/boot/dts/axm55xx.dts
@@ -439,7 +439,7 @@

  rio0: rapidio@0x31 {
  index = 0;
-status = disabled;
+status = okay;
  #address-cells = 2;
  #size-cells = 2;
  compatible = axxia,rapidio-delta;
@@ -454,7 +454,7 @@

  rio1: rapidio@0x314000 {
  index = 1;
-status = disabled;
+status = okay;
  #address-cells = 2;
  #size-cells = 2;
  compatible = axxia,rapidio-delta;
diff --git a/drivers/rapidio/devices/lsi/axxia-rio-irq.c 
b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
index 9879b7e..73b5a4c 100644
--- a/drivers/rapidio/devices/lsi/axxia-rio-irq.c
+++ b/drivers/rapidio/devices/lsi/axxia-rio-irq.c
@@ -1115,7 +1115,7 @@ static struct rio_msg_dme *alloc_message_engine(struct 
rio_mport *mport,
me-entries_in_use = 0;
me-write_idx = 0;
me-read_idx = 0;
-   me-pending = 0;
+   atomic_set(me-pending, 0);
me-tx_dme_tmo = 0;
me-dme_no = dme_no;

@@ -1474,6 +1474,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
u32 dw0;
int dme_no = 31 - CNTLZW(dme_mask);
int num_new;
+   int nPending;
dme_mask ^= (1  dme_no);

while (mb-me[letter]-dme_no != dme_no)
@@ -1550,7 +1551,7 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
me-write_idx = (me-write_idx + 1) %
 me-entries;
num_new++;
-   me-pending++;
+   atomic_inc(me-pending);
if (num_new == me-entries)
break;
}
@@ -1564,7 +1565,8 @@ static void ib_dme_irq_handler(struct rio_irq_handler *h, 
u32 state)
__ib_dme_event_dbg(priv, dme_no,
   1  RIO_IB_DME_RX_RING_FULL);

-   if (me-pending 
+   nPending = atomic_read(me-pending);
+   if (nPending 
mport-inb_msg[mbox_no].mcback) {

mport-inb_msg[mbox_no].mcback(mport,
@@ -2345,6 +2347,7 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
struct rio_rx_mbox *mb;
struct rio_msg_dme *me;
unsigned long iflags;
+   int nPending;
void *buf = NULL;

if ((mbox  0) || (mbox = RIO_MAX_RX_MBOX))
@@ -2371,7 +2374,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
__rio_local_write_config_32(mport, RAB_INTR_ENAB_IDME, intr);
}

-   while (me-pending) {
+   nPending = atomic_read(me-pending);
+   while (nPending) {
struct rio_msg_desc *desc = me-desc[me-read_idx];
u32 dw0, dw1;

@@ -2399,7 +2403,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
(dw0  0xff) | DME_DESC_DW0_VALID);
}
me-read_idx = (me-read_idx + 1) % me-entries;
-   me-pending--;
+   atomic_dec(me-pending);
+   nPending--;
__ib_dme_event_dbg(priv, me-dme_no,
   1  RIO_IB_DME_DESC_ERR);
} else {
@@ -2447,7 +2452,8 @@ void *axxia_get_inb_message(struct rio_mport *mport, int 
mbox, int letter,
mb-next_rx_slot = (mb-next_rx_slot + 1) %
mb-ring_size;
me-read_idx = (me-read_idx + 1) % me-entries;
-   me-pending--;
+   atomic_dec(me-pending);
+   nPending--;
goto done;
}
}
diff --git 

Re: [linux-yocto] [PATCH 24/28] LSI AXM55xx: DDR retention fixes

2014-05-02 Thread Bruce Ashfield

On 14-05-02 03:17 PM, Charlie Paul wrote:

From: Gary McGee gary.mc...@lsi.com

Added the functions to support the DDR shutdown
Fixed the quiesce TODO and added the vp engine calls
Added the calls to the DDR shutdown


Another list of changes .. this says three commits to me.

Bruce



Signed-off-by: Gary McGee gary.mc...@lsi.com
---
  arch/arm/mach-axxia/Makefile|2 +-
  arch/arm/mach-axxia/ddr_retention.c |  231 
  arch/arm/mach-axxia/ddr_shutdown.c  |  332 +++
  3 files changed, 446 insertions(+), 119 deletions(-)
  create mode 100644 arch/arm/mach-axxia/ddr_shutdown.c

diff --git a/arch/arm/mach-axxia/Makefile b/arch/arm/mach-axxia/Makefile
index 47e386b..1352c37d 100644
--- a/arch/arm/mach-axxia/Makefile
+++ b/arch/arm/mach-axxia/Makefile
@@ -7,7 +7,7 @@ obj-y   += io.o
  obj-y += ncr.o
  obj-y += timers.o
  obj-y += pci.o
-obj-y  += ddr_retention.o
+obj-y  += ddr_retention.o ddr_shutdown.o
  obj-$(CONFIG_I2C) += i2c.o
  obj-$(CONFIG_AXXIA_RIO)   += rapidio.o
  obj-$(CONFIG_SMP) += platsmp.o headsmp.o
diff --git a/arch/arm/mach-axxia/ddr_retention.c 
b/arch/arm/mach-axxia/ddr_retention.c
index 7e4687d..6429151 100644
--- a/arch/arm/mach-axxia/ddr_retention.c
+++ b/arch/arm/mach-axxia/ddr_retention.c
@@ -26,7 +26,9 @@
  #include linux/syscore_ops.h
  #include linux/proc_fs.h
  #include linux/delay.h
+#include linux/prefetch.h
  #include linux/of.h
+
  #include asm/io.h
  #include asm/cacheflush.h
  #include mach/ncr.h
@@ -36,7 +38,13 @@ static void __iomem *apb;
  static void __iomem *dickens;
  static int ddr_retention_enabled;

-unsigned long ncp_caal_regions_acp55xx[] = {
+enum {
+   AXXIA_ENGINE_CAAL,
+   AXXIA_ENGINE_CNAL
+};
+
+unsigned long
+ncp_caal_regions_acp55xx[] = {
NCP_REGION_ID(0x0b, 0x05),  /* SPPV2   */
NCP_REGION_ID(0x0c, 0x05),  /* SED */
NCP_REGION_ID(0x0e, 0x05),  /* DPI_HFA */
@@ -54,16 +62,22 @@ unsigned long ncp_caal_regions_acp55xx[] = {
NCP_REGION_ID(0x1c, 0x05),  /* PAB */
NCP_REGION_ID(0x1f, 0x05),  /* EIOAM0  */
NCP_REGION_ID(0x31, 0x05),  /* ISB */
-   NCP_REGION_ID(0x28, 0x05),  /* EIOASM0 */
-   NCP_REGION_ID(0x29, 0x05),  /* EIOASM1 */
-   NCP_REGION_ID(0x2a, 0x05),  /* EIOAS2  */
-   NCP_REGION_ID(0x2b, 0x05),  /* EIOAS3  */
-   NCP_REGION_ID(0x2c, 0x05),  /* EIOAS4  */
-   NCP_REGION_ID(0x2d, 0x05),  /* EIOAS5  */
-   NCP_REGION_ID(0x32, 0x05),  /* ISBS*/
NCP_REGION_ID(0xff, 0xff)
  };

+unsigned long
+ncp_cnal_regions_acp55xx[] = {
+   NCP_REGION_ID(0x28, 0x05), /* EIOASM0 */
+   NCP_REGION_ID(0x29, 0x05), /* EIOASM1 */
+   NCP_REGION_ID(0x2a, 0x05), /* EIOAS2  */
+   NCP_REGION_ID(0x2b, 0x05), /* EIOAS3  */
+   NCP_REGION_ID(0x2c, 0x05), /* EIOAS4  */
+   NCP_REGION_ID(0x2d, 0x05), /* EIOAS5  */
+   NCP_REGION_ID(0x32, 0x05), /* ISBS*/
+   NCP_REGION_ID(0xff, 0xff)
+};
+
+
  /*

--
flush_l3
@@ -120,23 +134,41 @@ flush_l3(void)
}

asm volatile (dsb : : : memory);
-   asm volatile (dmb : : : memory);

return;
  }

  static void
-quiesce_vp_engine(void)
+quiesce_vp_engine(int engineType)
  {
-   unsigned long   *pCnalRegions = ncp_caal_regions_acp55xx;
+   unsigned long   *pEngineRegions;
unsigned long *pRegion;
+   unsigned longortOff, owtOff;
unsigned ort, owt;
unsigned long  buf = 0;
unsigned short node, target;
int  loop;

printk(KERN_INFO quiescing VP engines...\n);
-   pRegion = pCnalRegions;
+
+   switch (engineType) {
+   case AXXIA_ENGINE_CNAL:
+   pEngineRegions = ncp_cnal_regions_acp55xx;
+   ortOff = 0x1c0;
+   owtOff = 0x1c4;
+   break;
+
+   case AXXIA_ENGINE_CAAL:
+   pEngineRegions = ncp_caal_regions_acp55xx;
+   ortOff = 0xf8;
+   owtOff = 0xfc;
+   break;
+
+   default:
+   return;
+   }
+
+   pRegion = pEngineRegions;

while (*pRegion != NCP_REGION_ID(0xff, 0xff)) {
/* set read/write transaction limits to zero */
@@ -145,15 +177,15 @@ quiesce_vp_engine(void)
pRegion++;
}

-   pRegion = pCnalRegions;
+   pRegion = pEngineRegions;
loop = 0;

while (*pRegion != NCP_REGION_ID(0xff, 0xff)) {
node = (*pRegion  0x)  16;
target = *pRegion  0x;
/* read the number of outstanding read/write 

Re: [linux-yocto] [PULL REQUEST] Kernel: 3.4 Branch: standard/axxia/base

2014-05-02 Thread Bruce Ashfield

On 14-05-02 04:16 PM, Paul, Charlie wrote:

The following changes since commit e1374b95f2b2474b37f250b61a12eb7d4c8002c8:

   Merge branch 'standard/base' into standard/axxia/base (2014-04-29
13:10:33 -0400)

are available in the git repository at:

   g...@github.com:butlerpaul/lsikernel sab-next

for you to fetch changes up to 6b4b2cce1391ea3480b0170be8aa912c5cc5426d:


merged.

Bruce



   axxia: Remove Wrapper Functions (2014-05-02 09:07:28 -0700)



Anders Berg (7):

   axxia: Fixed earlyprintk

   axxia: Define arch_is_coherent()

   ARM: 7465/1: Handle 4GB memory sizes in device tree and
mem=size@start option

   ARM: LPAE: use phys_addr_t in alloc_init_pud()

   ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM

   arm: mmu: Fixed checkpatch issues with mmu

   drivers/i2c-axxia: Support I2C_M_RECV_LEN

David Mercado (2):

   LSI AXM55xx: Enable multi-cluster wfe/sev

   LSI AXM55XX: Add PMU support

John Jacques (6):

   arch/arm/mach-axxi: Updated DDR Retention to Wokr from Interrupt
Context

   arch/arm/mach-axxia: Clear MTC Errors During Initialization

   LSI: Fix Device Tree compatible fields

   powerpc/mpic: Disable preemption when calling mpic_processor_id()

   arm/mach-axxia: Same build for HW and simlation and DDR Retention
Reset and clock init.

   axxia: Remove Wrapper Functions

Michael Bringmann (1):

   LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct
boundary, Expand valid condition.

Paul Butler (8):

   drivers/rapidio/devices: Initial Submittal of LSI rapidio

   drivers/rapidio: new files

   drivers/rapidio: modified files

   arm: rapidio updates

   powerpc: rapidio updates

   include: rapidio updates

   drivers: rapidio updates

   arm/mach-axxia: Updated PCIe driver to set PCIe

SangeethaRao (3):

   arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500
emulation

   drivers/usb: USB driver/dts on PPC was broken.

   arch/arm/mach-axxia: added support for ncr_read/ncr_write

ningligong (1):

   drivers/rapidio/lsi: squash a bunch rapidio stuff together and
Cleanup

arch/arm/Kconfig   |   19 +

arch/arm/Kconfig.debug |9 +

arch/arm/Makefile  |3 -

arch/arm/boot/dts/axm55xx.dts  |   50 +-

arch/arm/boot/dts/axm55xxemu.dts   |   21 +-

arch/arm/boot/dts/axm55xxsim.dts   |   94 +-

.../arm/boot/dts/{axm-sim.dts = axm55xxsim16.dts} |  208 +-

arch/arm/include/asm/axxia-rio.h   |  135 +

arch/arm/include/asm/rio.h |   37 +

arch/arm/include/asm/setup.h   |   14 +-

arch/arm/include/asm/spinlock.h|4 +

arch/arm/kernel/perf_event_v7.c|3 +-

arch/arm/kernel/setup.c|   70 +-

arch/arm/mach-axxia/Kconfig|3 -

arch/arm/mach-axxia/Makefile   |3 +-

arch/arm/mach-axxia/axxia-gic.c|   25 +-

arch/arm/mach-axxia/axxia.c|  123 +-

arch/arm/mach-axxia/axxia.h|2 +-

arch/arm/mach-axxia/clock.c|  185 +-

arch/arm/mach-axxia/ddr_retention.c|  300 ++-

arch/arm/mach-axxia/include/mach/debug-macro.S |   16 +-

arch/arm/mach-axxia/include/mach/hardware.h|   25 +-

arch/arm/mach-axxia/include/mach/irqs.h|1 +

arch/arm/mach-axxia/include/mach/memory.h  |   19 +

arch/arm/mach-axxia/include/mach/ncr.h |   44 +

arch/arm/mach-axxia/ncr.c  |  597 +

arch/arm/mach-axxia/pci.c  |7 +-

arch/arm/mach-axxia/platsmp.c  |  155 +-

arch/arm/mach-axxia/rapidio.c  |   68 +

arch/arm/mach-axxia/wrappers.c |  176 --

arch/arm/mm/mmu.c  |   82 +-

arch/powerpc/boot/dts/ACP344xV2.dts|   20 +-

arch/powerpc/boot/dts/acp25xx.dts  |   16 +-

arch/powerpc/boot/dts/acp342x.dts  |   21 +-

arch/powerpc/boot/dts/acp344x.dts  |   16 +-

arch/powerpc/boot/dts/lsi_acp342x.dts  |  317 +++

arch/powerpc/boot/dts/lsi_acp344x.dts  |  355 +++

arch/powerpc/include/asm/axxia-rio.h   |  107 +

arch/powerpc/include/asm/rio.h |   46 +

arch/powerpc/platforms/44x/Makefile|3 +-

arch/powerpc/platforms/44x/acprio.c|   65 +

arch/powerpc/platforms/44x/acpx1.c |1 +

arch/powerpc/sysdev/Makefile   |2 -

arch/powerpc/sysdev/lsi_acp_wrappers.c |  132 -

arch/powerpc/sysdev/lsi_pci.c   

[linux-yocto] [PULL REQUEST] Kernel: 3.4 Branch: standard/axxia/base

2014-05-02 Thread Paul, Charlie
The following changes since commit e1374b95f2b2474b37f250b61a12eb7d4c8002c8:

  Merge branch 'standard/base' into standard/axxia/base (2014-04-29 13:10:33 
-0400)

are available in the git repository at:


  g...@github.com:butlerpaul/lsikernel sab-next

for you to fetch changes up to 6b4b2cce1391ea3480b0170be8aa912c5cc5426d:

  axxia: Remove Wrapper Functions (2014-05-02 09:07:28 -0700)


Anders Berg (7):
  axxia: Fixed earlyprintk
  axxia: Define arch_is_coherent()
  ARM: 7465/1: Handle 4GB memory sizes in device tree and mem=size@start 
option
  ARM: LPAE: use phys_addr_t in alloc_init_pud()
  ARM: 7499/1: mm: Fix vmalloc overlap check for !HIGHMEM
  arm: mmu: Fixed checkpatch issues with mmu
  drivers/i2c-axxia: Support I2C_M_RECV_LEN

David Mercado (2):
  LSI AXM55xx: Enable multi-cluster wfe/sev
  LSI AXM55XX: Add PMU support

John Jacques (6):
  arch/arm/mach-axxi: Updated DDR Retention to Wokr from Interrupt Context
  arch/arm/mach-axxia: Clear MTC Errors During Initialization
  LSI: Fix Device Tree compatible fields
  powerpc/mpic: Disable preemption when calling mpic_processor_id()
  arm/mach-axxia: Same build for HW and simlation and DDR Retention Reset 
and clock init.
  axxia: Remove Wrapper Functions

Michael Bringmann (1):
  LSI AXM55XX/rapidio: Stability and bug fix improvements , Correct 
boundary, Expand valid condition.

Paul Butler (8):
  drivers/rapidio/devices: Initial Submittal of LSI rapidio
  drivers/rapidio: new files
  drivers/rapidio: modified files
  arm: rapidio updates
  powerpc: rapidio updates
  include: rapidio updates
  drivers: rapidio updates
  arm/mach-axxia: Updated PCIe driver to set PCIe

SangeethaRao (3):
  arch/powerpc/sysdev: Fixed PCIe enumeration issue on AXM3500 emulation
  drivers/usb: USB driver/dts on PPC was broken.
  arch/arm/mach-axxia: added support for ncr_read/ncr_write

ningligong (1):
  drivers/rapidio/lsi: squash a bunch rapidio stuff together and Cleanup

arch/arm/Kconfig   |   19 +
arch/arm/Kconfig.debug |9 +
arch/arm/Makefile  |3 -
arch/arm/boot/dts/axm55xx.dts  |   50 +-
arch/arm/boot/dts/axm55xxemu.dts   |   21 +-
arch/arm/boot/dts/axm55xxsim.dts   |   94 +-
.../arm/boot/dts/{axm-sim.dts = axm55xxsim16.dts} |  208 +-
arch/arm/include/asm/axxia-rio.h   |  135 +
arch/arm/include/asm/rio.h |   37 +
arch/arm/include/asm/setup.h   |   14 +-
arch/arm/include/asm/spinlock.h|4 +
arch/arm/kernel/perf_event_v7.c|3 +-
arch/arm/kernel/setup.c|   70 +-
arch/arm/mach-axxia/Kconfig|3 -
arch/arm/mach-axxia/Makefile   |3 +-
arch/arm/mach-axxia/axxia-gic.c|   25 +-
arch/arm/mach-axxia/axxia.c|  123 +-
arch/arm/mach-axxia/axxia.h|2 +-
arch/arm/mach-axxia/clock.c|  185 +-
arch/arm/mach-axxia/ddr_retention.c|  300 ++-
arch/arm/mach-axxia/include/mach/debug-macro.S |   16 +-
arch/arm/mach-axxia/include/mach/hardware.h|   25 +-
arch/arm/mach-axxia/include/mach/irqs.h|1 +
arch/arm/mach-axxia/include/mach/memory.h  |   19 +
arch/arm/mach-axxia/include/mach/ncr.h |   44 +
arch/arm/mach-axxia/ncr.c  |  597 +
arch/arm/mach-axxia/pci.c  |7 +-
arch/arm/mach-axxia/platsmp.c  |  155 +-
arch/arm/mach-axxia/rapidio.c  |   68 +
arch/arm/mach-axxia/wrappers.c |  176 --
arch/arm/mm/mmu.c  |   82 +-
arch/powerpc/boot/dts/ACP344xV2.dts|   20 +-
arch/powerpc/boot/dts/acp25xx.dts  |   16 +-
arch/powerpc/boot/dts/acp342x.dts  |   21 +-
arch/powerpc/boot/dts/acp344x.dts  |   16 +-
arch/powerpc/boot/dts/lsi_acp342x.dts  |  317 +++
arch/powerpc/boot/dts/lsi_acp344x.dts  |  355 +++
arch/powerpc/include/asm/axxia-rio.h   |  107 +
arch/powerpc/include/asm/rio.h |   46 +
arch/powerpc/platforms/44x/Makefile|3 +-
arch/powerpc/platforms/44x/acprio.c|   65 +
arch/powerpc/platforms/44x/acpx1.c |1 +
arch/powerpc/sysdev/Makefile   |2 -
arch/powerpc/sysdev/lsi_acp_wrappers.c |  132 -
arch/powerpc/sysdev/lsi_pci.c  |   19 +-
arch/powerpc/sysdev/mpic.c |  119 +-
drivers/i2c/busses/i2c-axxia.c |  193 +-

Re: [linux-yocto] [PATCH 1/1] mei.cfg: enable Intel chipsets

2014-05-02 Thread Kamble, Nitin A


On 4/25/2014 8:51 AM, Hart, Darren wrote:

On 4/24/14, 18:42, Kamble, Nitin A nitin.a.kam...@intel.com wrote:


From: Nitin A Kamble nitin.a.kam...@intel.com

Enable Intel Chipsets in the AMT/MEI driver.

Signed-off-by: Nitin A Kamble nitin.a.kam...@intel.com

Acked-by: Darren Hart dvh...@linux.intel.com

Hi Bruce,
Can you pull this fix in the v3.10 kernel repository as well?

Thanks,
Nitin





---
meta/cfg/kernel-cache/features/amt/mei/mei.cfg | 1 +
1 file changed, 1 insertion(+)

diff --git a/meta/cfg/kernel-cache/features/amt/mei/mei.cfg
b/meta/cfg/kernel-cache/features/amt/mei/mei.cfg
index c1c2ace..313084b 100644
--- a/meta/cfg/kernel-cache/features/amt/mei/mei.cfg
+++ b/meta/cfg/kernel-cache/features/amt/mei/mei.cfg
@@ -1,3 +1,4 @@
CONFIG_STAGING=y
CONFIG_WATCHDOG_CORE=y
CONFIG_INTEL_MEI=y
+CONFIG_INTEL_MEI_ME=y
--
1.8.1.4






--
___
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto