Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2016 08:34:12 +0200
From:      Stanislav Galabov <sgalabov@gmail.com>
To:        freebsd-arm@freebsd.org
Cc:        Stanislav Galabov <sgalabov@gmail.com>, Adrian Chadd <adrian.chadd@gmail.com>
Subject:   [patch] Teach ofw_bus_parse_xref_list_alloc to be able to return the length of the parsed list
Message-ID:  <6A3FDC79-6AB8-477C-8FBE-30DB3E88BF83@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

I=E2=80=99ve just opened the following PR:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206516

The patch, attached to the PR, basically suggests a way to obtain the =
length of the list parsed by ofw_bus_parse_xref_list_alloc in advance =
(e.g., without having to iterate until we get an error or a NULL =
result). This would be useful in cases where we don=E2=80=99t know what =
the length of the list would be, but we need to get all its parsed =
entries and store a reference to them somewhere (e.g., a device=E2=80=99s =
softc).

This would be useful in particular for my Ralink/Mediatek MIPS work, =
since there are, for example, chips in this family, that need to =
enable/disable 2 clocks for USB and then there are others that only need =
1. The same goes for resets.

Best wishes,
Stanislav=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6A3FDC79-6AB8-477C-8FBE-30DB3E88BF83>