From ba71cc540cea33806ff6c2c2e8fe5fe5defa2463 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 22 Mar 2009 02:13:27 +0000 Subject: imx31: Rename clkctl-imx31.* to ccm-imx31.* and move up from ...imx31/gigabeat-s to .../imx31. A bunch more should probably go up a level too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20443 a1c6a512-1295-4272-9138-f99709370657 --- firmware/SOURCES | 2 +- firmware/target/arm/imx31/ccm-imx31.c | 95 +++++++++++++++++ firmware/target/arm/imx31/ccm-imx31.h | 114 +++++++++++++++++++++ firmware/target/arm/imx31/debug-imx31.c | 2 +- firmware/target/arm/imx31/gigabeat-s/ata-imx31.c | 2 +- .../target/arm/imx31/gigabeat-s/button-imx31.c | 2 +- .../target/arm/imx31/gigabeat-s/clkctl-imx31.c | 95 ----------------- .../target/arm/imx31/gigabeat-s/clkctl-imx31.h | 114 --------------------- firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c | 2 +- .../target/arm/imx31/gigabeat-s/kernel-imx31.c | 2 +- firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c | 2 +- firmware/target/arm/imx31/gigabeat-s/spi-imx31.c | 2 +- .../target/arm/imx31/gigabeat-s/system-imx31.c | 2 +- firmware/target/arm/imx31/gigabeat-s/timer-imx31.c | 2 +- firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | 2 +- .../target/arm/imx31/gigabeat-s/wmcodec-imx31.c | 8 +- firmware/target/arm/imx31/sdma-imx31.c | 2 +- 17 files changed, 225 insertions(+), 225 deletions(-) create mode 100644 firmware/target/arm/imx31/ccm-imx31.c create mode 100644 firmware/target/arm/imx31/ccm-imx31.h delete mode 100644 firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.c delete mode 100644 firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.h diff --git a/firmware/SOURCES b/firmware/SOURCES index 43d9f9fd06..95ed27bd89 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -758,6 +758,7 @@ target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c #ifndef SIMULATOR target/arm/lcd-as-memframe.S target/arm/mmu-arm.S +target/arm/imx31/ccm-imx31.c target/arm/imx31/debug-imx31.c target/arm/imx31/rolo_restart.S target/arm/imx31/sdma-imx31.c @@ -766,7 +767,6 @@ target/arm/imx31/gigabeat-s/ata-imx31.c target/arm/imx31/gigabeat-s/avic-imx31.c target/arm/imx31/gigabeat-s/backlight-imx31.c target/arm/imx31/gigabeat-s/button-imx31.c -target/arm/imx31/gigabeat-s/clkctl-imx31.c target/arm/imx31/gigabeat-s/gpio-gigabeat-s.c target/arm/imx31/gigabeat-s/gpio-imx31.c target/arm/imx31/gigabeat-s/kernel-imx31.c diff --git a/firmware/target/arm/imx31/ccm-imx31.c b/firmware/target/arm/imx31/ccm-imx31.c new file mode 100644 index 0000000000..272f00aca9 --- /dev/null +++ b/firmware/target/arm/imx31/ccm-imx31.c @@ -0,0 +1,95 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (c) 2008 Michael Sevakis + * + * Clock control functions for IMX31 processor + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "system.h" +#include "cpu.h" +#include "ccm-imx31.h" + +unsigned int ccm_get_src_pll(void) +{ + return (CCM_PMCR0 & 0xC0000000) == 0 ? PLL_SERIAL : PLL_MCU; +} + +void ccm_module_clock_gating(enum IMX31_CG_LIST cg, enum IMX31_CG_MODES mode) +{ + volatile unsigned long *reg; + unsigned long mask; + int shift; + + if (cg >= CG_NUM_CLOCKS) + return; + + reg = &CCM_CGR0 + cg / 16; /* Select CGR0, CGR1, CGR2 */ + shift = 2*(cg % 16); /* Get field shift */ + mask = CG_MASK << shift; /* Select field */ + + imx31_regmod32(reg, mode << shift, mask); +} + +/* Get the PLL reference clock frequency in HZ */ +unsigned int ccm_get_pll_ref_clk(void) +{ + if ((CCM_CCMR & (3 << 1)) == (1 << 1)) + return CONFIG_CLK32_FREQ * 1024; + else + return CONFIG_HCLK_FREQ; +} + +/* Return PLL frequency in HZ */ +unsigned int ccm_get_pll(enum IMX31_PLLS pll) +{ + uint32_t infreq = ccm_get_pll_ref_clk(); + uint32_t reg = (&CCM_MPCTL)[pll]; + uint32_t mfn = reg & 0x3ff; + uint32_t pd = ((reg >> 26) & 0xf) + 1; + uint64_t mfd = ((reg >> 16) & 0x3ff) + 1; + uint32_t mfi = (reg >> 10) & 0xf; + + mfi = mfi <= 5 ? 5 : mfi; + + return 2*infreq*(mfi * mfd + mfn) / (mfd * pd); +} + +unsigned int ccm_get_ipg_clk(void) +{ + unsigned int pllnum = ccm_get_src_pll(); + unsigned int pll = ccm_get_pll(pllnum); + uint32_t reg = CCM_PDR0; + unsigned int max_pdf = ((reg >> 3) & 0x7) + 1; + unsigned int ipg_pdf = ((reg >> 6) & 0x3) + 1; + + return pll / (max_pdf * ipg_pdf); +} + +unsigned int ccm_get_ahb_clk(void) +{ + unsigned int pllnum = ccm_get_src_pll(); + unsigned int pll = ccm_get_pll(pllnum); + unsigned int max_pdf = ((CCM_PDR0 >> 3) & 0x7) + 1; + + return pll / max_pdf; +} + +unsigned int ccm_get_ata_clk(void) +{ + return ccm_get_ipg_clk(); +} diff --git a/firmware/target/arm/imx31/ccm-imx31.h b/firmware/target/arm/imx31/ccm-imx31.h new file mode 100644 index 0000000000..e1057a9618 --- /dev/null +++ b/firmware/target/arm/imx31/ccm-imx31.h @@ -0,0 +1,114 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (c) 2008 Michael Sevakis + * + * Clock control functions for IMX31 processor + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef _CCM_IMX31_H_ +#define _CCM_IMX31_H_ + +enum IMX31_CG_LIST +{ + /* CGR0 */ + CG_SD_MMC1 = 0, + CG_SD_MMC2, + CG_GPT, + CG_EPIT1, + CG_EPIT2, + CG_IIM, + CG_ATA, + CG_SDMA, + CG_CSPI3, + CG_RNG, + CG_UART1, + CG_UART2, + CG_SSI1, + CG_I2C1, + CG_I2C2, + CG_I2C3, + /* CGR1 */ + CG_HANTRO, + CG_MEMSTICK1, + CG_MEMSTICK2, + CG_CSI, + CG_RTC, + CG_WDOG, + CG_PWM, + CG_SIM, + CG_ECT, + CG_USBOTG, + CG_KPP, + CG_IPU, + CG_UART3, + CG_UART4, + CG_UART5, + CG_1_WIRE, + /* CGR2 */ + CG_SSI2, + CG_CSPI1, + CG_CSPI2, + CG_GACC, + CG_EMI, + CG_RTIC, + CG_FIR, + CG_NUM_CLOCKS +}; + +enum IMX31_CG_MODES +{ + CGM_OFF = 0x0, /* Always off */ + CGM_ON_RUN = 0x1, /* On in run mode, off in wait and doze */ + CGM_ON_RUN_WAIT = 0x2, /* On in run and wait modes, off in doze */ + CGM_ON_ALL = 0x3, /* Always on */ +}; + +#define CG_MASK 0x3 /* bitmask */ + +/* Enable or disable module clocks independently - module must _not_ be + * active! */ +void ccm_module_clock_gating(enum IMX31_CG_LIST cg, + enum IMX31_CG_MODES mode); + +enum IMX31_PLLS +{ + PLL_MCU = 0, + PLL_USB, + PLL_SERIAL, + NUM_PLLS, +}; + +#define CONFIG_CLK32_FREQ 32768 +#define CONFIG_HCLK_FREQ 27000000 + +/* Get the PLL reference clock frequency in HZ */ +unsigned int ccm_get_pll_ref_clk(void); + +/* Return PLL frequency in HZ */ +unsigned int ccm_get_pll(enum IMX31_PLLS pll); + +/* Return ipg_clk in HZ */ +unsigned int ccm_get_ipg_clk(void); + +/* Return ahb_clk in HZ */ +unsigned int ccm_get_ahb_clk(void); + +/* Return the ATA frequency in HZ */ +unsigned int ccm_get_ata_clk(void); + +#endif /* _CCM_IMX31_H_ */ diff --git a/firmware/target/arm/imx31/debug-imx31.c b/firmware/target/arm/imx31/debug-imx31.c index abf180cfd2..cc1e200c11 100644 --- a/firmware/target/arm/imx31/debug-imx31.c +++ b/firmware/target/arm/imx31/debug-imx31.c @@ -28,7 +28,7 @@ #include "debug-target.h" #include "mc13783.h" #include "adc.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" bool __dbg_hw_info(void) { diff --git a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c b/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c index c941037317..5ce7ad0a03 100644 --- a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c @@ -27,7 +27,7 @@ #include "panic.h" #include "ata.h" #include "ata-target.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #ifdef HAVE_ATA_DMA #include "sdma-imx31.h" #include "mmu-imx31.h" diff --git a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c b/firmware/target/arm/imx31/gigabeat-s/button-imx31.c index 505ba397d9..320af7ca66 100644 --- a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/button-imx31.c @@ -27,7 +27,7 @@ #include "system.h" #include "backlight-target.h" #include "avic-imx31.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "mc13783.h" /* Most code in here is taken from the Linux BSP provided by Freescale diff --git a/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.c b/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.c deleted file mode 100644 index 761cf8f701..0000000000 --- a/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.c +++ /dev/null @@ -1,95 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (c) 2008 Michael Sevakis - * - * Clock control functions for IMX31 processor - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "system.h" -#include "cpu.h" -#include "clkctl-imx31.h" - -unsigned int ccm_get_src_pll(void) -{ - return (CCM_PMCR0 & 0xC0000000) == 0 ? PLL_SERIAL : PLL_MCU; -} - -void ccm_module_clock_gating(enum IMX31_CG_LIST cg, enum IMX31_CG_MODES mode) -{ - volatile unsigned long *reg; - unsigned long mask; - int shift; - - if (cg >= CG_NUM_CLOCKS) - return; - - reg = &CCM_CGR0 + cg / 16; /* Select CGR0, CGR1, CGR2 */ - shift = 2*(cg % 16); /* Get field shift */ - mask = CG_MASK << shift; /* Select field */ - - imx31_regmod32(reg, mode << shift, mask); -} - -/* Get the PLL reference clock frequency in HZ */ -unsigned int ccm_get_pll_ref_clk(void) -{ - if ((CCM_CCMR & (3 << 1)) == (1 << 1)) - return CONFIG_CLK32_FREQ * 1024; - else - return CONFIG_HCLK_FREQ; -} - -/* Return PLL frequency in HZ */ -unsigned int ccm_get_pll(enum IMX31_PLLS pll) -{ - uint32_t infreq = ccm_get_pll_ref_clk(); - uint32_t reg = (&CCM_MPCTL)[pll]; - uint32_t mfn = reg & 0x3ff; - uint32_t pd = ((reg >> 26) & 0xf) + 1; - uint64_t mfd = ((reg >> 16) & 0x3ff) + 1; - uint32_t mfi = (reg >> 10) & 0xf; - - mfi = mfi <= 5 ? 5 : mfi; - - return 2*infreq*(mfi * mfd + mfn) / (mfd * pd); -} - -unsigned int ccm_get_ipg_clk(void) -{ - unsigned int pllnum = ccm_get_src_pll(); - unsigned int pll = ccm_get_pll(pllnum); - uint32_t reg = CCM_PDR0; - unsigned int max_pdf = ((reg >> 3) & 0x7) + 1; - unsigned int ipg_pdf = ((reg >> 6) & 0x3) + 1; - - return pll / (max_pdf * ipg_pdf); -} - -unsigned int ccm_get_ahb_clk(void) -{ - unsigned int pllnum = ccm_get_src_pll(); - unsigned int pll = ccm_get_pll(pllnum); - unsigned int max_pdf = ((CCM_PDR0 >> 3) & 0x7) + 1; - - return pll / max_pdf; -} - -unsigned int ccm_get_ata_clk(void) -{ - return ccm_get_ipg_clk(); -} diff --git a/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.h b/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.h deleted file mode 100644 index e1057a9618..0000000000 --- a/firmware/target/arm/imx31/gigabeat-s/clkctl-imx31.h +++ /dev/null @@ -1,114 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (c) 2008 Michael Sevakis - * - * Clock control functions for IMX31 processor - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef _CCM_IMX31_H_ -#define _CCM_IMX31_H_ - -enum IMX31_CG_LIST -{ - /* CGR0 */ - CG_SD_MMC1 = 0, - CG_SD_MMC2, - CG_GPT, - CG_EPIT1, - CG_EPIT2, - CG_IIM, - CG_ATA, - CG_SDMA, - CG_CSPI3, - CG_RNG, - CG_UART1, - CG_UART2, - CG_SSI1, - CG_I2C1, - CG_I2C2, - CG_I2C3, - /* CGR1 */ - CG_HANTRO, - CG_MEMSTICK1, - CG_MEMSTICK2, - CG_CSI, - CG_RTC, - CG_WDOG, - CG_PWM, - CG_SIM, - CG_ECT, - CG_USBOTG, - CG_KPP, - CG_IPU, - CG_UART3, - CG_UART4, - CG_UART5, - CG_1_WIRE, - /* CGR2 */ - CG_SSI2, - CG_CSPI1, - CG_CSPI2, - CG_GACC, - CG_EMI, - CG_RTIC, - CG_FIR, - CG_NUM_CLOCKS -}; - -enum IMX31_CG_MODES -{ - CGM_OFF = 0x0, /* Always off */ - CGM_ON_RUN = 0x1, /* On in run mode, off in wait and doze */ - CGM_ON_RUN_WAIT = 0x2, /* On in run and wait modes, off in doze */ - CGM_ON_ALL = 0x3, /* Always on */ -}; - -#define CG_MASK 0x3 /* bitmask */ - -/* Enable or disable module clocks independently - module must _not_ be - * active! */ -void ccm_module_clock_gating(enum IMX31_CG_LIST cg, - enum IMX31_CG_MODES mode); - -enum IMX31_PLLS -{ - PLL_MCU = 0, - PLL_USB, - PLL_SERIAL, - NUM_PLLS, -}; - -#define CONFIG_CLK32_FREQ 32768 -#define CONFIG_HCLK_FREQ 27000000 - -/* Get the PLL reference clock frequency in HZ */ -unsigned int ccm_get_pll_ref_clk(void); - -/* Return PLL frequency in HZ */ -unsigned int ccm_get_pll(enum IMX31_PLLS pll); - -/* Return ipg_clk in HZ */ -unsigned int ccm_get_ipg_clk(void); - -/* Return ahb_clk in HZ */ -unsigned int ccm_get_ahb_clk(void); - -/* Return the ATA frequency in HZ */ -unsigned int ccm_get_ata_clk(void); - -#endif /* _CCM_IMX31_H_ */ diff --git a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c b/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c index 05d761c9ce..1ffdce38ea 100644 --- a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c @@ -23,7 +23,7 @@ #include "system.h" #include "kernel.h" #include "avic-imx31.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "i2c-imx31.h" /* Forward interrupt handler declarations */ diff --git a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c b/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c index 01e9b8b721..4ed3b3053b 100644 --- a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c @@ -23,7 +23,7 @@ #include "avic-imx31.h" #include "spi-imx31.h" #include "mc13783.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "sdma-imx31.h" #include "kernel.h" #include "thread.h" diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c index 00f196a512..6cec3ecdd3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c @@ -23,7 +23,7 @@ #include "kernel.h" #include "audio.h" #include "sound.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "sdma-imx31.h" #include "mmu-imx31.h" diff --git a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c b/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c index f905057372..ac063f9b10 100644 --- a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c @@ -22,7 +22,7 @@ #include "system.h" #include "spi-imx31.h" #include "avic-imx31.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "debug.h" #include "kernel.h" diff --git a/firmware/target/arm/imx31/gigabeat-s/system-imx31.c b/firmware/target/arm/imx31/gigabeat-s/system-imx31.c index c710c5b93c..de39128497 100644 --- a/firmware/target/arm/imx31/gigabeat-s/system-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/system-imx31.c @@ -29,7 +29,7 @@ #include "lcd.h" #include "serial-imx31.h" #include "debug.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "mc13783.h" static unsigned long product_rev; diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c index c4734a543b..9de3a9e9ec 100644 --- a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c @@ -21,7 +21,7 @@ #include "config.h" #include "system.h" #include "timer.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "avic-imx31.h" static void __attribute__((interrupt("IRQ"))) EPIT2_HANDLER(void) diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c index 2011d0c633..64ff04e7ae 100644 --- a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c @@ -27,7 +27,7 @@ #include "usb_core.h" #include "usb_drv.h" #include "usb-target.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "power-imx31.h" #include "avic-imx31.h" #include "mc13783.h" diff --git a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c b/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c index cf9331144a..2572b88fee 100644 --- a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c @@ -53,10 +53,10 @@ void audiohw_init(void) * INT_BIT_CLK (MCLK) / 1.5 = 11289600Hz = 256*fs = SYSCLK */ imx31_regmod32(&CCM_PDR1, - (1-1) << CCM_PDR1_SSI1_PRE_PODF_POS | - (5-1) << CCM_PDR1_SSI1_PODF_POS | - (8-1) << CCM_PDR1_SSI2_PRE_PODF_POS, - (64-1) << CCM_PDR1_SSI2_PODF_POS | + ((1-1) << CCM_PDR1_SSI1_PRE_PODF_POS) | + ((5-1) << CCM_PDR1_SSI1_PODF_POS) | + ((8-1) << CCM_PDR1_SSI2_PRE_PODF_POS), + ((64-1) << CCM_PDR1_SSI2_PODF_POS) | CCM_PDR1_SSI1_PODF | CCM_PDR1_SSI2_PODF | CCM_PDR1_SSI1_PRE_PODF | CCM_PDR1_SSI2_PRE_PODF); diff --git a/firmware/target/arm/imx31/sdma-imx31.c b/firmware/target/arm/imx31/sdma-imx31.c index 97af419077..6f715ebb3f 100644 --- a/firmware/target/arm/imx31/sdma-imx31.c +++ b/firmware/target/arm/imx31/sdma-imx31.c @@ -23,7 +23,7 @@ #include #include "logf.h" #include "panic.h" -#include "clkctl-imx31.h" +#include "ccm-imx31.h" #include "avic-imx31.h" #include "sdma_struct.h" #include "sdma-imx31.h" -- cgit v1.2.3