From: Pierre Beaumon <pierre.beaumon@yahoo.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: "devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re : Arm device tree wonder
Date: Mon, 5 Sep 2011 23:04:20 +0100 (BST) [thread overview]
Message-ID: <1315260260.18862.YahooMailNeo@web132209.mail.ird.yahoo.com> (raw)
In-Reply-To: alpine.DEB.2.00.1108301910390.26173@utopia.booyaka.com
Hello Paul,
thanks for your reply.
> On Tue, 30 Aug 2011, Pierre Beaumon wrote:
>
> > Also I believe one big arm problem is a lack of common
> > infrastructure that lead to code duplication. Some machine try to
> > do too much things. omap2 (mach-omap2 + plat-omap) is about 80
> > KSLOC over 400KSLOC (76 mach
> > + plat directories). That 8 times bigger than the average
> > ((80/2)/(400/76))! There are either common stuff that should be
> > shared, or some stuff should be moved in drivers.
>
> Here are some additional data points you might consider adding to
> your analysis:
>
> - Consider taking into account what percentage of those lines are for
> SoC-specific device data files. Where should those files be moved,
> before a DT (or other data format) conversion?
Soc specific data are mainly in file starting with board* on omap and take only 15 KSLOC.
Most of code come from omap_device, clock, powerdomain, hwmod, mux code (in mach-omap2 more than 30KSLOC for clock* omap_hwmod* mux*)
This code won't be removed when we switch to DT, and I believe this code can be shared with others.
For each driver/framework in bsp (plat-*/mach-*) it could be interesting to have an answer to the following questions :
- what it does
- why it is specific to this SOC
- can it be usefull for other SOC
- can an existing framework be used/enhanced
For example the mux code it a common problem to all SOC and is not specific to omap. Having a generic framework could be great (pinmux ?)
hwmod [1] doesn't look like specific to OMAP and can apply to any arm SOC. Why should it be in omap code ?
Platform_bus is limited (see my example on pci like bus) and arm may need a better bus. Why not omap_device/hwmod ?
This make me think of the time when linux didn't get a wifi stack and each driver came with its own stack.
> - Consider accounting for the extra code and data needed for
> fine-grained power management, compared to the average SoC core code,
> assuming the SoC supports it.
Yes omap is fine tuned for power management, but the power management concept is not limited to omap and can be shared.
See for example the pm_runtime framework that can be used by everybody (pc, arm, ...).
[1]
* One way to view an OMAP SoC is as a collection of largely unrelated
* IP blocks connected by interconnects. The IP blocks include
* devices such as ARM processors, audio serial interfaces, UARTs,
* etc. Some of these devices, like the DSP, are created by TI;
* others, like the SGX, largely originate from external vendors. In
* TI's documentation, on-chip devices are referred to as "OMAP
* modules." Some of these IP blocks are identical across several
* OMAP versions. Others are revised frequently.
[...]
* OMAP hwmod provides a consistent way to describe the on-chip
* hardware blocks and their integration into the rest of the chip.
* This description can be automatically generated from the TI
* hardware database. OMAP hwmod provides a standard, consistent API
* to reset, enable, idle, and disable these hardware blocks. And
* hwmod provides a way for other core code, such as the Linux device
* code or the OMAP power management and address space mapping code,
* code or the OMAP power management and add
ress space mapping code,
* to query the hardware database.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-09-05 22:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 20:09 Arm device tree wonder Pierre Beaumon
2011-08-30 21:09 ` Scott Wood
2011-08-31 1:30 ` Paul Walmsley
2011-09-05 22:04 ` Pierre Beaumon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315260260.18862.YahooMailNeo@web132209.mail.ird.yahoo.com \
--to=pierre.beaumon@yahoo.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox