mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
Merge branch 'master' of git://git.denx.de/u-boot-fdt
This commit is contained in:
commit
996ec1dcc5
5 changed files with 26 additions and 17 deletions
|
@ -117,4 +117,8 @@
|
|||
sdhci@12540000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dwmmc@12550000 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1661,6 +1661,9 @@ unsigned long get_mmc_clk(int dev_index)
|
|||
{
|
||||
enum periph_id id;
|
||||
|
||||
if (cpu_is_exynos4())
|
||||
return exynos4_get_mmc_clk(dev_index);
|
||||
|
||||
switch (dev_index) {
|
||||
case 0:
|
||||
id = PERIPH_ID_SDMMC0;
|
||||
|
@ -1679,12 +1682,7 @@ unsigned long get_mmc_clk(int dev_index)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (cpu_is_exynos5())
|
||||
return clock_get_periph_rate(id);
|
||||
else if (cpu_is_exynos4())
|
||||
return exynos4_get_mmc_clk(dev_index);
|
||||
|
||||
return 0;
|
||||
return clock_get_periph_rate(id);
|
||||
}
|
||||
|
||||
void set_mmc_clk(int dev_index, unsigned int div)
|
||||
|
|
|
@ -341,18 +341,22 @@ static int gpio_exynos_bind(struct udevice *parent)
|
|||
plat = calloc(1, sizeof(*plat));
|
||||
if (!plat)
|
||||
return -ENOMEM;
|
||||
reg = fdtdec_get_addr(blob, node, "reg");
|
||||
if (reg != FDT_ADDR_T_NONE)
|
||||
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
|
||||
plat->bank = bank;
|
||||
plat->bank_name = fdt_get_name(blob, node, NULL);
|
||||
debug("dev at %p: %s\n", bank, plat->bank_name);
|
||||
|
||||
plat->bank_name = fdt_get_name(blob, node, NULL);
|
||||
ret = device_bind(parent, parent->driver,
|
||||
plat->bank_name, plat, -1, &dev);
|
||||
plat->bank_name, plat, -1, &dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dev->of_offset = node;
|
||||
|
||||
reg = dev_get_addr(dev);
|
||||
if (reg != FDT_ADDR_T_NONE)
|
||||
bank = (struct s5p_gpio_bank *)((ulong)base + reg);
|
||||
|
||||
plat->bank = bank;
|
||||
|
||||
debug("dev at %p: %s\n", bank, plat->bank_name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -37,7 +37,9 @@ config OF_EMBED
|
|||
bool "Embedded DTB for DT control"
|
||||
help
|
||||
If this option is enabled, the device tree will be picked up and
|
||||
built into the U-Boot image.
|
||||
built into the U-Boot image. This is suitable for local debugging
|
||||
and development only and is not recommended for production devices.
|
||||
Boards in the mainline U-Boot tree should not use it.
|
||||
|
||||
config OF_HOSTFILE
|
||||
bool "Host filed DTB for DT control"
|
||||
|
|
|
@ -149,7 +149,7 @@ fdt_addr_t fdtdec_get_addr_size_auto_parent(const void *blob, int parent,
|
|||
}
|
||||
|
||||
ns = fdt_size_cells(blob, parent);
|
||||
if (ns < 1) {
|
||||
if (ns < 0) {
|
||||
debug("(bad #size-cells)\n");
|
||||
return FDT_ADDR_T_NONE;
|
||||
}
|
||||
|
@ -180,10 +180,11 @@ fdt_addr_t fdtdec_get_addr_size_auto_noparent(const void *blob, int node,
|
|||
fdt_addr_t fdtdec_get_addr_size(const void *blob, int node,
|
||||
const char *prop_name, fdt_size_t *sizep)
|
||||
{
|
||||
int ns = sizep ? (sizeof(fdt_size_t) / sizeof(fdt32_t)) : 0;
|
||||
|
||||
return fdtdec_get_addr_size_fixed(blob, node, prop_name, 0,
|
||||
sizeof(fdt_addr_t) / sizeof(fdt32_t),
|
||||
sizeof(fdt_size_t) / sizeof(fdt32_t),
|
||||
sizep);
|
||||
ns, sizep);
|
||||
}
|
||||
|
||||
fdt_addr_t fdtdec_get_addr(const void *blob, int node,
|
||||
|
|
Loading…
Reference in a new issue