Skip to content

Commit

Permalink
serial: mchp_xec: fix PM dependencies in driver
Browse files Browse the repository at this point in the history
Implementation of PM in the driver requires PM to be enabled. This was
enabled in the SoC until now and was recently removed.

Fixes #64608

(cherry picked from commit 55fa9b6)

Original-Signed-off-by: Anas Nashif <anas.nashif@intel.com>
GitOrigin-RevId: 55fa9b6
Change-Id: I3f9462fa446711d2247f35e36000e00b2e55f94b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4997743
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
  • Loading branch information
nashif authored and Chromeos LUCI committed Nov 1, 2023
1 parent 8ea2ce6 commit aabe14c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/serial/uart_mchp_xec.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ struct uart_xec_dev_data {

static const struct uart_driver_api uart_xec_driver_api;

#ifdef CONFIG_PM_DEVICE
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_UART_CONSOLE_INPUT_EXPIRED)
static void uart_xec_pm_policy_state_lock_get(enum uart_xec_pm_policy_state_flag flag)
{
if (atomic_test_and_set_bit(pm_policy_state_flag, flag) == 0) {
Expand Down Expand Up @@ -644,7 +644,7 @@ static int uart_xec_fifo_fill(const struct device *dev, const uint8_t *tx_data,
k_spinlock_key_t key = k_spin_lock(&dev_data->lock);

for (i = 0; (i < size) && (regs->LSR & LSR_THRE) != 0; i++) {
#ifdef CONFIG_PM_DEVICE
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_UART_CONSOLE_INPUT_EXPIRED)
uart_xec_pm_policy_state_lock_get(UART_XEC_PM_POLICY_STATE_TX_FLAG);
#endif
regs->RTXB = tx_data[i];
Expand Down Expand Up @@ -933,7 +933,7 @@ static void uart_xec_isr(const struct device *dev)
dev_data->cb(dev, dev_data->cb_data);
}

#ifdef CONFIG_PM_DEVICE
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_UART_CONSOLE_INPUT_EXPIRED)
if (uart_xec_irq_tx_complete(dev)) {
uart_xec_pm_policy_state_lock_put(UART_XEC_PM_POLICY_STATE_TX_FLAG);
}
Expand Down

0 comments on commit aabe14c

Please sign in to comment.