drivers: qmsi: Fix gpio, i2c and wdt for D2000
This patch fixes the gpio, i2c and watchdog shim drivers so they set the CLK_PERIPH_CLK bit during driver initialization. Differently from Quark SE, the peripheral clock gate bit (CLK_PERIPH_CLK) is not enabled by default in Quark D2000. We have to explicitly set this bit in order to properly initialize the device. This issue has been masked so far because the CLK_PERIPH_CLK bit is set when UART NS16550 driver is enabled. The UART NS16550 driver is enabled by default for Quark D2000 so gpio, i2c and watchdog sample apps were working just fine. But if we disable the NS16550 driver, these samples applications stop working. The remaining shim drivers already set the CLK_PERIPH_CLK bit during initialization so there is no need to fix them. Change-Id: I3f658da564f87e9d52092ce7aac423c7b3e0c890 Signed-off-by: Andre Guedes <andre.guedes@intel.com>
This commit is contained in:
parent
c6be6f271c
commit
3172fca3a0
3 changed files with 5 additions and 4 deletions
|
@ -295,7 +295,8 @@ int gpio_qmsi_init(struct device *port)
|
||||||
case QM_GPIO_0:
|
case QM_GPIO_0:
|
||||||
clk_periph_enable(CLK_PERIPH_GPIO_REGISTER |
|
clk_periph_enable(CLK_PERIPH_GPIO_REGISTER |
|
||||||
CLK_PERIPH_GPIO_INTERRUPT |
|
CLK_PERIPH_GPIO_INTERRUPT |
|
||||||
CLK_PERIPH_GPIO_DB);
|
CLK_PERIPH_GPIO_DB |
|
||||||
|
CLK_PERIPH_CLK);
|
||||||
IRQ_CONNECT(CONFIG_GPIO_QMSI_0_IRQ,
|
IRQ_CONNECT(CONFIG_GPIO_QMSI_0_IRQ,
|
||||||
CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0,
|
CONFIG_GPIO_QMSI_0_PRI, qm_gpio_isr_0,
|
||||||
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
0, IOAPIC_LEVEL | IOAPIC_HIGH);
|
||||||
|
|
|
@ -218,7 +218,7 @@ static int i2c_qmsi_init(struct device *dev)
|
||||||
irq_enable(CONFIG_I2C_QMSI_0_IRQ);
|
irq_enable(CONFIG_I2C_QMSI_0_IRQ);
|
||||||
QM_SCSS_INT->int_i2c_mst_0_mask &= ~BIT(0);
|
QM_SCSS_INT->int_i2c_mst_0_mask &= ~BIT(0);
|
||||||
|
|
||||||
clk_periph_enable(CLK_PERIPH_I2C_M0_REGISTER);
|
clk_periph_enable(CLK_PERIPH_I2C_M0_REGISTER | CLK_PERIPH_CLK);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef CONFIG_I2C_QMSI_1
|
#ifdef CONFIG_I2C_QMSI_1
|
||||||
|
@ -229,7 +229,7 @@ static int i2c_qmsi_init(struct device *dev)
|
||||||
irq_enable(CONFIG_I2C_QMSI_1_IRQ);
|
irq_enable(CONFIG_I2C_QMSI_1_IRQ);
|
||||||
QM_SCSS_INT->int_i2c_mst_1_mask &= ~BIT(0);
|
QM_SCSS_INT->int_i2c_mst_1_mask &= ~BIT(0);
|
||||||
|
|
||||||
clk_periph_enable(CLK_PERIPH_I2C_M1_REGISTER);
|
clk_periph_enable(CLK_PERIPH_I2C_M1_REGISTER | CLK_PERIPH_CLK);
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_I2C_QMSI_1 */
|
#endif /* CONFIG_I2C_QMSI_1 */
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ static void reload(struct device *dev)
|
||||||
|
|
||||||
static void enable(struct device *dev)
|
static void enable(struct device *dev)
|
||||||
{
|
{
|
||||||
clk_periph_enable(CLK_PERIPH_WDT_REGISTER);
|
clk_periph_enable(CLK_PERIPH_WDT_REGISTER | CLK_PERIPH_CLK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void disable(struct device *dev)
|
static void disable(struct device *dev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue