1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 #include <device/pnp.h>
8 #define NUVOTON_ENTRY_KEY 0x87
9 #define NUVOTON_EXIT_KEY 0xAA
11 /* Enable configuration: pass entry key '0x87' into index port dev
13 static void pnp_enter_conf_state(pnp_devfn_t dev
)
16 outb(NUVOTON_ENTRY_KEY
, port
);
17 outb(NUVOTON_ENTRY_KEY
, port
);
20 /* Disable configuration: pass exit key '0xAA' into index port dev. */
21 static void pnp_exit_conf_state(pnp_devfn_t dev
)
24 outb(NUVOTON_EXIT_KEY
, port
);
27 /* Route UARTD to pins 41-48 */
28 void nct5104d_enable_uartd(pnp_devfn_t dev
)
32 pnp_enter_conf_state(dev
);
37 pnp_exit_conf_state(dev
);