[U-Boot] [PATCH v4 10/19] arm: socfpga: Add misc support for Arria 10

Marek Vasut marex at denx.de
Wed Apr 5 10:40:44 UTC 2017


On 04/05/2017 11:32 AM, Ley Foon Tan wrote:
> Add misc support for Arria 10.
> 
> Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>

[...]

> +static int find_peripheral_uart(const void *blob,
> +	int child, const char *node_name)
> +{
> +	int len;
> +	fdt_addr_t base_addr = 0;
> +	fdt_size_t size;
> +	const u32 *cell;
> +	u32 value, offset = 0;
> +
> +	base_addr = fdtdec_get_addr_size(blob, child, "reg", &size);
> +	if (base_addr != FDT_ADDR_T_NONE) {
> +		cell = fdt_getprop(blob, child, "pinctrl-single,pins",
> +			&len);
> +		if (cell != NULL) {
> +			for (; len > 0; len -= (2 * sizeof(u32))) {
> +				offset = fdt32_to_cpu(*cell++);
> +				value = fdt32_to_cpu(*cell++);
> +				/* Found UART peripheral */
> +				if (value == 0x0D)

What does 0x0d mean ?

> +					return offset;
> +			}
> +		}
> +	}
> +	return -EINVAL;
> +}

[...]

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list