power: io-domain: initialize all io-domain
There maybe more than one io-domain. Change-Id: I786544547b7c5da034e4d9685d60144c22266c3b Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
6a4b5e01bf
commit
fe404743f8
|
|
@ -7,14 +7,22 @@
|
||||||
#include <console.h>
|
#include <console.h>
|
||||||
#include <io-domain.h>
|
#include <io-domain.h>
|
||||||
|
|
||||||
void io_domain_init(void)
|
int io_domain_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
struct uclass *uc;
|
||||||
|
int ret;
|
||||||
|
|
||||||
ret = uclass_get_device(UCLASS_IO_DOMAIN, 0, &dev);
|
ret = uclass_get(UCLASS_IO_DOMAIN, &uc);
|
||||||
if (ret)
|
if (ret)
|
||||||
printf("Can't find UCLASS_IO_DOMAIN driver %d\n", ret);
|
return ret;
|
||||||
|
|
||||||
|
for (uclass_first_device(UCLASS_IO_DOMAIN, &dev);
|
||||||
|
dev;
|
||||||
|
uclass_next_device(&dev))
|
||||||
|
;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UCLASS_DRIVER(io_domain) = {
|
UCLASS_DRIVER(io_domain) = {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,6 @@
|
||||||
/**
|
/**
|
||||||
* io_domain_init() - init io-domain driver
|
* io_domain_init() - init io-domain driver
|
||||||
*/
|
*/
|
||||||
void io_domain_init(void);
|
int io_domain_init(void);
|
||||||
|
|
||||||
#endif /* _IO_DOMAIN_H_ */
|
#endif /* _IO_DOMAIN_H_ */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue