From: Andy Yan <andy.yan@rock-chips.com>
To: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>,
airlied@linux.ie, heiko@sntech.de, fabio.estevam@freescale.com,
rmk+kernel@arm.linux.org.uk
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
Dave Airlie <airlied@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
Josh Boyer <jwboyer@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Inki Dae <inki.dae@samsung.com>,
linux-rockchip@lists.infradead.org,
Rob Herring <robh+dt@kernel.org>,
Sean Paul <seanpaul@chromium.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
ykk@rock-chips.com, Grant Likely <grant.likely@linaro.org>,
djkurtz@google.com, Shawn Guo <shawn.guo@linaro.org>,
jay.xu@rock-chips.com, Lucas Stach <l.stach@pengutronix.de>
Subject: Re: [PATCH v7 5/7] drm: bridge/dw-hdmi: add support for multi byte register width access
Date: Tue, 11 Nov 2014 22:46:39 +0800 [thread overview]
Message-ID: <5462214F.4010504@rock-chips.com> (raw)
In-Reply-To: <54621B23.1020602@imgtec.com>
On 2014年11月11日 22:20, Zubair Lutfullah Kakakhel wrote:
> Hi Andy,
>
> This patch adds the reg-io-width binding.
>
> Hence the binding patch should come before it.
>
do you mean that I should put dts binding patch
before this patch?
> On 11/11/14 12:53, Andy Yan wrote:
>> On rockchip rk3288, only word(32-bit) accesses are
>> permitted for hdmi registers. Byte width accesses (writeb,
>> readb) generate an imprecise external abort.
>>
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>>
>> ---
>>
>> }
>>
>> static void hdmi_modb(struct dw_hdmi *hdmi, u8 data, u8 mask, unsigned reg)
>> @@ -1499,6 +1527,23 @@ static int dw_hdmi_bind(struct device *dev, struct device *master, void *data)
>> struct device_node *ddc_node;
>> struct resource *iores;
>> int ret, irq;
>> + u32 val = 1;
>> +
>> + of_property_read_u32(np, "reg-io-width", &val);
>> +
>> + switch (val) {
>> + case 4:
>> + hdmi->write = dw_hdmi_writel;
>> + hdmi->read = dw_hdmi_readl;
>> + break;
>> + case 1:
>> + hdmi->write = dw_hdmi_writeb;
>> + hdmi->read = dw_hdmi_readb;
>> + break;
>> + default:
>> + dev_err(dev, "reg-io-width must be 1 or 4\n");
>> + return -EINVAL;
>> + }
> The binding patch says this is an optional property.
> But here if undefined it returns -EINVAL.
>
> I would keep it optional and default it to byte access.
if the dts undefined it, the val will be 1.
if the dts defined other value except 4 and 1, return -EINVAL
>
> Regards,
> ZubairLK
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2014-11-11 14:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 12:48 [PATCH v7 0/7] dw-hdmi: convert imx hdmi to bridge/dw-hdmi Andy Yan
[not found] ` <1415710124-11887-1-git-send-email-andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-11-11 12:50 ` [PATCH v7 1/7] staging: imx-drm: imx-hdmi: make checkpatch happy Andy Yan
[not found] ` <1415710229-11935-1-git-send-email-andy.yan-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2014-11-11 12:51 ` [PATCH v7 2/7] staging: imx-drm: imx-hdmi: return defer if can't get ddc i2c adapter Andy Yan
2014-11-11 12:52 ` [PATCH v7 3/7] staging: imx-drm: imx-hdmi: split imx soc specific code from imx-hdmi Andy Yan
2014-11-11 12:53 ` [PATCH v7 4/7] staging: imx-drm: imx-hdmi: move imx-hdmi to bridge/dw-hdmi Andy Yan
2014-11-11 14:16 ` Zubair Lutfullah Kakakhel
[not found] ` <54621A3D.9090406-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2014-11-11 14:41 ` Andy Yan
2014-11-11 12:53 ` [PATCH v7 5/7] drm: bridge/dw-hdmi: add support for multi byte register width access Andy Yan
2014-11-11 14:20 ` Zubair Lutfullah Kakakhel
2014-11-11 14:23 ` Lucas Stach
2014-11-11 14:37 ` Zubair Lutfullah Kakakhel
2014-11-11 14:46 ` Andy Yan [this message]
2014-11-11 14:48 ` Zubair Lutfullah Kakakhel
2014-11-11 12:54 ` [PATCH v7 6/7] drm: bridge/dw-hdmi: convert dw-hdmi to drm_bridge mode Andy Yan
2014-11-11 14:36 ` Zubair Lutfullah Kakakhel
2014-11-11 14:50 ` Andy Yan
2014-11-11 12:54 ` [PATCH v7 7/7] dt-bindings: add document for dw-hdmi Andy Yan
2014-11-11 14:40 ` Zubair Lutfullah Kakakhel
2014-11-11 14:53 ` Andy Yan
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=5462214F.4010504@rock-chips.com \
--to=andy.yan@rock-chips.com \
--cc=Zubair.Kakakhel@imgtec.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@freescale.com \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=inki.dae@samsung.com \
--cc=jay.xu@rock-chips.com \
--cc=jwboyer@redhat.com \
--cc=l.stach@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=robh+dt@kernel.org \
--cc=seanpaul@chromium.org \
--cc=shawn.guo@linaro.org \
--cc=ykk@rock-chips.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).