int fdt_getprop_u32_by_offset(const void *fdt, int offset, const char *name, uint32_t *out) { const struct fdt_property *prop; int prop_len; fdt32_t result;prop = fdt_get_property_namelen(fdt, offset, name, strlen(name),
prop=malloc(len); if(!prop){ printf("Failed to allocate memory\n"); return-1; } // 获取属性值 if(fdt_getprop(blob,nodeoffset,name,(void*)prop)!=len){ printf("Failed to get property value\n"); free(prop); return-1; } // 输出属性值 for(inti=0;i<len/sizeof(u32);i++){...
u32*bar)intfdtdec_get_pci_bus_range(constvoid*blob,intnode,structfdt_resource *res)uint64_t fdtdec_get_uint64(constvoid*blob,intnode,constchar*prop_name, uint64_t default_val)intfdtdec_get_is_enabled(constvoid*blob,intnode)enumfdt_compat_id fdtdec_lookup(constvoid*blob,intnode)intfdtdec_...
void ft_pci_setup(void *blob, bd_t *bd); u32 fdt_getprop_u32_default_node(const void *fdt, int off, int cell, const char *prop, const u32 dflt); u32 fdt_getprop_u32_default(const void *fdt, const char *path, 0 comments on commit 807765b Please sign in to comment. Foote...
因为在学习uboot的driver module,发现有必要先把uboot的fdt整明白点。所以这里就先学习一下fdt咯。 一、介绍 FDT,flatted device tree,扁平设备树。熟悉Linux的人对这个概念应该不陌生。 简单理解为将部分设备信息结构存放到device tree文件中。 uboot最终将其device tree编译成dtb文件,使用过程中通过解析该dtb来获取...
@@ -112,7 +112,7 @@ static int mv_sdhci_probe(struct udevice *dev) int ret; host->name = MVSDH_NAME; host->ioaddr = (void *)devfdt_get_addr(dev); host->ioaddr = dev_read_addr_ptr(dev); host->quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | SDHCI_QUIRK_WAIT_SEND_CMD; host->mm...
const void *prop; int ndepth = 0; int off; int ret; off = fdt_next_node(blob, parent_offset, &ndepth); if (off > 0 && ndepth == 1) { prop = fdt_getprop(blob, off, "label", NULL); if (prop == NULL) { /* * Could not find label property, nand {}; node? * Check...
*/ cell = fdt_getprop(blob, node, "reg", &len); if (!cell)2 changes: 1 addition & 1 deletion 2 drivers/mtd/pic32_flash.c Original file line numberDiff line numberDiff line change @@ -384,7 +384,7 @@ static int pic32_flash_probe(struct udevice *dev) * match with reg-...
const u32 *prop; noff = fdt_node_offset_by_compatible(blob, -1, compat); while (noff > 0) { fdt_for_each_node_by_compatible(noff, blob, -1, compat) { prop = fdt_getprop(blob, noff, "cell-index", &len); if (!prop) { printf("WARNING missing cell-index for fman port\...