Re: Finding source code for Linaro kernels

2012-01-24 Thread Dave Martin
Hi again,

After a report of yet another instance of un-findable source for a
kernel released from a landing team, it would be good if we could move
forward with this.

Does anyone have any significant disagreements with the proposal
below?

If not, I can try to write up a formal specification somewhere.

Can we then plan to implement it?


If anyone has any preference for the common prefix for tag names,
please speak up (otherwise we will proceed with the ubuntu/ prefix).

Cheers
---Dave

On Fri, Jan 13, 2012 at 01:32:35PM +, Dave Martin wrote:
 For everyone who packages kernel trees:
 
 
 I've had some questions about getting the source for linaro kernel
 packaged, and it seems that this is still not straightforward:
 
 Getting the debian package source (i.e., flat tarball) for a binary
 kernel is possible, but only if it is a non-superseded version.
 
 Working out which source package you need is non-obvious (You have to
 check for installed kernel packages, and guess which source package
 you need, based on that.  Non-linaro folks may not understand the
 difference between the various meta- and real kernel packages and may
 get pretty confused along the way.)
 
 Finding the git tree and the relevant commit to reproduce the source
 (including that for superseded kernels) is hard or impossible.  It
 requires guesswork and/or specific knowledge about the way the
 relevant team manages their trees.  For some platforms, it looks like
 there may be no single tree containing the packaged kernel at all, in
 which case you would also need more guesswork and/or scripts or help
 from the relevant landing team in order actually to reproduce a
 release.
 
 Am I correct in these conclusions?
 
 
 If so, here's a proposal -- I welcome people's comments (and please do
 say if any of these problems are actually solved already!):
 
 
 For every binary kernel package (.deb) publicly released by any linaro
 team, including those produced by the platform team and the landing
 teams:
 
 
 1) The source package's control file must contain a Vcs-Git entry
 
 
 2) The Vcs-Git entry must reference a git tree which contains the
 _exact_ source code which appears in the source package.
 
  * Such a tree must exist and must be publicly readable.  It does not
 have to be on git.linaro.org (though this is the recommended place).
 
  * Referring to git://git.linaro.org/ubuntu/linux-linaro.git is not
 acceptable, unless that repo is populated with the real source for
 that specific kernel as well as the packaging.
 
  * Manufacturing the source package from the contents of multiple
 repositories or branches at source package upload time is not
 acceptable, unless the result is also recorded as a tagged commit in
 the repository referenced by the Vcs-Git entry in the debian/control
 file contained in that same commit.  The commit must have full
 history: importing tarballs directly into a repository for the purpose
 of release tagging is not acceptable.
 
  * Referring to a tree which does not contain the whole contents of
 the debian source package (for example, debian/ and other packaging
 files/dirs are missing) is not acceptable.

Note: this means that the released binary packages must be reproducible
from the tagged source using standard package build mechanisms, to the
extent that the exact versions of build tools and other build-time
dependencies used to build the originally released binaries are still
avilable.

 
 
 3) Tagging of packaged kernels must be done in a standard way.
 
  * I recommend source package name_package version, matching the
 Source field of debian/control and the version number of the most
 recent debian/changelog entry respectively (which must both be present
 in the repository as a consequence of (2)).  If we want to avoid
 namespace pollution, we probably want to add a prefix such as debian/
 or ubuntu/ to the tag name to indicate that the tag describes the
 source for a published .deb package.  If so, we must standardise that
 prefix so that it is identical in all out trees.
 
  * Tree maintainers are of course free to add any other additional
 tags for their own use if they want to.
 
 All teams already do release tagging of some sort, but the lack of
 consistency creates difficulties when anyone from outside the team
 tries to understand that team's trees.
 
  * We _could_ standardise the following, but it is not essential:
 
 * ubuntu/release: The tagged source for the _original_ kernel
 which was distributed in release (where release is a linaro
 monthly release such as 11.12 or 12.01)
 
 
 4) No specific branch naming requirements exist.
 
  * Release tags do not necessarily need to appear on any branch.
 
  * We _could_ standardise the following, but it is not essential:
 
 * ubuntu/latest - the tagged packaged source for the most recent
 kernel release made from this tree
 
 
 (In the above, we could choose a diferent prefix instead of ubuntu/,
 but as described in (3) ,this should 

Re: Release frequency: a discussion for Linaro Connect Q1.12?

2012-01-24 Thread James Tunnicliffe
Hi Grégoire,

Thanks for the mail. I am just a grunt here but I hope I am not too
far off the mark with my replies. No doubt any mistakes will be
corrected!

On 23 January 2012 19:06, Gregoire Gentil grego...@gentil.com wrote:
 I'm Grégoire Gentil, the founder of Always Innovating. I intend to
 participate to Linaro Connect Q1.12 though I'm not part of this
 organization. I follow the work of Linaro and I find it very interesting
 for our OMAP-based products such as the HDMI Dongle:
 http://www.alwaysinnovating.com.

 I don't know if it's the right forum or if such discussion has already
 taken place, but there is one point that I would like to raise up:
 release frequency. Linaro is currently on a one-month period, which is
 very tight. To my mind, such small period presents two disadvantages,
 long-term perspective and innovation:

 - if there is a new release every month, it's hard to know which release
 is *very* stable and should be used by an external company which might
 not have the same frenzy to update all the time.

There recently was a thread about how monthly releases, hopefully it
will be infomative:
http://lists.linaro.org/pipermail/linaro-dev/2012-January/009625.html

As part of our release process we ask people to try out our builds, in
fact our latest call for testing just went out:
http://lists.linaro.org/pipermail/linaro-dev/2012-January/009810.html

We would welcome more eyes on our builds.

 - Regarding innovation, Linaro might learn from the Ubuntu experience.
 Mark Shuttleworth was a strong advocate of the strict Ubuntu short
 release schedule and he admitted later that a too frequent period
 prevents from innovating. When you are pressed by a schedule, it's hard
 for the organization to step back and take the time to break-through on
 a novel approach.

If short releases prevent long term software engineering projects from
happening, then that is a problem. We try and avoid this by having
monthly releases where changes are only released when they are ready.
Since we release monthly, this reduces the pressure to rush a feature
for a particular release (probably reducing its quality) since another
release will happen shortly after.

 The point of my email is not to convince Linaro to change the current
 situation but to bring an idea for a complementary approach at least for
 the first point:

 for instance, let's imagine a Linaro super-stable once sometimes
 release. Right now, people are desperately looking for a good ICS
 image - read Pandaboard groups if you are not convinced -, and ICS won't
 change that much during the year. Perhaps there will be a 4.1 but when
 you are doing a commercial product, you don't need the latest of the
 latest and you certainly don't want to change your build process every
 month. If there was a good ICS release today, I think that it would be
 a major blockbuster for a lot of companies following Linaro. I'm
 mentioning the Android example because it's what people want today, but
 tomorrow it might be Meego or whatever. I'm not saying to stick to
 Google schedule, it's just an example of what is trendy today and would
 deserve long-term stable bits.

 To go one step beyond in my thinking, I'm not advocating for a new
 separate *strict* longer schedule. The idea might be more to have *A*
 milestone release from time-to-time, after something major is out
 (Android release, new ARM cortex), and Linaro decides that this next
 monthly release should be a major one, very polished, very stable and
 it's properly supported and advertised with clear wiki and updates for
 security or critical problems.

There is a discussion on our release process at the next connect:
https://blueprints.launchpad.net/linaro-project-management/+spec/linaro-general-release-process-improvements-lcq4.11

I hope that some of this information helps,

-- 
James Tunnicliffe

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Staging Android kernel sources

2012-01-24 Thread Frederik Lotter
Dear Linaro,

I am using the image from your staging distribution or ICS Android:
http://releases.linaro.org/11.12/android/images/staging-panda/

I would like to build the latest Streamline gator driver, and gatord daemon. I 
had a look at the GIT repo but I am afraid this is too complex for me to find 
what I need (http://git.linaro.org/gitweb).

(1) Could you please advise where I would find the matching kernel (a) sources 
and (b) config for Panda?

---

On a similar note, I am also running the latest Ubuntu (Panda) distribution. I 
was recently updated to kernel version v3.1.1.8 (linaro-lt-omap) using 
update-manager.

(2) Could you also help me to find the sources for this version (or any version 
used in the Linaro Ubuntu distributions for that matter). If there is a way to 
apt-get the sources that would be very useful to know as well.

Any help would be much appreciated.

Best Regards,
Frederik Lotter

**
Frederik Lotter, Application Engineer at ARM Ltd.
UK Support Team:+44 (0)1223 400600
US Support Team:+1 512 381 2928 110
Direct Dial:+44 (0)1223 400549
Email..:frederik.lot...@arm.com
**



-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Sources for 11.11 kernel release

2012-01-24 Thread Christian Robottom Reis
On Tue, Jan 24, 2012 at 09:29:34AM -0500, Chris Lalancette wrote:
 (I'm aware that there is a thread on linaro-dev discussing this
 exact topic; this is a request for specific information, so I
 decided to start a new thread)
 
 Hello,
  As has been pointed out elsewhere, it is very difficult to find
 the exact git tree that corresponds to a kernel release.  Currently
 the problem I am having is that the 11.11 linaro kernel release
 (linux-linaro-lt-omap_3.1.0-1402.5~oneiric1) works well on my new
 board, but later kernels do not.  While I can download the kernel
 tarball for 3.1.0-1402.5 from launchpad, I would much prefer to use
 the git tree that it was produced from.  Can anybody tell me exactly
 which git tree was used to create that kernel, and which tag/branch
 I should be looking at?

That's a really good question. The answer is that it's this tag and
branch:

linux-release-2011-12
http://git.linaro.org/git/landing-teams/leb/ti/kernel.git

However, I think there should be a natural way for you to find that out
as well. How could we package this metadata so you'd find it easily?
-- 
Christian Robottom Reis, Engineering VP
Brazil (GMT-3) | [+55] 16 9112 6430 | [+1] 612 216 4935
Linaro.org: Open Source Software for ARM SoCs

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Sources for 11.11 kernel release

2012-01-24 Thread Christian Robottom Reis
On Tue, Jan 24, 2012 at 12:59:33PM -0200, Christian Robottom Reis wrote:
 On Tue, Jan 24, 2012 at 09:29:34AM -0500, Chris Lalancette wrote:
  (I'm aware that there is a thread on linaro-dev discussing this
  exact topic; this is a request for specific information, so I
  decided to start a new thread)
  
  Hello,
   As has been pointed out elsewhere, it is very difficult to find
  the exact git tree that corresponds to a kernel release.  Currently
  the problem I am having is that the 11.11 linaro kernel release
  (linux-linaro-lt-omap_3.1.0-1402.5~oneiric1) works well on my new
  board, but later kernels do not.  While I can download the kernel
  tarball for 3.1.0-1402.5 from launchpad, I would much prefer to use
  the git tree that it was produced from.  Can anybody tell me exactly
  which git tree was used to create that kernel, and which tag/branch
  I should be looking at?
 
 That's a really good question. The answer is that it's this tag and
 branch:
 
 linux-release-2011-12
 http://git.linaro.org/git/landing-teams/leb/ti/kernel.git

Sorry, for 11.11 that's tag linux-release-2011-11-1 -- you can see all
the tags here:

http://git.linaro.org/gitweb?p=landing-teams/leb/ti/kernel.git;a=summary
-- 
Christian Robottom Reis, Engineering VP
Brazil (GMT-3) | [+55] 16 9112 6430 | [+1] 612 216 4935
Linaro.org: Open Source Software for ARM SoCs

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Sources for 11.11 kernel release

2012-01-24 Thread Zygmunt Krynicki
This is a recap of the discussion we did about source meta data for
packages. While interesting it was fruitless, nothing has happened.
I'd like to propose to put lava-friendly meta data in:
/usr/share/lava/{srcpackagename}/source.json

The file should look like this (for bzr-based projects)

{
branch_revision: 93556,
branch_url: lp:gcc-linaro/4.4,
branch_vcs: bzr,
commit_timestamp: 2010-09-07T14:49:43Z,
project_name: linaro-gcc
}

And like this for git-based projects

{
branch_revision: 69f19fbedf6b88eb314b22f1263e2624d4477ac8,
branch_url: 
git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git,
branch_vcs: git,
commit_timestamp: 2011-11-23T14:15:50Z,
project_name: linux
}

If needed we can add support for svn (although I'd prefer to work with
a bzr-svn import on launchpad in that case).
The field commit_timestamp can be removed. It is optional and can be
resolved automatically assuming the repository is still alive. Still
it is highly recommended to include this information directly.
The field project_name should refer to a launchpad project (when using
bzr branches) or to a consistently-named upstream project (otherwise).

I'm not saying this will help to solve OPs problem but at least it
will feed LAVA with loads of meta-information about source that runs
on the tested boards. If someone likes this format it could be adopted
by other tools.

Best regards
Zygmunt Krynicki


On Tue, Jan 24, 2012 at 4:01 PM, Christian Robottom Reis
k...@linaro.org wrote:
 On Tue, Jan 24, 2012 at 12:59:33PM -0200, Christian Robottom Reis wrote:
 On Tue, Jan 24, 2012 at 09:29:34AM -0500, Chris Lalancette wrote:
  (I'm aware that there is a thread on linaro-dev discussing this
  exact topic; this is a request for specific information, so I
  decided to start a new thread)
 
  Hello,
       As has been pointed out elsewhere, it is very difficult to find
  the exact git tree that corresponds to a kernel release.  Currently
  the problem I am having is that the 11.11 linaro kernel release
  (linux-linaro-lt-omap_3.1.0-1402.5~oneiric1) works well on my new
  board, but later kernels do not.  While I can download the kernel
  tarball for 3.1.0-1402.5 from launchpad, I would much prefer to use
  the git tree that it was produced from.  Can anybody tell me exactly
  which git tree was used to create that kernel, and which tag/branch
  I should be looking at?

 That's a really good question. The answer is that it's this tag and
 branch:

     linux-release-2011-12
     http://git.linaro.org/git/landing-teams/leb/ti/kernel.git

 Sorry, for 11.11 that's tag linux-release-2011-11-1 -- you can see all
 the tags here:

    http://git.linaro.org/gitweb?p=landing-teams/leb/ti/kernel.git;a=summary
 --
 Christian Robottom Reis, Engineering VP
 Brazil (GMT-3) | [+55] 16 9112 6430 | [+1] 612 216 4935
 Linaro.org: Open Source Software for ARM SoCs

 ___
 linaro-dev mailing list
 linaro-dev@lists.linaro.org
 http://lists.linaro.org/mailman/listinfo/linaro-dev

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Staging Android kernel sources

2012-01-24 Thread Andy Doan
On 01/24/2012 05:19 AM, Frederik Lotter wrote:
 Dear Linaro,
 
 I am using the image from your staging distribution or ICS Android:
 http://releases.linaro.org/11.12/android/images/staging-panda/
 
 I would like to build the latest Streamline gator driver, and gatord daemon. 
 I had a look at the GIT repo but I am afraid this is too complex for me to 
 find what I need (http://git.linaro.org/gitweb).
 
 (1) Could you please advise where I would find the matching kernel (a) 
 sources and (b) config for Panda?

The link you shared above includes a pinned manifest. This is
basically a list of all git repos used to create that build and the
commit they were based on. In this case the kernel was:

 project name=people/andygreen/repo-branch-archive path=kernel
remote=linaro-other revision=0ccecd278c7b7a02be09469fa33717327bf7d4ed/

which gets you to this kernel:

 
http://git.linaro.org/gitweb?p=people/andygreen/repo-branch-archive.git;a=shortlog;h=refs/heads/tilt-android-3.1-0ccecd278c7b7a02be09469fa33717327bf7d4ed


The kernel config is generated with something like:
 make O=tmp ARCH=arm defconfig android_omap4_defconfig


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Sources for 11.11 kernel release

2012-01-24 Thread Chris Lalancette

On 01/24/2012 10:01 AM, Christian Robottom Reis wrote:

On Tue, Jan 24, 2012 at 12:59:33PM -0200, Christian Robottom Reis wrote:

On Tue, Jan 24, 2012 at 09:29:34AM -0500, Chris Lalancette wrote:

(I'm aware that there is a thread on linaro-dev discussing this
exact topic; this is a request for specific information, so I
decided to start a new thread)

Hello,
  As has been pointed out elsewhere, it is very difficult to find
the exact git tree that corresponds to a kernel release.  Currently
the problem I am having is that the 11.11 linaro kernel release
(linux-linaro-lt-omap_3.1.0-1402.5~oneiric1) works well on my new
board, but later kernels do not.  While I can download the kernel
tarball for 3.1.0-1402.5 from launchpad, I would much prefer to use
the git tree that it was produced from.  Can anybody tell me exactly
which git tree was used to create that kernel, and which tag/branch
I should be looking at?


That's a really good question. The answer is that it's this tag and
branch:

 linux-release-2011-12
 http://git.linaro.org/git/landing-teams/leb/ti/kernel.git


Sorry, for 11.11 that's tag linux-release-2011-11-1 -- you can see all
the tags here:

 http://git.linaro.org/gitweb?p=landing-teams/leb/ti/kernel.git;a=summary


Thanks, that is enormously helpful.  Though doing a diff -Nurp between 
leb/ti/kernel.git (tag linux-release-2011-11-1) and the tarball that I 
pulled from launchpad 
(https://launchpad.net/~linaro-maintainers/+archive/overlay/+files/linux-linaro-lt-omap_3.1.0-1402.5%7Eoneiric1.tar.gz), 
these two trees aren't exactly the same.  They are *mostly* the same, 
and most of the changes look like they'll be benign to me, but it is a 
bit disconcerting.


In terms of finding things in the future, I have to say that there is a 
bit of a forest of git trees in linaro.  At the very least, I would make 
sure that the .dsc file in the released deb points to the correct 
tree+tag that it was generated from.  Beyond that, I would recommend:


1)  Attempt to reduce the number of trees on git.linaro.org.  I 
understand that there is probably a lot going on, but the sheer number 
of trees makes it confusing.  It might be a good idea to remove some of 
the very stale or no longer active trees.


2)  Document on the wiki where the releases are built from, so there is 
a running record per release


Thanks again,
--
Chris Lalancette

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Sources for 11.11 kernel release

2012-01-24 Thread Andy Doan
On 01/24/2012 09:50 AM, Chris Lalancette wrote:
 
 Thanks, that is enormously helpful.  Though doing a diff -Nurp between
 leb/ti/kernel.git (tag linux-release-2011-11-1) and the tarball that I
 pulled from launchpad
 (https://launchpad.net/~linaro-maintainers/+archive/overlay/+files/linux-linaro-lt-omap_3.1.0-1402.5%7Eoneiric1.tar.gz),
 these two trees aren't exactly the same.  They are *mostly* the same,
 and most of the changes look like they'll be benign to me, but it is a
 bit disconcerting.

I think the difference you see here is because
linux-linaro-lt-omap_3.1.0-1402.5%7Eoneiric1.tar.gz includes debian
packaging and ubuntu sauce patches. I believe those come from:

 http://git.linaro.org/gitweb?p=ubuntu/linux-linaro-oneiric.git;a=summary

However, I don't know how you find the proper commit in that repo that
correlates to the tarball.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: Release frequency: a discussion for Linaro Connect Q1.12?

2012-01-24 Thread Zach Pfeffer
On 23 January 2012 13:06, Gregoire Gentil grego...@gentil.com wrote:

 Hello,

 I'm Grégoire Gentil, the founder of Always Innovating. I intend to
 participate to Linaro Connect Q1.12 though I'm not part of this
 organization. I follow the work of Linaro and I find it very interesting
 for our OMAP-based products such as the HDMI Dongle:
 http://www.alwaysinnovating.com.

 I don't know if it's the right forum or if such discussion has already
 taken place, but there is one point that I would like to raise up:
 release frequency. Linaro is currently on a one-month period, which is
 very tight. To my mind, such small period presents two disadvantages,
 long-term perspective and innovation:

 - if there is a new release every month, it's hard to know which release
 is *very* stable and should be used by an external company which might
 not have the same frenzy to update all the time.

 - Regarding innovation, Linaro might learn from the Ubuntu experience.
 Mark Shuttleworth was a strong advocate of the strict Ubuntu short
 release schedule and he admitted later that a too frequent period
 prevents from innovating. When you are pressed by a schedule, it's hard
 for the organization to step back and take the time to break-through on
 a novel approach.

 The point of my email is not to convince Linaro to change the current
 situation but to bring an idea for a complementary approach at least for
 the first point:

 for instance, let's imagine a Linaro super-stable once sometimes
 release. Right now, people are desperately looking for a good ICS
 image - read Pandaboard groups if you are not convinced -, and ICS won't
 change that much during the year. Perhaps there will be a 4.1 but when
 you are doing a commercial product, you don't need the latest of the
 latest and you certainly don't want to change your build process every
 month. If there was a good ICS release today, I think that it would be
 a major blockbuster for a lot of companies following Linaro. I'm
 mentioning the Android example because it's what people want today, but
 tomorrow it might be Meego or whatever. I'm not saying to stick to
 Google schedule, it's just an example of what is trendy today and would
 deserve long-term stable bits.

 To go one step beyond in my thinking, I'm not advocating for a new
 separate *strict* longer schedule. The idea might be more to have *A*
 milestone release from time-to-time, after something major is out
 (Android release, new ARM cortex), and Linaro decides that this next
 monthly release should be a major one, very polished, very stable and
 it's properly supported and advertised with clear wiki and updates for
 security or critical problems.

 The point of my email was not to criticize the very interesting work of
 Linaro but to give an external point of view. Let me know if Linaro has
 already done some thoughts about this topic, and if such discussion can
 occur formally or informally at the coming Connect event.


Thanks for the input Grégoire.

I think released based software engineering is akin to manufacturing
before the industrial revolution. Before the industrial revolution, skilled
craftsman would work diligently to release a quilt, car, beer (still
better hand-crafted), etc... As work was broken down into discrete steps
and those steps were placed into an assembly line manufactures were able to
hire many more less-skilled workers at a lower cost and were able to
increase their industrial output by orders of magnitude. This brought the
cost of luxury items down to a point where most everyone could afford
them.

Software is following the same trajectory. It used to be that software was
one big monolith, developed by an extremely well skilled craftsperson. As
we've built compilers, OS's, web-frameworks, etc... the skill level has
gone down. This had led to an increase in the amount of software that can
be developed and has brought the cost of software down so that everyone can
enjoy it.

The other thing that led to the mechanization of manufacturing
was standardization. Back in olden days, people wrote proprietary code and
sold that code. Many people wrote and sold code, and pushed divergent
standards. When someone wanted to use one piece of code with another they
had a hard time doing it because they were trying to integrate big things
that we're meant to work together. With the opensource revolution, code was
now relatively free and plentiful and generally worked well together
because it had to, if your code didn't play well with others it wasn't
really used. As opensource software has proliferated and has been further
refined it has given developers and software manufactures a plentiful
supply of standardized components that they can fit together easily. This
has further pushed the mechanization of software engineering because the
smaller standardized modules could be further refined by individual teams.

As all of these modules come together into the software assembly line they
are typically 

Re: Finding source code for Linaro kernels

2012-01-24 Thread Dave Martin
On Tue, Jan 24, 2012 at 11:34:51AM +, Lee Jones wrote:
 All released kernel source is available on git.linaro.org.
 
 Specifically:
   Git:
 git://git.linaro.org/landing-teams/leb/landing_team/kernel.git
   HTML:
 http://git.linaro.org/git/landing-teams/leb/landing_team/kernel.git
   Gitweb:
 
 http://git.linaro.org/gitweb?p=landing-teams/leb/landing_team/kernel.git;a=summary
 
 The Gitweb has a description of what you can expect from each tag.


Good, but I fear it's not enough.

The question was never whether the source exists somewhere in
infospace, but whether a linaro consumer can find it and make use of it.
Lets see how they get on in this typical scenario:


Suppose we have a board with linaro that we set up a while ago.
We are experiencing some issues, and want to turn on some instrumentation
in the kernel and/or add some patches of their own.  This means we would
like to reconfigure/change and rebuild the kernel that we have installed.


1) We know how to get source code on Ubuntu: run apt-get source

But, that specific package version may have disappeared from the server
(Fixable by running apt-get upgrade, but then we get more problems ...
see (4))

or

We get some source, but it's not for the expected kernel version
(See 
http://ppa.launchpad.net/linaro-landing-team-samsung/linaro-samsung/ubuntu/pool/main/l/linux-origen/linux-origen_3.0.0-1000.0samsung22.tar.gz
It's actuall a 3.0.4 kernel.  This may be a local mispackaging problem,
but it's still wrong.)

or

We get some source, and it's the right version, but it's not much
use to us because we might have some git branches we want to merge before
building, so we really want to see the git repo, not a tarball.


2) apt-get source told us this package was in Git (via the Vcs-Git tag)
at git://git.linaro.org/jcrigby/linux-linaro.git

But there is no such tree.


3) Feeling lucky, we fish about on git.linaro.org for alternatives

There's a bewildering variety of possible kernel trees for every platform:

e.g., for samsung:

http://git.linaro.org/gitweb?p=landing-teams/leb/samsung/kernel.git;a=summary
http://git.linaro.org/gitweb?p=landing-teams/working/samsung/kernel.git;a=summary
http://git.linaro.org/gitweb?p=people/angus/linux-samsung.git;a=summary
http://git.linaro.org/gitweb?p=people/tushar/linux-linaro-samsung.git;a=summary

How do we know which one to look at?

I look at one with a tag matching my kernel version.  I find none, except
in generic trees that don't appear to be connected with my platform.


4) OK, we received a rumour about where the actual correct tree is,
or just made a lucky guess let's try:

http://git.linaro.org/gitweb?p=landing-teams/leb/samsung/kernel.git;a=summary

The tree is nicely tagged with linaro releases.

But, we have no idea which release the installed kernel relates to,
because we a) forgot, or b) ran apt-get upgrade to solve a disappeared-
source problem in step (1), in which case the correspondence between
installed packages and linaro releases has become indeterminate --
we are not linaro/ubuntu/debian experts, so we don't realise this is
the case, but will just spend time searching for wrong things.

After somehow finding the kernel source for the release we installed
and finding it doesn't match because we upgraded at some point...

...we only have the package name and version number to go on, because
that's what debian/ubuntu packages have to identify them.  Packages are
not intrinsically mapped to a release; only the converse is true.

But, there is nothing in the git repository or package metadata to
indicate how binary package versions map back to releases.


5) OK, we guessed or were told the correct release tag, and proceed to
rebuild the binary packages.

The debian/ directory isn't in any of these repositories, so we
can't build binary packages.  Neither the build scripts or the kernel
config are there.


To finally build valid binary packages, we need the appropriately-
tagged debian*/ directories.  And not just any ones, but those used
for the release.


The chance of a linaro consumer making it from start to end of that
process without falling over is minimal, and in my experience, it
doesn't happen.

I think (hopefully) that my proposal robustly fixes this, but if it
can be achieved more easily, I'm eager to know how.

Cheers
---Dave


 On 24/01/12 10:18, Dave Martin wrote:
  Hi again,
  
  After a report of yet another instance of un-findable source for a
  kernel released from a landing team, it would be good if we could move
  forward with this.
  
  Does anyone have any significant disagreements with the proposal
  below?
  
  If not, I can try to write up a formal specification somewhere.
  
  Can we then plan to implement it?
  
  
  If anyone has any preference for the common prefix for tag names,
  please speak up (otherwise we will proceed with the ubuntu/ prefix).
  
  Cheers
  ---Dave
  
  On Fri, Jan 13, 2012 at 01:32:35PM +, Dave Martin wrote:
  

Re: Finding source code for Linaro kernels

2012-01-24 Thread Zach Pfeffer
On 24 January 2012 13:32, Dave Martin dave.mar...@linaro.org wrote:

 On Tue, Jan 24, 2012 at 11:34:51AM +, Lee Jones wrote:
  All released kernel source is available on git.linaro.org.
 
  Specifically:
Git:
  git://git.linaro.org/landing-teams/leb/landing_team/kernel.git
HTML:
  http://git.linaro.org/git/landing-teams/leb/
 landing_team/kernel.git
Gitweb:
  http://git.linaro.org/gitweb?p=landing-teams/leb/
 landing_team/kernel.git;a=summary
 
  The Gitweb has a description of what you can expect from each tag.


 Good, but I fear it's not enough.

 The question was never whether the source exists somewhere in
 infospace, but whether a linaro consumer can find it and make use of it.
 Lets see how they get on in this typical scenario:


 Suppose we have a board with linaro that we set up a while ago.
 We are experiencing some issues, and want to turn on some instrumentation
 in the kernel and/or add some patches of their own.  This means we would
 like to reconfigure/change and rebuild the kernel that we have installed.


 1) We know how to get source code on Ubuntu: run apt-get source

 But, that specific package version may have disappeared from the server
 (Fixable by running apt-get upgrade, but then we get more problems ...
 see (4))

or

 We get some source, but it's not for the expected kernel version
 (See
 http://ppa.launchpad.net/linaro-landing-team-samsung/linaro-samsung/ubuntu/pool/main/l/linux-origen/linux-origen_3.0.0-1000.0samsung22.tar.gz
 It's actuall a 3.0.4 kernel.  This may be a local mispackaging problem,
 but it's still wrong.)

or

 We get some source, and it's the right version, but it's not much
 use to us because we might have some git branches we want to merge before
 building, so we really want to see the git repo, not a tarball.


 2) apt-get source told us this package was in Git (via the Vcs-Git tag)
 at git://git.linaro.org/jcrigby/linux-linaro.git

 But there is no such tree.


 3) Feeling lucky, we fish about on git.linaro.org for alternatives

 There's a bewildering variety of possible kernel trees for every platform:

 e.g., for samsung:


 http://git.linaro.org/gitweb?p=landing-teams/leb/samsung/kernel.git;a=summary

 http://git.linaro.org/gitweb?p=landing-teams/working/samsung/kernel.git;a=summary
 http://git.linaro.org/gitweb?p=people/angus/linux-samsung.git;a=summary

 http://git.linaro.org/gitweb?p=people/tushar/linux-linaro-samsung.git;a=summary

 How do we know which one to look at?

 I look at one with a tag matching my kernel version.  I find none, except
 in generic trees that don't appear to be connected with my platform.


 4) OK, we received a rumour about where the actual correct tree is,
 or just made a lucky guess let's try:


 http://git.linaro.org/gitweb?p=landing-teams/leb/samsung/kernel.git;a=summary

 The tree is nicely tagged with linaro releases.

 But, we have no idea which release the installed kernel relates to,
 because we a) forgot, or b) ran apt-get upgrade to solve a disappeared-
 source problem in step (1), in which case the correspondence between
 installed packages and linaro releases has become indeterminate --
 we are not linaro/ubuntu/debian experts, so we don't realise this is
 the case, but will just spend time searching for wrong things.

 After somehow finding the kernel source for the release we installed
 and finding it doesn't match because we upgraded at some point...

 ...we only have the package name and version number to go on, because
 that's what debian/ubuntu packages have to identify them.  Packages are
 not intrinsically mapped to a release; only the converse is true.

 But, there is nothing in the git repository or package metadata to
 indicate how binary package versions map back to releases.


 5) OK, we guessed or were told the correct release tag, and proceed to
 rebuild the binary packages.

 The debian/ directory isn't in any of these repositories, so we
 can't build binary packages.  Neither the build scripts or the kernel
 config are there.


 To finally build valid binary packages, we need the appropriately-
 tagged debian*/ directories.  And not just any ones, but those used
 for the release.


 The chance of a linaro consumer making it from start to end of that
 process without falling over is minimal, and in my experience, it
 doesn't happen.

 I think (hopefully) that my proposal robustly fixes this, but if it
 can be achieved more easily, I'm eager to know how.


For Android we have:

https://android-build.linaro.org/builds/~linaro-android/panda-12.01-release/

we should have the same thing for Ubuntu:

ubuntu-build.linaro.org

with the similar information.




 Cheers
 ---Dave


  On 24/01/12 10:18, Dave Martin wrote:
   Hi again,
  
   After a report of yet another instance of un-findable source for a
   kernel released from a landing team, it would be good if we could move
   forward with this.
  
   Does anyone have any significant disagreements with the 

Re: Ubuntu LEB 12.01 RC images

2012-01-24 Thread John Rigby
the panda results page it view only for me, I'm sure I must be doing
something wrong

On Mon, Jan 23, 2012 at 1:58 PM, Ricardo Salveti
ricardo.salv...@linaro.org wrote:
 Hey folks,

 Just like to announce the Ubuntu LEB 12.01 RC images, and the pointers
 for people that want to check the testing progress and such (or even
 helping testing them).

 Currently we're tracking our test cases at
 https://wiki.linaro.org/Platform/QA/TestCases/Ubuntu (most of them
 requires manual effort at the moment, but we're improving that with
 LAVA in the following weeks). If you think about any other important
 test case that we might be missing here, please let me know and we can
 add it at our testing cycle.

 You can find all the 12.01 RC builds (for all boards and image
 flavors) at http://snapshots.linaro.org/oneiric/, with build id
 20120123-1.

 For our four main boards we also have a testing spreadsheet, were we
 publish the official release testing, done by the dev plat engineers.
 You can find the links at
 https://wiki.linaro.org/Platform/DevPlatform/Testing (note that you
 can find the bug reports from the test cases by looking at the QA page
 tag links).

 Fathi will be coordinating all respin requests in the next following
 days at linaro-release m-l, and the final image will be published this
 thursday, at releases.linaro.org.

 Please also be sure to publish any bug report with the RC images
 against https://launchpad.net/linaro-ubuntu, or just contact us at
 #linaro @ freenode
 (https://wiki.linaro.org/MeetTheTeam#Developer_Platform).

 Thanks,
 --
 Ricardo Salveti de Araujo

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH] hrtimers, timers: eliminate some jiffies-backed code

2012-01-24 Thread john stultz
On Mon, 2012-01-23 at 19:40 +0400, Dmitry Antipov wrote:
 This patch provides an attempt to get away from jiffies in msleep()
 and msleep_interruptible() to hrtimers-backed usleep_range() and
 usleep_range_interruptible(). Both of the latter now returns an amount
 of microseconds really spent in sleep; another rationale for this
 was to convert msleep()-based wait-for-hardware loops to usleep_range(),
 like this:
 
 unsigned long timeout = jiffies + msecs_to_jiffies(1000);
 while (hw_is_not_ready()) {
   if (time_after(jiffies, timeout))
   return -ETIMEDOUT;
   msleep(1);
 }
 
 to:
 
 unsigned long timeout = 0;
 while (hw_is_not_ready()) {
   if (timeout  USEC_PER_SEC)
 return -ETIMEDOUT;
   timeout += usleep_range(500, 1500);
 }
 
 Signed-off-by: Dmitry Antipov dmitry.anti...@linaro.org

So I'm still a little foggy on what actual benefit this change brings.

Why do you want to move loops like the above from jiffies based timeouts
to hrtimers?

Is there an actual need for sub-jiffy granularity in these sorts of
timeouts?

Or is this really just a getting away from using jiffies cleanup?


 diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
 index fd0dc30..01d782b 100644
 --- a/include/linux/hrtimer.h
 +++ b/include/linux/hrtimer.h
 @@ -126,6 +126,7 @@ struct hrtimer {
   * task is set to NULL, when the timer expires.
   */
  struct hrtimer_sleeper {
 + ktime_t kt;

kt? Please use a better name here, as the function of that value is
opaque on initial reading.

   struct hrtimer timer;
   struct task_struct *task;
  };
 @@ -428,9 +429,10 @@ extern long hrtimer_nanosleep_restart(struct 
 restart_block *restart_block);
  extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
struct task_struct *tsk);
 
 -extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta,
 - const enum hrtimer_mode mode);
 -extern int schedule_hrtimeout_range_clock(ktime_t *expires,
 +extern int schedule_hrtimeout_range(ktime_t *expires, ktime_t *elapsed,
 + unsigned long delta,
 + const enum hrtimer_mode mode);

Another silly nit, but is it just me, or does having elapsed as the
second argument in-between the expiration and the slack seem awkward?


 diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
 index ae34bf5..8642c3f 100644
 --- a/kernel/hrtimer.c
 +++ b/kernel/hrtimer.c
 @@ -1475,6 +1475,12 @@ static enum hrtimer_restart hrtimer_wakeup(struct 
 hrtimer *timer)
   struct hrtimer_sleeper *t =
   container_of(timer, struct hrtimer_sleeper, timer);
   struct task_struct *task = t-task;
 + struct hrtimer_clock_base *base;
 + unsigned long flags;
 +
 + base = lock_hrtimer_base(timer, flags);
 + t-kt = ktime_sub(base-get_time(), t-kt);
 + unlock_hrtimer_base(timer, flags);


Calling get_time() again on each hrtimer_wakeup isn't free. 

With this we end up when the irq fires, calling hrtimer_interrupt, which
reads the time and goes through the timer list running expired timers,
which then runs the sleeper's timer which then reads the time again!
Additinoally, this extra overhead is done even no one wants the elapsed
time.

Personally, given the above, I'm not sure what the benefit of of your
implementation over just doing something like the following where
necessary:

u64 now = ktime_get();
u64 timeout = ktime_to_ns(now) + NSEC_PER_SEC;
while (hw_is_not_ready()) {
if (now  timeout)
return -ETIMEDOUT;
usleep_range(500, 1500);
now = ktime_get();
}

If you could rework it so you're not calling gettime any additional
times, but still providing the same elapsed sleep time, then it would
atleast have the benefit of an improvement over my example here.

thanks
-john


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4 3/4] EXYNOS: Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
Hi,
There are some changes in previous patch set.

 diff --git a/board/samsung/smdk5250/smdk5250.c 
 b/board/samsung/smdk5250/smdk5250.c
 new file mode 100644
 index 000..2684620
 --- /dev/null
 +++ b/board/samsung/smdk5250/smdk5250.c
 @@ -0,0 +1,152 @@
 +/*
 + * Copyright (C) 2011 Samsung Electronics
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * 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 common.h
 +#include asm/io.h
 +#include netdev.h
 +#include asm/arch/cpu.h
 +#include asm/arch/gpio.h
 +#include asm/arch/mmc.h
 +#include asm/arch/sromc.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +struct exynos5_gpio_part1 *gpio1;
 +
 +int board_init(void)
 +{
 +       gpio1 = (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1();
 +
 +       gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
 +       return 0;
 +}
 +
 +int dram_init(void)
 +{
 +       gd-ram_size    = get_ram_size((long *)PHYS_SDRAM_1, 
 PHYS_SDRAM_1_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_2, 
 PHYS_SDRAM_2_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_3, 
 PHYS_SDRAM_3_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_4, 
 PHYS_SDRAM_4_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_5, 
 PHYS_SDRAM_7_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_6, 
 PHYS_SDRAM_7_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_7, 
 PHYS_SDRAM_7_SIZE)
 +                       + get_ram_size((long *)PHYS_SDRAM_8, 
 PHYS_SDRAM_8_SIZE);
 +       return 0;
 +}
 +
 +void dram_init_banksize(void)
 +{
 +       gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
 +       gd-bd-bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, \
 +                                                       PHYS_SDRAM_1_SIZE);
 +       gd-bd-bi_dram[1].start = PHYS_SDRAM_2;
 +       gd-bd-bi_dram[1].size = get_ram_size((long *)PHYS_SDRAM_2, \
 +                                                       PHYS_SDRAM_2_SIZE);
 +       gd-bd-bi_dram[2].start = PHYS_SDRAM_3;
 +       gd-bd-bi_dram[2].size = get_ram_size((long *)PHYS_SDRAM_3, \
 +                                                       PHYS_SDRAM_3_SIZE);
 +       gd-bd-bi_dram[3].start = PHYS_SDRAM_4;
 +       gd-bd-bi_dram[3].size = get_ram_size((long *)PHYS_SDRAM_4, \
 +                                                       PHYS_SDRAM_4_SIZE);
 +       gd-bd-bi_dram[4].start = PHYS_SDRAM_5;
 +       gd-bd-bi_dram[4].size = get_ram_size((long *)PHYS_SDRAM_5, \
 +                                                       PHYS_SDRAM_5_SIZE);
 +       gd-bd-bi_dram[5].start = PHYS_SDRAM_6;
 +       gd-bd-bi_dram[5].size = get_ram_size((long *)PHYS_SDRAM_6, \
 +                                                       PHYS_SDRAM_6_SIZE);
 +       gd-bd-bi_dram[6].start = PHYS_SDRAM_7;
 +       gd-bd-bi_dram[6].size = get_ram_size((long *)PHYS_SDRAM_7, \
 +                                                       PHYS_SDRAM_7_SIZE);
 +       gd-bd-bi_dram[7].start = PHYS_SDRAM_8;
 +       gd-bd-bi_dram[7].size = get_ram_size((long *)PHYS_SDRAM_8, \
 +                                                       PHYS_SDRAM_8_SIZE);
 +}
 +
 +#ifdef CONFIG_DISPLAY_BOARDINFO
 +int checkboard(void)
 +{
 +       printf(\nBoard: SMDK5250\n);
 +
 +       return 0;
 +}
 +#endif
 +
 +#ifdef CONFIG_GENERIC_MMC
 +int board_mmc_init(bd_t *bis)
 +{
 +       int i, err;
 +
 +       /*
 +        * MMC2 SD card GPIO:
 +        *
 +        * GPC2[0]      SD_2_CLK(2)
 +        * GPC2[1]      SD_2_CMD(2)
 +        * GPC2[2]      SD_2_CDn
 +        * GPC2[3:6]    SD_2_DATA[0:3](2)
 +        */
 +       for (i = 0; i  7; i++) {
 +               /* GPC2[0:6] special function 2 */
 +               s5p_gpio_cfg_pin(gpio1-c2, i, GPIO_FUNC(0x2));
 +
 +               /* GPK2[0:6] drv 4x */
 +               s5p_gpio_set_drv(gpio1-c2, i, GPIO_DRV_4X);
 +
 +               /* GPK2[0:1] pull disable */
 +               if (i == 0 || i == 1) {
 +                       s5p_gpio_set_pull(gpio1-c2, i, GPIO_PULL_NONE);
 +                       continue;
 +               }
 +
 +               /* GPK2[2:6] pull up */
 +               s5p_gpio_set_pull(gpio1-c2, i, GPIO_PULL_UP);
 +       }
 +
 +       err = s5p_mmc_init(2, 4);
 +       return err;
 +}
 +#endif

[PATCH v5 0/4] Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
This patchset add support for Samsung's SMDK5250 board based on
EXYNOS5250 based SoC. It also adds support for MMC SPL booting.

The porting is done by Samsung engineers at HQ in System LSI Team.
I am contributing in upstreaming the code for the board.

Based upon discussions following patches are dropped in this version:
Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards
Exynos: Clock.c: Replace exynos4 prefix with exynos

SMDK5250: enable device tree support is squashed with
EXYNOS: Add SMDK5250 board support

Chander Kashyap (4):
  Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro
  ARM: EXYNOS: Add support for Exynos5 based SoCs
  EXYNOS: Add SMDK5250 board support
  EXYNOS: SMDK5250: Add MMC SPL support

 MAINTAINERS   |1 +
 arch/arm/cpu/armv7/exynos/clock.c |  214 ++-
 arch/arm/include/asm/arch-exynos/clock.h  |  326 
 arch/arm/include/asm/arch-exynos/cpu.h|   35 ++-
 arch/arm/include/asm/arch-exynos/dmc.h|  146 +++
 arch/arm/include/asm/arch-exynos/gpio.h   |   99 +-
 arch/arm/include/asm/arch-exynos/tzpc.h   |   52 +++
 board/samsung/smdk5250/Makefile   |   67 
 board/samsung/smdk5250/clock_init.c   |  202 ++
 board/samsung/smdk5250/dmc_init.c |  508 +
 board/samsung/smdk5250/lowlevel_init.S|   96 +
 board/samsung/smdk5250/mmc_boot.c |   58 +++
 board/samsung/smdk5250/setup.h|  353 +
 board/samsung/smdk5250/smdk5250.c |  150 
 board/samsung/smdk5250/tools/mkexynos_image.c |  117 ++
 board/samsung/smdk5250/tzpc_init.c|   48 +++
 boards.cfg|1 +
 include/configs/s5pc210_universal.h   |1 +
 include/configs/smdk5250.h|  202 ++
 include/configs/trats.h   |1 +
 20 files changed, 2660 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-exynos/dmc.h
 create mode 100644 arch/arm/include/asm/arch-exynos/tzpc.h
 create mode 100644 board/samsung/smdk5250/Makefile
 create mode 100644 board/samsung/smdk5250/clock_init.c
 create mode 100644 board/samsung/smdk5250/dmc_init.c
 create mode 100644 board/samsung/smdk5250/lowlevel_init.S
 create mode 100644 board/samsung/smdk5250/mmc_boot.c
 create mode 100644 board/samsung/smdk5250/setup.h
 create mode 100644 board/samsung/smdk5250/smdk5250.c
 create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c
 create mode 100644 board/samsung/smdk5250/tzpc_init.c
 create mode 100644 include/configs/smdk5250.h

-- 
1.7.5.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v5 1/4] Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro

2012-01-24 Thread Chander Kashyap
CONFIG_SYS_CLK_FREQ_C210 macro giving notion of S5PC2XX (Exynos4)
architecture. Replace CONFIG_SYS_CLK_FREQ_C210 with CONFIG_SYS_CLK_FREQ
to make it generic for exynos architecture.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- None
Changes for v3:
- None
Changes for V4:
- Added CONFIG_SYS_CLK_FREQ to trats.h
Changes for v5:
- None

 arch/arm/cpu/armv7/exynos/clock.c   |6 +-
 include/configs/s5pc210_universal.h |1 +
 include/configs/trats.h |1 +
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
b/arch/arm/cpu/armv7/exynos/clock.c
index 0c199cd..4d92c53 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -26,10 +26,6 @@
 #include asm/arch/clock.h
 #include asm/arch/clk.h
 
-#ifndef CONFIG_SYS_CLK_FREQ_C210
-#define CONFIG_SYS_CLK_FREQ_C210   2400
-#endif
-
 /* exynos4: return pll clock frequency */
 static unsigned long exynos4_get_pll_clk(int pllreg)
 {
@@ -76,7 +72,7 @@ static unsigned long exynos4_get_pll_clk(int pllreg)
/* SDIV [2:0] */
s = r  0x7;
 
-   freq = CONFIG_SYS_CLK_FREQ_C210;
+   freq = CONFIG_SYS_CLK_FREQ;
 
if (pllreg == EPLL) {
k = k  0x;
diff --git a/include/configs/s5pc210_universal.h 
b/include/configs/s5pc210_universal.h
index be000cb..8286680 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -49,6 +49,7 @@
 
 /* input clock of PLL: Universal has 24MHz input clock at EXYNOS4210 */
 #define CONFIG_SYS_CLK_FREQ_C210   2400
+#define CONFIG_SYS_CLK_FREQCONFIG_SYS_CLK_FREQ_C210
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
diff --git a/include/configs/trats.h b/include/configs/trats.h
index acb3241..10f11d9 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -49,6 +49,7 @@
 
 /* input clock of PLL: TRATS has 24MHz input clock at EXYNOS4210 */
 #define CONFIG_SYS_CLK_FREQ_C210   2400
+#define CONFIG_SYS_CLK_FREQCONFIG_SYS_CLK_FREQ_C210
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
-- 
1.7.5.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v5 2/4] ARM: EXYNOS: Add support for Exynos5 based SoCs

2012-01-24 Thread Chander Kashyap
Samsung's ARM Cortex-A15 based SoCs are known as Exynos5 series of
SoCs. This patch adds the support for Exynos5.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- This patch was part of EXYNOS: Add SMDK5250 board support
- Now it is seprated as SoC support.
Changes for v3:
- Populated complete exynos5 gpio structures
Changes for v4:
- Added dmc.h and tzpc.h header files
- Renamed EXYNOS5_PHY*_CTRL_BASE to EXYNOS5_DMC_PHY*_BASE
Changes for v5:
- None

 arch/arm/cpu/armv7/exynos/clock.c|  208 +++-
 arch/arm/include/asm/arch-exynos/clock.h |  326 ++
 arch/arm/include/asm/arch-exynos/cpu.h   |   35 +++-
 arch/arm/include/asm/arch-exynos/dmc.h   |  146 +
 arch/arm/include/asm/arch-exynos/gpio.h  |   99 +-
 arch/arm/include/asm/arch-exynos/tzpc.h  |   52 +
 6 files changed, 854 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-exynos/dmc.h
 create mode 100644 arch/arm/include/asm/arch-exynos/tzpc.h

diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
b/arch/arm/cpu/armv7/exynos/clock.c
index 4d92c53..2f7048b 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -92,6 +92,72 @@ static unsigned long exynos4_get_pll_clk(int pllreg)
return fout;
 }
 
+/* exynos5: return pll clock frequency */
+static unsigned long exynos5_get_pll_clk(int pllreg)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long r, m, p, s, k = 0, mask, fout;
+   unsigned int freq;
+
+   switch (pllreg) {
+   case APLL:
+   r = readl(clk-apll_con0);
+   break;
+   case MPLL:
+   r = readl(clk-mpll_con0);
+   break;
+   case EPLL:
+   r = readl(clk-epll_con0);
+   k = readl(clk-epll_con1);
+   break;
+   case VPLL:
+   r = readl(clk-vpll_con0);
+   k = readl(clk-vpll_con1);
+   break;
+   default:
+   printf(Unsupported PLL (%d)\n, pllreg);
+   return 0;
+   }
+
+   /*
+* APLL_CON: MIDV [25:16]
+* MPLL_CON: MIDV [25:16]
+* EPLL_CON: MIDV [24:16]
+* VPLL_CON: MIDV [24:16]
+*/
+   if (pllreg == APLL || pllreg == MPLL)
+   mask = 0x3ff;
+   else
+   mask = 0x1ff;
+
+   m = (r  16)  mask;
+
+   /* PDIV [13:8] */
+   p = (r  8)  0x3f;
+   /* SDIV [2:0] */
+   s = r  0x7;
+
+   freq = CONFIG_SYS_CLK_FREQ;
+
+   if (pllreg == EPLL) {
+   k = k  0x;
+   /* FOUT = (MDIV + K / 65536) * FIN / (PDIV * 2^SDIV) */
+   fout = (m + k / 65536) * (freq / (p * (1  s)));
+   } else if (pllreg == VPLL) {
+   k = k  0xfff;
+   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
+   fout = (m + k / 1024) * (freq / (p * (1  s)));
+   } else {
+   if (s  1)
+   s = 1;
+   /* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
+   fout = m * (freq / (p * (1  (s - 1;
+   }
+
+   return fout;
+}
+
 /* exynos4: return ARM clock frequency */
 static unsigned long exynos4_get_arm_clk(void)
 {
@@ -114,6 +180,28 @@ static unsigned long exynos4_get_arm_clk(void)
return armclk;
 }
 
+/* exynos5: return ARM clock frequency */
+static unsigned long exynos5_get_arm_clk(void)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long div;
+   unsigned long armclk;
+   unsigned int arm_ratio;
+   unsigned int arm2_ratio;
+
+   div = readl(clk-div_cpu0);
+
+   /* ARM_RATIO: [2:0], ARM2_RATIO: [30:28] */
+   arm_ratio = (div  0)  0x7;
+   arm2_ratio = (div  28)  0x7;
+
+   armclk = get_pll_clk(APLL) / (arm_ratio + 1);
+   armclk /= (arm2_ratio + 1);
+
+   return armclk;
+}
+
 /* exynos4: return pwm clock frequency */
 static unsigned long exynos4_get_pwm_clk(void)
 {
@@ -157,6 +245,27 @@ static unsigned long exynos4_get_pwm_clk(void)
return pclk;
 }
 
+/* exynos5: return pwm clock frequency */
+static unsigned long exynos5_get_pwm_clk(void)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long pclk, sclk;
+   unsigned int ratio;
+
+   /*
+* CLK_DIV_PERIC3
+* PWM_RATIO [3:0]
+*/
+   ratio = readl(clk-div_peric3);
+   ratio = ratio  0xf;
+   sclk = get_pll_clk(MPLL);
+
+   pclk = sclk / (ratio + 1);
+
+   return pclk;
+}
+
 /* exynos4: return uart clock frequency */
 static unsigned long exynos4_get_uart_clk(int dev_index)
 {
@@ -204,6 +313,53 @@ static unsigned long exynos4_get_uart_clk(int dev_index)
return uclk;
 }
 
+/* 

[PATCH v5 4/4] EXYNOS: SMDK5250: Add MMC SPL support

2012-01-24 Thread Chander Kashyap
This patch adds support for MMC SPL booting.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- None
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- None

 board/samsung/smdk5250/Makefile   |   16 
 board/samsung/smdk5250/mmc_boot.c |   58 
 board/samsung/smdk5250/tools/mkexynos_image.c |  117 +
 include/configs/smdk5250.h|6 +-
 4 files changed, 196 insertions(+), 1 deletions(-)
 create mode 100644 board/samsung/smdk5250/mmc_boot.c
 create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c

diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
index d9c2774..908ce5b 100644
--- a/board/samsung/smdk5250/Makefile
+++ b/board/samsung/smdk5250/Makefile
@@ -29,18 +29,34 @@ SOBJS   := lowlevel_init.o
 COBJS  := clock_init.o
 COBJS  += dmc_init.o
 COBJS  += tzpc_init.o
+
+ifndef CONFIG_SPL_BUILD
 COBJS  += smdk5250.o
+endif
+
+ifdef CONFIG_SPL_BUILD
+COBJS  += mmc_boot.o
+endif
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
 
 ALL:=   $(obj).depend $(LIB)
 
+ifdef CONFIG_SPL_BUILD
+ALL+= $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
 all:   $(ALL)
 
 $(LIB):$(OBJS)
$(call cmd_link_o_target, $(OBJS))
 
+ifdef CONFIG_SPL_BUILD
+$(OBJTREE)/tools/mk$(BOARD)spl:tools/mkexynos_image.c
+   $(HOSTCC) tools/mkexynos_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
 #
 
 # defines $(obj).depend target
diff --git a/board/samsung/smdk5250/mmc_boot.c 
b/board/samsung/smdk5250/mmc_boot.c
new file mode 100644
index 000..669c1a3
--- /dev/null
+++ b/board/samsung/smdk5250/mmc_boot.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#includecommon.h
+#includeconfig.h
+
+/*
+* Copy U-boot from mmc to RAM:
+* COPY_BL2_FNPTR_ADDR: Address in iRAM, which Contains
+* Pointer to API (Data transfer from mmc to ram)
+*/
+void copy_uboot_to_ram(void)
+{
+   u32 (*copy_bl2)(u32, u32, u32) = (void *) *(u32 *)COPY_BL2_FNPTR_ADDR;
+
+   copy_bl2(BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE);
+}
+
+void board_init_f(unsigned long bootflag)
+{
+   __attribute__((noreturn)) void (*uboot)(void);
+   copy_uboot_to_ram();
+
+   /* Jump to U-Boot image */
+   uboot = (void *)CONFIG_SYS_TEXT_BASE;
+   (*uboot)();
+   /* Never returns Here */
+}
+
+/* Place Holders */
+void board_init_r(gd_t *id, ulong dest_addr)
+{
+   /* Function attribute is no-return */
+   /* This Function never executes */
+   while (1)
+   ;
+}
+
+void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) {}
diff --git a/board/samsung/smdk5250/tools/mkexynos_image.c 
b/board/samsung/smdk5250/tools/mkexynos_image.c
new file mode 100644
index 000..e2b7805
--- /dev/null
+++ b/board/samsung/smdk5250/tools/mkexynos_image.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 stdio.h
+#include stdlib.h
+#include unistd.h
+#include fcntl.h
+#include errno.h
+#include string.h
+#include sys/stat.h
+
+#define CHECKSUM_OFFSET(14*1024-4)
+#define BUFSIZE(16*1024)
+#define FILE_PERM 

[PATCH v5 3/4] EXYNOS: Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
SMDK5250 board is based on Samsungs EXYNOS5250 SoC.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- This patch is bifurcated into borad support and SoC support
- Fixed typo: s/EEYNOS/EXYNOS
- Squashed patch SMDK5250: enable device tree support in this.
Changes for v3:
- None
Changes for v4:
- Converted assembly routines for clock, memory, uart and tzpc
- init to c functions
- Moved uart init to smdk5250.c
Changes for v5:
- Remove initof gpio1
- Fixed gpio configuration for uart

 MAINTAINERS|1 +
 board/samsung/smdk5250/Makefile|   51 
 board/samsung/smdk5250/clock_init.c|  202 +
 board/samsung/smdk5250/dmc_init.c  |  508 
 board/samsung/smdk5250/lowlevel_init.S |   96 ++
 board/samsung/smdk5250/setup.h |  353 ++
 board/samsung/smdk5250/smdk5250.c  |  150 ++
 board/samsung/smdk5250/tzpc_init.c |   48 +++
 boards.cfg |1 +
 include/configs/smdk5250.h |  198 +
 10 files changed, 1608 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdk5250/Makefile
 create mode 100644 board/samsung/smdk5250/clock_init.c
 create mode 100644 board/samsung/smdk5250/dmc_init.c
 create mode 100644 board/samsung/smdk5250/lowlevel_init.S
 create mode 100644 board/samsung/smdk5250/setup.h
 create mode 100644 board/samsung/smdk5250/smdk5250.c
 create mode 100644 board/samsung/smdk5250/tzpc_init.c
 create mode 100644 include/configs/smdk5250.h

diff --git a/MAINTAINERS b/MAINTAINERS
index acbd7f1..c03ebb4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -713,6 +713,7 @@ Chander Kashyap k.chan...@samsung.com
 
origen  ARM ARMV7 (EXYNOS4210 SoC)
SMDKV310ARM ARMV7 (EXYNOS4210 SoC)
+   SMDK5250ARM ARMV7 (EXYNOS5250 SoC)
 
 Heungjun Kim riverful@samsung.com
 
diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
new file mode 100644
index 000..d9c2774
--- /dev/null
+++ b/board/samsung/smdk5250/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2011 Samsung Electronics
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+SOBJS  := lowlevel_init.o
+
+COBJS  := clock_init.o
+COBJS  += dmc_init.o
+COBJS  += tzpc_init.o
+COBJS  += smdk5250.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+ALL:=   $(obj).depend $(LIB)
+
+all:   $(ALL)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/samsung/smdk5250/clock_init.c 
b/board/samsung/smdk5250/clock_init.c
new file mode 100644
index 000..2b53a47
--- /dev/null
+++ b/board/samsung/smdk5250/clock_init.c
@@ -0,0 +1,202 @@
+/*
+ * Clock setup for SMDK5250 board based on EXYNOS5
+ *
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 config.h
+#include version.h
+#include asm/io.h
+#include asm/arch/clock.h
+#include asm/arch/cpu.h
+#include asm/arch/gpio.h
+#include 

Re: Ubuntu LEB 12.01 RC images

2012-01-24 Thread Ricardo Salveti
On Tue, Jan 24, 2012 at 9:46 PM, John Rigby john.ri...@linaro.org wrote:
 the panda results page it view only for me, I'm sure I must be doing
 something wrong

Could be the multiple login issue with the google services. The first
time I tried opening the origen spreadsheet I was logged as
rsalv...@gmail.com instead of ricardo.salv...@linaro.org, so I had to
switch accounts to have write access.

Another thing you could do is to request write access again, and we
could simply authorize you, if that's the issue (but I just confirmed
that you should have access).

Cheers,
-- 
Ricardo Salveti de Araujo

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v5 0/4] Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
Hi,
Please ignore this patch set i will resend it.

On 25 January 2012 10:12, Chander Kashyap chander.kash...@linaro.org wrote:
 This patchset add support for Samsung's SMDK5250 board based on
 EXYNOS5250 based SoC. It also adds support for MMC SPL booting.

 The porting is done by Samsung engineers at HQ in System LSI Team.
 I am contributing in upstreaming the code for the board.

 Based upon discussions following patches are dropped in this version:
 Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards
 Exynos: Clock.c: Replace exynos4 prefix with exynos

 SMDK5250: enable device tree support is squashed with
 EXYNOS: Add SMDK5250 board support

 Chander Kashyap (4):
  Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro
  ARM: EXYNOS: Add support for Exynos5 based SoCs
  EXYNOS: Add SMDK5250 board support
  EXYNOS: SMDK5250: Add MMC SPL support

  MAINTAINERS                                   |    1 +
  arch/arm/cpu/armv7/exynos/clock.c             |  214 ++-
  arch/arm/include/asm/arch-exynos/clock.h      |  326 
  arch/arm/include/asm/arch-exynos/cpu.h        |   35 ++-
  arch/arm/include/asm/arch-exynos/dmc.h        |  146 +++
  arch/arm/include/asm/arch-exynos/gpio.h       |   99 +-
  arch/arm/include/asm/arch-exynos/tzpc.h       |   52 +++
  board/samsung/smdk5250/Makefile               |   67 
  board/samsung/smdk5250/clock_init.c           |  202 ++
  board/samsung/smdk5250/dmc_init.c             |  508 
 +
  board/samsung/smdk5250/lowlevel_init.S        |   96 +
  board/samsung/smdk5250/mmc_boot.c             |   58 +++
  board/samsung/smdk5250/setup.h                |  353 +
  board/samsung/smdk5250/smdk5250.c             |  150 
  board/samsung/smdk5250/tools/mkexynos_image.c |  117 ++
  board/samsung/smdk5250/tzpc_init.c            |   48 +++
  boards.cfg                                    |    1 +
  include/configs/s5pc210_universal.h           |    1 +
  include/configs/smdk5250.h                    |  202 ++
  include/configs/trats.h                       |    1 +
  20 files changed, 2660 insertions(+), 17 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-exynos/dmc.h
  create mode 100644 arch/arm/include/asm/arch-exynos/tzpc.h
  create mode 100644 board/samsung/smdk5250/Makefile
  create mode 100644 board/samsung/smdk5250/clock_init.c
  create mode 100644 board/samsung/smdk5250/dmc_init.c
  create mode 100644 board/samsung/smdk5250/lowlevel_init.S
  create mode 100644 board/samsung/smdk5250/mmc_boot.c
  create mode 100644 board/samsung/smdk5250/setup.h
  create mode 100644 board/samsung/smdk5250/smdk5250.c
  create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c
  create mode 100644 board/samsung/smdk5250/tzpc_init.c
  create mode 100644 include/configs/smdk5250.h

 --
 1.7.5.4




-- 
with warm regards,
Chander Kashyap

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v6 1/4] Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro

2012-01-24 Thread Chander Kashyap
CONFIG_SYS_CLK_FREQ_C210 macro giving notion of S5PC2XX (Exynos4)
architecture. Replace CONFIG_SYS_CLK_FREQ_C210 with CONFIG_SYS_CLK_FREQ
to make it generic for exynos architecture.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- None
Changes for v3:
- None
Changes for V4:
- Added CONFIG_SYS_CLK_FREQ to trats.h
Changes for v5:
- None
Changes for v6:
- None

 arch/arm/cpu/armv7/exynos/clock.c   |6 +-
 include/configs/s5pc210_universal.h |1 +
 include/configs/trats.h |1 +
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
b/arch/arm/cpu/armv7/exynos/clock.c
index 0c199cd..4d92c53 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -26,10 +26,6 @@
 #include asm/arch/clock.h
 #include asm/arch/clk.h
 
-#ifndef CONFIG_SYS_CLK_FREQ_C210
-#define CONFIG_SYS_CLK_FREQ_C210   2400
-#endif
-
 /* exynos4: return pll clock frequency */
 static unsigned long exynos4_get_pll_clk(int pllreg)
 {
@@ -76,7 +72,7 @@ static unsigned long exynos4_get_pll_clk(int pllreg)
/* SDIV [2:0] */
s = r  0x7;
 
-   freq = CONFIG_SYS_CLK_FREQ_C210;
+   freq = CONFIG_SYS_CLK_FREQ;
 
if (pllreg == EPLL) {
k = k  0x;
diff --git a/include/configs/s5pc210_universal.h 
b/include/configs/s5pc210_universal.h
index be000cb..8286680 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -49,6 +49,7 @@
 
 /* input clock of PLL: Universal has 24MHz input clock at EXYNOS4210 */
 #define CONFIG_SYS_CLK_FREQ_C210   2400
+#define CONFIG_SYS_CLK_FREQCONFIG_SYS_CLK_FREQ_C210
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
diff --git a/include/configs/trats.h b/include/configs/trats.h
index acb3241..10f11d9 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -49,6 +49,7 @@
 
 /* input clock of PLL: TRATS has 24MHz input clock at EXYNOS4210 */
 #define CONFIG_SYS_CLK_FREQ_C210   2400
+#define CONFIG_SYS_CLK_FREQCONFIG_SYS_CLK_FREQ_C210
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
-- 
1.7.5.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v6 0/4] Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
This patchset add support for Samsung's SMDK5250 board based on
EXYNOS5250 based SoC. It also adds support for MMC SPL booting.

The porting is done by Samsung engineers at HQ in System LSI Team.
I am contributing in upstreaming the code for the board.

Based upon discussions following patches are dropped in this version:
Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards
Exynos: Clock.c: Replace exynos4 prefix with exynos

SMDK5250: enable device tree support is squashed with
EXYNOS: Add SMDK5250 board support

Chander Kashyap (4):
  Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro
  ARM: EXYNOS: Add support for Exynos5 based SoCs
  EXYNOS: Add SMDK5250 board support
  EXYNOS: SMDK5250: Add MMC SPL support

 MAINTAINERS   |1 +
 arch/arm/cpu/armv7/exynos/clock.c |  214 ++-
 arch/arm/include/asm/arch-exynos/clock.h  |  326 
 arch/arm/include/asm/arch-exynos/cpu.h|   35 ++-
 arch/arm/include/asm/arch-exynos/dmc.h|  146 +++
 arch/arm/include/asm/arch-exynos/gpio.h   |   99 +-
 arch/arm/include/asm/arch-exynos/tzpc.h   |   52 +++
 board/samsung/smdk5250/Makefile   |   67 
 board/samsung/smdk5250/clock_init.c   |  202 ++
 board/samsung/smdk5250/dmc_init.c |  508 +
 board/samsung/smdk5250/lowlevel_init.S|   96 +
 board/samsung/smdk5250/mmc_boot.c |   58 +++
 board/samsung/smdk5250/setup.h|  353 +
 board/samsung/smdk5250/smdk5250.c |  152 
 board/samsung/smdk5250/tools/mkexynos_image.c |  117 ++
 board/samsung/smdk5250/tzpc_init.c|   48 +++
 boards.cfg|1 +
 include/configs/s5pc210_universal.h   |1 +
 include/configs/smdk5250.h|  202 ++
 include/configs/trats.h   |1 +
 20 files changed, 2662 insertions(+), 17 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-exynos/dmc.h
 create mode 100644 arch/arm/include/asm/arch-exynos/tzpc.h
 create mode 100644 board/samsung/smdk5250/Makefile
 create mode 100644 board/samsung/smdk5250/clock_init.c
 create mode 100644 board/samsung/smdk5250/dmc_init.c
 create mode 100644 board/samsung/smdk5250/lowlevel_init.S
 create mode 100644 board/samsung/smdk5250/mmc_boot.c
 create mode 100644 board/samsung/smdk5250/setup.h
 create mode 100644 board/samsung/smdk5250/smdk5250.c
 create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c
 create mode 100644 board/samsung/smdk5250/tzpc_init.c
 create mode 100644 include/configs/smdk5250.h

-- 
1.7.5.4


___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v6 4/4] EXYNOS: SMDK5250: Add MMC SPL support

2012-01-24 Thread Chander Kashyap
This patch adds support for MMC SPL booting.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- None
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- None
Changes for v5:
- None

 board/samsung/smdk5250/Makefile   |   16 
 board/samsung/smdk5250/mmc_boot.c |   58 
 board/samsung/smdk5250/tools/mkexynos_image.c |  117 +
 include/configs/smdk5250.h|6 +-
 4 files changed, 196 insertions(+), 1 deletions(-)
 create mode 100644 board/samsung/smdk5250/mmc_boot.c
 create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c

diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
index d9c2774..908ce5b 100644
--- a/board/samsung/smdk5250/Makefile
+++ b/board/samsung/smdk5250/Makefile
@@ -29,18 +29,34 @@ SOBJS   := lowlevel_init.o
 COBJS  := clock_init.o
 COBJS  += dmc_init.o
 COBJS  += tzpc_init.o
+
+ifndef CONFIG_SPL_BUILD
 COBJS  += smdk5250.o
+endif
+
+ifdef CONFIG_SPL_BUILD
+COBJS  += mmc_boot.o
+endif
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
 
 ALL:=   $(obj).depend $(LIB)
 
+ifdef CONFIG_SPL_BUILD
+ALL+= $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
 all:   $(ALL)
 
 $(LIB):$(OBJS)
$(call cmd_link_o_target, $(OBJS))
 
+ifdef CONFIG_SPL_BUILD
+$(OBJTREE)/tools/mk$(BOARD)spl:tools/mkexynos_image.c
+   $(HOSTCC) tools/mkexynos_image.c -o $(OBJTREE)/tools/mk$(BOARD)spl
+endif
+
 #
 
 # defines $(obj).depend target
diff --git a/board/samsung/smdk5250/mmc_boot.c 
b/board/samsung/smdk5250/mmc_boot.c
new file mode 100644
index 000..669c1a3
--- /dev/null
+++ b/board/samsung/smdk5250/mmc_boot.c
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#includecommon.h
+#includeconfig.h
+
+/*
+* Copy U-boot from mmc to RAM:
+* COPY_BL2_FNPTR_ADDR: Address in iRAM, which Contains
+* Pointer to API (Data transfer from mmc to ram)
+*/
+void copy_uboot_to_ram(void)
+{
+   u32 (*copy_bl2)(u32, u32, u32) = (void *) *(u32 *)COPY_BL2_FNPTR_ADDR;
+
+   copy_bl2(BL2_START_OFFSET, BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE);
+}
+
+void board_init_f(unsigned long bootflag)
+{
+   __attribute__((noreturn)) void (*uboot)(void);
+   copy_uboot_to_ram();
+
+   /* Jump to U-Boot image */
+   uboot = (void *)CONFIG_SYS_TEXT_BASE;
+   (*uboot)();
+   /* Never returns Here */
+}
+
+/* Place Holders */
+void board_init_r(gd_t *id, ulong dest_addr)
+{
+   /* Function attribute is no-return */
+   /* This Function never executes */
+   while (1)
+   ;
+}
+
+void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) {}
diff --git a/board/samsung/smdk5250/tools/mkexynos_image.c 
b/board/samsung/smdk5250/tools/mkexynos_image.c
new file mode 100644
index 000..e2b7805
--- /dev/null
+++ b/board/samsung/smdk5250/tools/mkexynos_image.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 stdio.h
+#include stdlib.h
+#include unistd.h
+#include fcntl.h
+#include errno.h
+#include string.h
+#include sys/stat.h
+
+#define CHECKSUM_OFFSET(14*1024-4)
+#define BUFSIZE

[PATCH v6 2/4] ARM: EXYNOS: Add support for Exynos5 based SoCs

2012-01-24 Thread Chander Kashyap
Samsung's ARM Cortex-A15 based SoCs are known as Exynos5 series of
SoCs. This patch adds the support for Exynos5.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- This patch was part of EXYNOS: Add SMDK5250 board support
- Now it is seprated as SoC support.
Changes for v3:
- Populated complete exynos5 gpio structures
Changes for v4:
- Added dmc.h and tzpc.h header files
- Renamed EXYNOS5_PHY*_CTRL_BASE to EXYNOS5_DMC_PHY*_BASE
Changes for v5:
- None
Changes for v5:
- None

 arch/arm/cpu/armv7/exynos/clock.c|  208 +++-
 arch/arm/include/asm/arch-exynos/clock.h |  326 ++
 arch/arm/include/asm/arch-exynos/cpu.h   |   35 +++-
 arch/arm/include/asm/arch-exynos/dmc.h   |  146 +
 arch/arm/include/asm/arch-exynos/gpio.h  |   99 +-
 arch/arm/include/asm/arch-exynos/tzpc.h  |   52 +
 6 files changed, 854 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-exynos/dmc.h
 create mode 100644 arch/arm/include/asm/arch-exynos/tzpc.h

diff --git a/arch/arm/cpu/armv7/exynos/clock.c 
b/arch/arm/cpu/armv7/exynos/clock.c
index 4d92c53..2f7048b 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -92,6 +92,72 @@ static unsigned long exynos4_get_pll_clk(int pllreg)
return fout;
 }
 
+/* exynos5: return pll clock frequency */
+static unsigned long exynos5_get_pll_clk(int pllreg)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long r, m, p, s, k = 0, mask, fout;
+   unsigned int freq;
+
+   switch (pllreg) {
+   case APLL:
+   r = readl(clk-apll_con0);
+   break;
+   case MPLL:
+   r = readl(clk-mpll_con0);
+   break;
+   case EPLL:
+   r = readl(clk-epll_con0);
+   k = readl(clk-epll_con1);
+   break;
+   case VPLL:
+   r = readl(clk-vpll_con0);
+   k = readl(clk-vpll_con1);
+   break;
+   default:
+   printf(Unsupported PLL (%d)\n, pllreg);
+   return 0;
+   }
+
+   /*
+* APLL_CON: MIDV [25:16]
+* MPLL_CON: MIDV [25:16]
+* EPLL_CON: MIDV [24:16]
+* VPLL_CON: MIDV [24:16]
+*/
+   if (pllreg == APLL || pllreg == MPLL)
+   mask = 0x3ff;
+   else
+   mask = 0x1ff;
+
+   m = (r  16)  mask;
+
+   /* PDIV [13:8] */
+   p = (r  8)  0x3f;
+   /* SDIV [2:0] */
+   s = r  0x7;
+
+   freq = CONFIG_SYS_CLK_FREQ;
+
+   if (pllreg == EPLL) {
+   k = k  0x;
+   /* FOUT = (MDIV + K / 65536) * FIN / (PDIV * 2^SDIV) */
+   fout = (m + k / 65536) * (freq / (p * (1  s)));
+   } else if (pllreg == VPLL) {
+   k = k  0xfff;
+   /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
+   fout = (m + k / 1024) * (freq / (p * (1  s)));
+   } else {
+   if (s  1)
+   s = 1;
+   /* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
+   fout = m * (freq / (p * (1  (s - 1;
+   }
+
+   return fout;
+}
+
 /* exynos4: return ARM clock frequency */
 static unsigned long exynos4_get_arm_clk(void)
 {
@@ -114,6 +180,28 @@ static unsigned long exynos4_get_arm_clk(void)
return armclk;
 }
 
+/* exynos5: return ARM clock frequency */
+static unsigned long exynos5_get_arm_clk(void)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long div;
+   unsigned long armclk;
+   unsigned int arm_ratio;
+   unsigned int arm2_ratio;
+
+   div = readl(clk-div_cpu0);
+
+   /* ARM_RATIO: [2:0], ARM2_RATIO: [30:28] */
+   arm_ratio = (div  0)  0x7;
+   arm2_ratio = (div  28)  0x7;
+
+   armclk = get_pll_clk(APLL) / (arm_ratio + 1);
+   armclk /= (arm2_ratio + 1);
+
+   return armclk;
+}
+
 /* exynos4: return pwm clock frequency */
 static unsigned long exynos4_get_pwm_clk(void)
 {
@@ -157,6 +245,27 @@ static unsigned long exynos4_get_pwm_clk(void)
return pclk;
 }
 
+/* exynos5: return pwm clock frequency */
+static unsigned long exynos5_get_pwm_clk(void)
+{
+   struct exynos5_clock *clk =
+   (struct exynos5_clock *)samsung_get_base_clock();
+   unsigned long pclk, sclk;
+   unsigned int ratio;
+
+   /*
+* CLK_DIV_PERIC3
+* PWM_RATIO [3:0]
+*/
+   ratio = readl(clk-div_peric3);
+   ratio = ratio  0xf;
+   sclk = get_pll_clk(MPLL);
+
+   pclk = sclk / (ratio + 1);
+
+   return pclk;
+}
+
 /* exynos4: return uart clock frequency */
 static unsigned long exynos4_get_uart_clk(int dev_index)
 {
@@ -204,6 +313,53 @@ static unsigned long exynos4_get_uart_clk(int dev_index)
   

[PATCH v6 3/4] EXYNOS: Add SMDK5250 board support

2012-01-24 Thread Chander Kashyap
SMDK5250 board is based on Samsungs EXYNOS5250 SoC.

Signed-off-by: Chander Kashyap chander.kash...@linaro.org
---
Changes for v2:
- This patch is bifurcated into borad support and SoC support
- Fixed typo: s/EEYNOS/EXYNOS
- Squashed patch SMDK5250: enable device tree support in this.
Changes for v3:
- None
Changes for v4:
- Converted assembly routines for clock, memory, uart and tzpc
- init to c functions
- Moved uart init to smdk5250.c
Changes for v5:
- Remove initof gpio1
- Fixed gpio configuration for uart
Changes for v6:
- Add gpio1 init in board_uart_init, which was removed in v5

 MAINTAINERS|1 +
 board/samsung/smdk5250/Makefile|   51 
 board/samsung/smdk5250/clock_init.c|  202 +
 board/samsung/smdk5250/dmc_init.c  |  508 
 board/samsung/smdk5250/lowlevel_init.S |   96 ++
 board/samsung/smdk5250/setup.h |  353 ++
 board/samsung/smdk5250/smdk5250.c  |  152 ++
 board/samsung/smdk5250/tzpc_init.c |   48 +++
 boards.cfg |1 +
 include/configs/smdk5250.h |  198 +
 10 files changed, 1610 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdk5250/Makefile
 create mode 100644 board/samsung/smdk5250/clock_init.c
 create mode 100644 board/samsung/smdk5250/dmc_init.c
 create mode 100644 board/samsung/smdk5250/lowlevel_init.S
 create mode 100644 board/samsung/smdk5250/setup.h
 create mode 100644 board/samsung/smdk5250/smdk5250.c
 create mode 100644 board/samsung/smdk5250/tzpc_init.c
 create mode 100644 include/configs/smdk5250.h

diff --git a/MAINTAINERS b/MAINTAINERS
index acbd7f1..c03ebb4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -713,6 +713,7 @@ Chander Kashyap k.chan...@samsung.com
 
origen  ARM ARMV7 (EXYNOS4210 SoC)
SMDKV310ARM ARMV7 (EXYNOS4210 SoC)
+   SMDK5250ARM ARMV7 (EXYNOS5250 SoC)
 
 Heungjun Kim riverful@samsung.com
 
diff --git a/board/samsung/smdk5250/Makefile b/board/samsung/smdk5250/Makefile
new file mode 100644
index 000..d9c2774
--- /dev/null
+++ b/board/samsung/smdk5250/Makefile
@@ -0,0 +1,51 @@
+#
+# Copyright (C) 2011 Samsung Electronics
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+SOBJS  := lowlevel_init.o
+
+COBJS  := clock_init.o
+COBJS  += dmc_init.o
+COBJS  += tzpc_init.o
+COBJS  += smdk5250.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+ALL:=   $(obj).depend $(LIB)
+
+all:   $(ALL)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/samsung/smdk5250/clock_init.c 
b/board/samsung/smdk5250/clock_init.c
new file mode 100644
index 000..2b53a47
--- /dev/null
+++ b/board/samsung/smdk5250/clock_init.c
@@ -0,0 +1,202 @@
+/*
+ * Clock setup for SMDK5250 board based on EXYNOS5
+ *
+ * Copyright (C) 2011 Samsung Electronics
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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 config.h
+#include version.h
+#include asm/io.h