Re: [PATCH 00/17] RFC for additional 'nvmem' plumbing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-02-16 at 17:29 -0800, Andrey Smirnov wrote:
> Hi everyone,
> 
> The main purpose of this patchset is propose additional Nvmem plubing
> needed for that subsytem's inclusion in BB and solicit feedback about
> it (patches ## 15 to 17) . Included in this set are also a number of
> bugfixes and RFC-for-bugfixes for problems that were discoverd during
> development of this patch series.
> 
> Proposed Nvmem additions are two new platform device drivers that
> implement a nvmem interface on top of data embedded in DT as well as
> nvmem interface that allows to combine existing nvmem-accesible bytes
> into continuous blocks.
> 
> Below is an example of DT code that uses both drivers in order to
> create a MAC address as a combination of bytes from DT and OCOTP
> module:

So for a common case Sasha has pointed out, of the MAC in the opposite
byte order, one would write:

	scatter-gather-blob {
		compatible = "barebox,nvmem-sg";
		#address-cells = <1>;
		#size-cells = <1>;

		mac_address: combined-bits {
			reg = <0 6>;
			layout = <&fec_mac_address 5 1
			          &fec_mac_address 4 1
			          &fec_mac_address 3 1
			          &fec_mac_address 2 1
			          &fec_mac_address 1 1
			          &fec_mac_address 0 1>;
		};
	};

	&ocotp {
	        #address-cells = <1>;
	       	#size-cells = <1>;

		fec_mac_address: mac_address@88 {
			reg = <0x88 0x8>;
		};
	};

        &fec {
		?mac-address-location?? = <&mac_address>;
	};

I suppose that's a very powerful system, but it does seem a bit
cumbersome.
_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux