From 46f033171171f93bbb6021f1e8c1b6b2adf925cf Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Fri, 17 Oct 2014 00:12:10 -0700 Subject: pd: allow selection of Tx timer channel So far, we always use channel 1 of the Tx timer and the configuration code is hard coded. We need to support other channels for new Ryu boards. Let's make this a configurable bit. BRANCH=samus BUG=chrome-os-partner:32660 TEST=make buildall TEST=Plug in Zinger to Ryu and see 20V come up. Change-Id: Id08d4eb0d6a5721d8a03672484d0892a0714383b Signed-off-by: Vic Yang Reviewed-on: https://chromium-review.googlesource.com/223836 Reviewed-by: Vincent Palatin --- board/twinkie/usb_pd_config.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'board/twinkie') diff --git a/board/twinkie/usb_pd_config.h b/board/twinkie/usb_pd_config.h index 2f8ab797fe..08a1dd3a15 100644 --- a/board/twinkie/usb_pd_config.h +++ b/board/twinkie/usb_pd_config.h @@ -30,6 +30,7 @@ /* Timer channel */ #define TIM_RX_CCR_C0 1 +#define TIM_TX_CCR_C0 1 /* RX timer capture/compare register */ #define TIM_CCR_C0 (&STM32_TIM_CCRx(TIM_CLOCK_PD_RX_C0, TIM_RX_CCR_C0)) @@ -52,7 +53,8 @@ static inline void spi_enable_clock(int port) #define CMP2OUTSEL 0 #define DMAC_TIM_RX(p) STM32_DMAC_CH2 -#define TIM_CCR_IDX(p) TIM_RX_CCR_C0 +#define TIM_RX_CCR_IDX(p) TIM_RX_CCR_C0 +#define TIM_TX_CCR_IDX(p) TIM_TX_CCR_C0 #define TIM_CCR_CS 1 #define EXTI_COMP_MASK(p) ((1 << 21) | (1 << 22)) #define IRQ_COMP STM32_IRQ_COMP -- cgit v1.2.1