diff options
author | Tom Rini <trini@konsulko.com> | 2022-11-03 08:29:10 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-11-03 08:29:10 -0400 |
commit | 36bc9b6113ca96ca5c0d821195adede38395befd (patch) | |
tree | e7fee8c2fec89b8ff1dd2b50a270aab2f1fda7da /board | |
parent | c07babda65a47439b4f02bbb3204dfcb8679edc1 (diff) | |
parent | 3708739ef217bb1fed2ead5062875e97c81fc822 (diff) | |
download | u-boot-36bc9b6113ca96ca5c0d821195adede38395befd.tar.gz |
Merge branch '2022-11-02-assorted-updates'
- Improve arm semihosting, NPCM8xx pinctrl driver, SP804 uclass timer
driver (and enable on relevant platforms), pvblock cleanup, eeprom cmd
bugfix, add RTI watchdog nodes to k3-am64-main, evb-ast2500 config
updates.
Diffstat (limited to 'board')
-rw-r--r-- | board/highbank/Makefile | 2 | ||||
-rw-r--r-- | board/highbank/hb_sregs.c | 45 | ||||
-rw-r--r-- | board/ti/evm/evm.c | 2 |
3 files changed, 47 insertions, 2 deletions
diff --git a/board/highbank/Makefile b/board/highbank/Makefile index 57f7f2e2a65..9e432119849 100644 --- a/board/highbank/Makefile +++ b/board/highbank/Makefile @@ -3,4 +3,4 @@ # (C) Copyright 2000-2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-y := highbank.o ahci.o +obj-y := highbank.o ahci.o hb_sregs.o diff --git a/board/highbank/hb_sregs.c b/board/highbank/hb_sregs.c new file mode 100644 index 00000000000..d9dd2c2bf67 --- /dev/null +++ b/board/highbank/hb_sregs.c @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Calxeda Highbank/Midway "system registers" bus driver + * + * There is a "clocks" subnode inside the top node, which groups all clocks, + * both programmable PLLs as well as fixed clocks. + * Simple allow the DT enumeration to look inside this node, so that we can + * read the fixed clock frequencies using the DM clock framework. + * + * Copyright (C) 2019 Arm Ltd. + */ + +#include <common.h> +#include <dm.h> +#include <dm/lists.h> + +static int hb_sregs_scan_fdt_dev(struct udevice *dev) +{ + ofnode clock_node, node; + + /* Search for subnode called "clocks". */ + ofnode_for_each_subnode(clock_node, dev_ofnode(dev)) { + if (!ofnode_name_eq(clock_node, "clocks")) + continue; + + /* Enumerate all nodes inside this "clocks" subnode. */ + ofnode_for_each_subnode(node, clock_node) + lists_bind_fdt(dev, node, NULL, NULL, false); + return 0; + } + + return -ENOENT; +} + +static const struct udevice_id highbank_sreg_ids[] = { + { .compatible = "calxeda,hb-sregs" }, + {} +}; + +U_BOOT_DRIVER(hb_sregs) = { + .name = "hb-sregs", + .id = UCLASS_SIMPLE_BUS, + .bind = hb_sregs_scan_fdt_dev, + .of_match = highbank_sreg_ids, +}; diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c index 39b5c706a95..a7f9a7eca16 100644 --- a/board/ti/evm/evm.c +++ b/board/ti/evm/evm.c @@ -234,7 +234,7 @@ static void reset_net_chip(void) ret = gpio_request(rst_gpio, ""); if (ret < 0) { printf("Unable to get GPIO %d\n", rst_gpio); - return ; + return; } /* Configure as output */ |