mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
drivers: video: isx019: Fix system clock to HV mode
ISX019 doesn't work if CONFIG_CPUFREQ_RELEASE_LOCK is enabled without this changes. Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
This commit is contained in:
committed by
Petro Karashchenko
parent
63774125d9
commit
d0d787c1b0
@@ -38,6 +38,7 @@
|
|||||||
#include "cxd56_clock.h"
|
#include "cxd56_clock.h"
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
#include <arch/chip/pm.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -54,6 +55,14 @@
|
|||||||
|
|
||||||
#define POWER_CHECK_RETRY (10)
|
#define POWER_CHECK_RETRY (10)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Private Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
static struct pm_cpu_freqlock_s g_hv_lock =
|
||||||
|
PM_CPUFREQLOCK_INIT(PM_CPUFREQLOCK_TAG('I', 'S', 0),
|
||||||
|
PM_CPUFREQLOCK_FLAG_HV);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -134,6 +143,10 @@ struct i2c_master_s *board_isx019_initialize(void)
|
|||||||
|
|
||||||
_info("Initializing ISX019...\n");
|
_info("Initializing ISX019...\n");
|
||||||
|
|
||||||
|
/* Fix system clock to HV mode */
|
||||||
|
|
||||||
|
up_pm_acquire_freqlock(&g_hv_lock);
|
||||||
|
|
||||||
while (!g_rtc_enabled && 0 < retry--)
|
while (!g_rtc_enabled && 0 < retry--)
|
||||||
{
|
{
|
||||||
/* ISX019 requires stable RTC */
|
/* ISX019 requires stable RTC */
|
||||||
@@ -171,6 +184,10 @@ int board_isx019_uninitialize(struct i2c_master_s *i2c)
|
|||||||
cxd56_gpio_write_hiz(PIN_IS_DATA0);
|
cxd56_gpio_write_hiz(PIN_IS_DATA0);
|
||||||
cxd56_gpio_write_hiz(PIN_IS_DATA7);
|
cxd56_gpio_write_hiz(PIN_IS_DATA7);
|
||||||
|
|
||||||
|
/* Release system clock */
|
||||||
|
|
||||||
|
up_pm_release_freqlock(&g_hv_lock);
|
||||||
|
|
||||||
/* Uninitialize i2c device */
|
/* Uninitialize i2c device */
|
||||||
|
|
||||||
ret = isx019_uninitialize();
|
ret = isx019_uninitialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user