Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH V2] brcmfmac: Add sg parameters dts parsing
@ 2017-12-11  8:06 Chi-Hsien Lin
  0 siblings, 0 replies; only message in thread
From: Chi-Hsien Lin @ 2017-12-11  8:06 UTC (permalink / raw)
  To: linux-wireless
  Cc: brcm80211-dev-list, brcm80211-dev-list.pdl, franky.lin,
	hante.meuleman, Wright Feng, Stanley Hsu, devicetree

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@cypress.com>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-11  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-11  8:06 [PATCH V2] brcmfmac: Add sg parameters dts parsing Chi-Hsien Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox