[U-Boot] [PATCH v2] mii: add read-modify-write option to mii command

Joe Hershberger joe.hershberger at gmail.com
Fri Mar 27 22:03:35 CET 2015


Hi Tim,

On Wed, Mar 25, 2015 at 6:55 AM, Tim James <tim.james at macltd.com> wrote:
>
> When accessing PHY registers it is often desirable to only update
> selected bits, so it is necessary to first read the current value
> before writing back an modified value with the relevant bits
> updated.
>
> To simplify this and to allow such operations to be incorporated
> into simple shell scripts propose adding a 'modify' option to the
> existing mii command, which takes a mask indicating the bits to
> be updated in addition to a data value containing the new bits,
> ie, <updated> = (<data> & <mask>) | (<current> & ~<mask>).
>
> Signed-off-by: Tim <tim.james at macltd.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Joe Hershberger <joe.hershberger at gmail.com>
> Cc: Jeroen Hofstee <jeroen at myspectrum.nl>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Tim <tim.james at macltd.com>

Applied to net/next, thanks!


More information about the U-Boot mailing list