1 // SPDX-License-Identifier: GPL-2.0+
8 #include <asm/arch/device.h>
9 #include <asm/arch/quark.h>
12 * Intel Galileo gen2 board uses GPIO Resume Well bank pin0 as the PERST# pin.
14 * We cannot use any public GPIO APIs in <asm-generic/gpio.h> to control this
15 * pin, as these APIs will eventually call into gpio_ich6_ofdata_to_platdata()
16 * in the Intel ICH6 GPIO driver where it calls PCI configuration space access
17 * APIs which will trigger PCI enumeration process.
19 * Check <asm/arch-quark/quark.h> for more details.
21 void board_assert_perst(void)
25 /* retrieve the GPIO IO base */
26 qrk_pci_read_config_dword(QUARK_LEGACY_BRIDGE, LB_GBA, &base);
27 base = (base & 0xffff) & ~0x7f;
35 /* configure the pin as output */
41 /* pull it down (assert) */
48 void board_deassert_perst(void)
52 /* retrieve the GPIO IO base */
53 qrk_pci_read_config_dword(QUARK_LEGACY_BRIDGE, LB_GBA, &base);
54 base = (base & 0xffff) & ~0x7f;
56 /* pull it up (de-assert) */