From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCHv2 03/27] ARM: OMAP2+: add omapdss_init_of()
Date: Tue, 17 Dec 2013 06:20:18 +0000 [thread overview]
Message-ID: <52AFED22.2010703@ti.com> (raw)
In-Reply-To: <20131216184623.GC26293@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 2634 bytes --]
On 2013-12-16 20:46, Tony Lindgren wrote:
> * Tomi Valkeinen <tomi.valkeinen@ti.com> [131216 07:02]:
>> omapdss driver uses a omapdss platform device to pass platform specific
>> function pointers and DSS hardware version from the arch code to the
>> driver. This device is needed also when booting with DT.
>>
>> This patch adds omapdss_init_of() function, called from board-generic at
>> init time, which creates the omapdss device.
> ...
>
>> --- a/arch/arm/mach-omap2/display.c
>> +++ b/arch/arm/mach-omap2/display.c
>> @@ -23,6 +23,8 @@
>> #include <linux/clk.h>
>> #include <linux/err.h>
>> #include <linux/delay.h>
>> +#include <linux/of.h>
>> +#include <linux/of_platform.h>
>>
>> #include <video/omapdss.h>
>> #include "omap_hwmod.h"
>> @@ -514,3 +516,63 @@ int omap_dss_reset(struct omap_hwmod *oh)
>>
>> return r;
>> }
>> +
>> +int __init omapdss_init_of(void)
>> +{
>> + int r;
>> + enum omapdss_version ver;
>> +
>> + static struct omap_dss_board_info board_data = {
>> + .dsi_enable_pads = omap_dsi_enable_pads,
>> + .dsi_disable_pads = omap_dsi_disable_pads,
>> + .get_context_loss_count = omap_pm_get_dev_context_loss_count,
>> + .set_min_bus_tput = omap_dss_set_min_bus_tput,
>> + };
>> +
>> + ver = omap_display_get_version();
>> +
>> + if (ver == OMAPDSS_VER_UNKNOWN) {
>> + pr_err("DSS not supported on this SoC\n");
>> + return -ENODEV;
>> + }
>> +
>> + board_data.version = ver;
>> +
>> + omap_display_device.dev.platform_data = &board_data;
>> +
>> + r = platform_device_register(&omap_display_device);
>> + if (r < 0) {
>> + pr_err("Unable to register omapdss device\n");
>> + return r;
>> + }
>
> You can populate the callback functions in the pdata using
> OF_DEV_AUXDATA entries in the pdata-quirks.c. That way you could
> instantiate the dev entry for omap_display_device using DT
> and deal with it in drivers/video/omap except for the pdata
> callbacks.
The device we are creating here is not something to be created via DT.
So in addition to the devices that match to the DSS hardware blocks, we
have a 'omapdss' platform device. That's a legacy one, and it's
"virtual" in the sense that it doesn't match any HW block as such.
At some point the device should be removed totally, but for now it's
there and it's a convenient way to pass the platform data.
> Of course that can be done later too.
Yes, at the moment I'm trying to minimize the kind of code changes that
can be done later. It'd be great to get this into next merge window, but
time is running short if I do any bigger changes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2013-12-17 6:20 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 14:56 [PATCHv2 00/27] OMAPDSS: DT support v2 Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 01/27] ARM: OMAP: remove DSS DT hack Tomi Valkeinen
2013-12-16 18:41 ` Tony Lindgren
2013-12-17 6:45 ` Tomi Valkeinen
2013-12-17 15:30 ` Tony Lindgren
2013-12-18 7:12 ` Tomi Valkeinen
2013-12-18 10:21 ` Tomi Valkeinen
2013-12-18 17:33 ` Tony Lindgren
2013-12-18 17:32 ` Tony Lindgren
2013-12-16 14:56 ` [PATCHv2 02/27] OMAPDSS: remove DT hacks for regulators Tomi Valkeinen
2013-12-16 18:42 ` Tony Lindgren
2013-12-17 6:42 ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 03/27] ARM: OMAP2+: add omapdss_init_of() Tomi Valkeinen
2013-12-16 18:46 ` Tony Lindgren
2013-12-17 6:20 ` Tomi Valkeinen [this message]
2013-12-16 14:56 ` [PATCHv2 04/27] OMAPDSS: add 'label' support for DT Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 05/27] OMAPDSS: get dssdev->alias from DT alias Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 06/27] OMAPFB: clean up default display search Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 08/27] OMAPDSS: add of helpers Tomi Valkeinen
2013-12-17 7:12 ` Archit Taneja
2013-12-17 7:01 ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 09/27] OMAPDSS: Add DT support to DSS, DISPC, DPI and SDI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 10/27] OMAPDSS: Add DT support to HDMI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 11/27] OMAPDSS: Add DT support to VENC Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 12/27] OMAPDSS: Add DT support to DSI Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 13/27] ARM: omap3.dtsi: add omapdss information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 14/27] ARM: omap4.dtsi: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 15/27] ARM: omap4-panda.dts: add display information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 16/27] ARM: omap4-sdp.dts: " Tomi Valkeinen
[not found] ` <1387205794-32246-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2013-12-16 14:56 ` [PATCHv2 07/27] OMAPFB: search for default display with DT alias Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 17/27] ARM: omap3-tobi.dts: add lcd (TEST) Tomi Valkeinen
2013-12-17 17:17 ` Florian Vaussard
2013-12-16 14:56 ` [PATCHv2 18/27] ARM: omap3-beagle.dts: add display information Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 19/27] ARM: omap3-beagle-xm.dts: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 20/27] ARM: omap3-igep0020.dts: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 21/27] OMAPDSS: panel-dsi-cm: Add DT support Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 22/27] OMAPDSS: encoder-tfp410: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 23/27] OMAPDSS: connector-dvi: " Tomi Valkeinen
2013-12-17 7:05 ` Sascha Hauer
2013-12-17 7:15 ` Tomi Valkeinen
2013-12-17 15:15 ` Laurent Pinchart
2013-12-18 10:41 ` Tomi Valkeinen
[not found] ` <52B17BBF.8090003-l0cyMroinI0@public.gmane.org>
2013-12-18 14:02 ` Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 24/27] OMAPDSS: encoder-tpd12s015: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 25/27] OMAPDSS: hdmi-connector: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 26/27] OMAPDSS: panel-dpi: " Tomi Valkeinen
2013-12-16 14:56 ` [PATCHv2 27/27] OMAPDSS: connector-analog-tv: " Tomi Valkeinen
[not found] ` <1387205794-32246-28-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2014-08-26 16:58 ` Laurent Pinchart
2014-08-27 9:37 ` Tomi Valkeinen
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=52AFED22.2010703@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).