1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/aoac.h>
5 #include <soc/aoac_defs.h>
6 #include <soc/southbridge.h>
10 * Table of devices that need their AOAC registers enabled and waited
11 * upon (usually about .55 milliseconds). Instead of individual delays
12 * waiting for each device to become available, a single delay will be
15 static const unsigned int aoac_devs
[] = {
16 FCH_AOAC_DEV_UART0
+ CONFIG_UART_FOR_CONSOLE
* 2,
24 void wait_for_aoac_enabled(unsigned int dev
)
26 while (!is_aoac_device_enabled(dev
))
30 void enable_aoac_devices(void)
35 for (i
= 0; i
< ARRAY_SIZE(aoac_devs
); i
++)
36 power_on_aoac_device(aoac_devs
[i
]);
38 /* Wait for AOAC devices to indicate power and clock OK */
42 for (i
= 0; i
< ARRAY_SIZE(aoac_devs
); i
++)
43 status
&= is_aoac_device_enabled(aoac_devs
[i
]);