[PATCH 2/4] [RFC] ram: stm32mp1: Add support for multiple configs

Marek Vasut marex at denx.de
Tue Apr 7 21:58:02 CEST 2020


On 4/7/20 3:04 PM, Patrick DELAUNAY wrote:
> Hi Marek,

Hi,

[...]

>> +__weak int board_stm32mp1_ddr_config_name_match(struct udevice *dev,
>> +						const char *name)
>> +{
>> +	return 0;	/* Always match */
>> +}
>> +
>> +static ofnode stm32mp1_ddr_get_ofnode(struct udevice *dev) {
>> +	const char *name;
>> +	ofnode node;
>> +
>> +	node = dev_ofnode(dev);
>> +	name = ofnode_get_name(node);
>> +	if (!board_stm32mp1_ddr_config_name_match(dev, name))
>> +		return node;
> 
> Compare with name of the node or with name of DDR configuration ?
> 
> For me " st,mem-name" is same than "description" in FIT config.
> 
> name = ofnode_read_string(node, "st,mem-name");
> 
> if (name && !board_stm32mp1_ddr_config_name_match(dev, name))
> 	return node;

st,mem-name contains the version string, which makes it not very usable,
see:

arch/arm/dts/stm32mp15-ddr3-1x4Gb-1066-binG.dtsi:#define DDR_MEM_NAME
"DDR3-1066/888 bin G 1x4Gb 533MHz v1.45"
arch/arm/dts/stm32mp15-ddr3-2x4Gb-1066-binG.dtsi:#define DDR_MEM_NAME
"DDR3-1066/888 bin G 2x4Gb 533MHz v1.45"

That "v1.45" part.

[...]


More information about the U-Boot mailing list