From: Chi-Hsien Lin <chi-hsien.lin-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: brcm80211-dev-list
<brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>,
brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
franky.lin-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
hante.meuleman-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
Wright Feng <Wright.Feng-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>,
Stanley Hsu <Stanley.Hsu-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH V2] brcmfmac: Add sg parameters dts parsing
Date: Mon, 11 Dec 2017 02:06:46 -0600 [thread overview]
Message-ID: <20171211080640.GA132360@aremote07.aus.cypress.com> (raw)
broken_sg_support, sd_head_align, and sd_sgentry_align are used in
brcmfmac code but not configurable in dts file. Add the parsing logic.
Now they can be configured like below in dts:
brcm,broken_sg_support;
brcm,sd_head_align = <4>;
brcm,sd_sgentry_align = <4>;
Signed-off-by: Chi-hsien Lin <chi-hsien.lin-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
index aee6e59..fd028b1 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c
@@ -39,6 +39,13 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type,
if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0)
sdio->drive_strength = val;
+ sdio->broken_sg_support = of_property_read_bool(np,
+ "brcm,broken_sg_support");
+ if (of_property_read_u32(np, "brcm,sd_head_align", &val) == 0)
+ sdio->sd_head_align = (u16)val;
+ if (of_property_read_u32(np, "brcm,sd_sgentry_align", &val) == 0)
+ sdio->sd_sgentry_align = (u16)val;
+
/* make sure there are interrupts defined in the node */
if (!of_find_property(np, "interrupts", NULL))
return;
--
2.1.0
reply other threads:[~2017-12-11 8:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20171211080640.GA132360@aremote07.aus.cypress.com \
--to=chi-hsien.lin-+wt8y+m8/x5bdgjk7y7tuq@public.gmane.org \
--cc=Stanley.Hsu-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org \
--cc=Wright.Feng-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org \
--cc=brcm80211-dev-list-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org \
--cc=brcm80211-dev-list.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=franky.lin-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=hante.meuleman-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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