File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 148148#define GPIO_GPPC_T2_CFG_OFF (0x8c0)
149149#define GPIO_GPPC_T3_CFG_OFF (0x8d0)
150150
151+ #ifdef DEBUG_GPIO
152+ #define GPIO_DEBUG_PRINTF (...) wolfBoot_printf(__VA_ARGS__)
153+ #else
154+ #define GPIO_DEBUG_PRINTF (...) do {} while(0)
155+ #endif /* DEBUG_GPIO */
156+
151157SI_PCH_DEVICE_INTERRUPT_CONFIG mPchHDevIntConfig [] = {
152158 {30 , 0 , SiPchIntA , 16 },
153159};
@@ -1463,6 +1469,9 @@ static void tgl_gpio_configure(const struct tgl_gpio_conf *gpio)
14631469
14641470 g = gpio -> gpio ;
14651471
1472+ GPIO_DEBUG_PRINTF ("Gpio port: %d off: 0x%x :\r\n" , i , g .comm_port_id ,
1473+ g .cfg_offset );
1474+
14661475 dw0 = _dw0 = pch_read32 (g .comm_port_id , g .cfg_offset );
14671476 dw1 = _dw1 = pch_read32 (g .comm_port_id , g .cfg_offset + 4 );
14681477
@@ -1490,6 +1499,9 @@ static void tgl_gpio_configure(const struct tgl_gpio_conf *gpio)
14901499 dw0 &= ~(GPIO_RXEVCONF_MASK );
14911500 dw0 |= gpio -> gpio_rxevconf << GPIO_RXEVCONF_SHIFT ;
14921501 }
1502+
1503+ GPIO_DEBUG_PRINTF ("dw0: 0x%x -> 0x%x, dw1: 0x%x->0x%x\r\n" ,
1504+ _dw0 , dw0 , _dw1 , dw1 );
14931505 if (_dw1 != dw1 ) {
14941506 pch_write32 (g .comm_port_id , g .cfg_offset + 4 , dw1 );
14951507 }
You can’t perform that action at this time.
0 commit comments