mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
Clock changes for 2024.01-rc2
This contains several fixes for the clock core. -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEkGEdW86NSNID6GAoPuiP7LShEG4FAmVCut1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDkw NjExRDVCQ0U4RDQ4RDIwM0U4NjAyODNFRTg4RkVDQjRBMTEwNkUACgkQPuiP7LSh EG5TAgf+MtLNjT+HWQAXTNMqC/ey/I0vp/Zo4uU6+tNbs05BbEcInAavoT42Sf2Y HMWiviG96wZrN0J5UH+pXzVAh2nrhEXzYX1L054EsJ/R8lHMKvmcxDW/HYoaLeaY 9A1AseptbJc3UiEtejfUmuBFYdMoLZc+wmqT7iO9yxFFhoBpD9CiSQQVKkcKoI56 3YKLsTwC4yyTrNr95EM/wILfHu6NOh1cn8fQloVIWD1bGR7qLs7ORcdpbR3Plde3 iFeTHbJby2cHEn8j84axzs9sqFcc5ZcKXZJ7tKVhu04pjbqHezMOZe9r/vf38NfZ 6Rf4s4kqRQZKxLBM9ADg/2ocNqEFKA== =QToO -----END PGP SIGNATURE----- Merge tag 'clk-2024.01-rc2' of https://source.denx.de/u-boot/custodians/u-boot-clk Clock changes for 2024.01-rc2 This contains several fixes for the clock core.
This commit is contained in:
commit
658caf0bf1
2 changed files with 14 additions and 11 deletions
|
@ -422,12 +422,13 @@ int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
|
|||
return clk_get_by_index_nodev(node, index, clk);
|
||||
}
|
||||
|
||||
int clk_release_all(struct clk *clk, int count)
|
||||
int clk_release_all(struct clk *clk, unsigned int count)
|
||||
{
|
||||
int i, ret;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
debug("%s(clk[%d]=%p)\n", __func__, i, &clk[i]);
|
||||
debug("%s(clk[%u]=%p)\n", __func__, i, &clk[i]);
|
||||
|
||||
/* check if clock has been previously requested */
|
||||
if (!clk[i].dev)
|
||||
|
@ -477,7 +478,7 @@ void clk_free(struct clk *clk)
|
|||
ulong clk_get_rate(struct clk *clk)
|
||||
{
|
||||
const struct clk_ops *ops;
|
||||
int ret;
|
||||
ulong ret;
|
||||
|
||||
debug("%s(clk=%p)\n", __func__, clk);
|
||||
if (!clk_valid(clk))
|
||||
|
@ -655,7 +656,7 @@ int clk_enable(struct clk *clk)
|
|||
}
|
||||
|
||||
if (ops->enable) {
|
||||
ret = ops->enable(clk);
|
||||
ret = ops->enable(clkp ? clkp : clk);
|
||||
if (ret) {
|
||||
printf("Enable %s failed\n", clk->dev->name);
|
||||
return ret;
|
||||
|
@ -712,7 +713,7 @@ int clk_disable(struct clk *clk)
|
|||
}
|
||||
|
||||
if (ops->disable) {
|
||||
ret = ops->disable(clk);
|
||||
ret = ops->disable(clkp ? clkp : clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -223,9 +223,11 @@ struct clk *devm_clk_get(struct udevice *dev, const char *id);
|
|||
static inline struct clk *devm_clk_get_optional(struct udevice *dev,
|
||||
const char *id)
|
||||
{
|
||||
int ret;
|
||||
struct clk *clk = devm_clk_get(dev, id);
|
||||
|
||||
if (PTR_ERR(clk) == -ENODATA)
|
||||
ret = PTR_ERR(clk);
|
||||
if (ret == -ENODATA || ret == -ENOENT)
|
||||
return NULL;
|
||||
|
||||
return clk;
|
||||
|
@ -243,7 +245,7 @@ static inline struct clk *devm_clk_get_optional(struct udevice *dev,
|
|||
*
|
||||
* Return: zero on success, or -ve error code.
|
||||
*/
|
||||
int clk_release_all(struct clk *clk, int count);
|
||||
int clk_release_all(struct clk *clk, unsigned int count);
|
||||
|
||||
/**
|
||||
* devm_clk_put - "free" a managed clock source
|
||||
|
@ -307,7 +309,7 @@ clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
|
|||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int clk_release_all(struct clk *clk, int count)
|
||||
static inline int clk_release_all(struct clk *clk, unsigned int count)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
@ -335,7 +337,7 @@ static inline int clk_get_by_name_optional(struct udevice *dev,
|
|||
int ret;
|
||||
|
||||
ret = clk_get_by_name(dev, name, clk);
|
||||
if (ret == -ENODATA)
|
||||
if (ret == -ENODATA || ret == -ENOENT)
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
|
@ -359,7 +361,7 @@ static inline int clk_get_by_name_nodev_optional(ofnode node, const char *name,
|
|||
int ret;
|
||||
|
||||
ret = clk_get_by_name_nodev(node, name, clk);
|
||||
if (ret == -ENODATA)
|
||||
if (ret == -ENODATA || ret == -ENOENT)
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue