Gigabeat S/i.MX31: Sort files in the /target tree into things that are SoC-generic (into /imx31) and player-specific (into /gigabeat-s, based upon current appearances). Move i2s clock init into the appropriate file. Housekeeping only-- no functional changes.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25547 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2010-04-09 01:21:53 +00:00
parent 43304b87b0
commit 7abf2b53a4
30 changed files with 48 additions and 50 deletions

View file

@ -870,37 +870,37 @@ target/arm/s3c2440/gigabeat-fx/wmcodec-meg-fx.c
#ifndef SIMULATOR
target/arm/lcd-as-memframe.S
target/arm/mmu-armv6.S
target/arm/imx31/ata-imx31.c
target/arm/imx31/avic-imx31.c
target/arm/imx31/ccm-imx31.c
target/arm/imx31/debug-imx31.c
target/arm/imx31/dvfs_dptc-imx31.c
target/arm/imx31/gpio-imx31.c
target/arm/imx31/i2c-imx31.c
target/arm/imx31/mc13783-imx31.c
target/arm/imx31/mmu-imx31.c
target/arm/imx31/rolo_restart.S
target/arm/imx31/sdma-imx31.c
target/arm/imx31/gigabeat-s/adc-imx31.c
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/spi-imx31.c
target/arm/imx31/gigabeat-s/adc-gigabeat-s.c
target/arm/imx31/gigabeat-s/backlight-gigabeat-s.c
target/arm/imx31/gigabeat-s/button-gigabeat-s.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
target/arm/imx31/gigabeat-s/i2c-imx31.c
target/arm/imx31/gigabeat-s/i2s-imx31.c
target/arm/imx31/gigabeat-s/lcd-imx31.c
target/arm/imx31/gigabeat-s/kernel-gigabeat-s.c
target/arm/imx31/gigabeat-s/i2s-gigabeat-s.c
target/arm/imx31/gigabeat-s/lcd-gigabeat-s.c
target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c
target/arm/imx31/gigabeat-s/mc13783-imx31.c
target/arm/imx31/gigabeat-s/mmu-imx31.c
target/arm/imx31/gigabeat-s/power-imx31.c
target/arm/imx31/gigabeat-s/powermgmt-imx31.c
target/arm/imx31/gigabeat-s/spi-imx31.c
target/arm/imx31/gigabeat-s/system-imx31.c
target/arm/imx31/gigabeat-s/usb-imx31.c
target/arm/imx31/gigabeat-s/wmcodec-imx31.c
target/arm/imx31/gigabeat-s/power-gigabeat-s.c
target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c
target/arm/imx31/gigabeat-s/system-gigabeat-s.c
target/arm/imx31/gigabeat-s/usb-gigabeat-s.c
target/arm/imx31/gigabeat-s/wmcodec-gigabeat-s.c
#ifndef BOOTLOADER
target/arm/imx31/gigabeat-s/audio-gigabeat-s.c
target/arm/imx31/gigabeat-s/fmradio-i2c-gigabeat-s.c
target/arm/imx31/gigabeat-s/headphone-gigabeat-s.c
target/arm/imx31/gigabeat-s/pcm-imx31.c
target/arm/imx31/gigabeat-s/timer-imx31.c
target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c
target/arm/imx31/gigabeat-s/timer-gigabeat-s.c
#endif
#endif /* SIMULATOR */
#endif /* GIGABEAT_S */

View file

@ -18,9 +18,28 @@
* KIND, either express or implied.
*
****************************************************************************/
#include "config.h"
#include "system.h"
#include "i2s.h"
void i2s_reset(void)
{
/* How SYSCLK for codec is derived (USBPLL=338.688MHz).
*
* SSI post dividers (SSI2 PODF=4, SSI2 PRE PODF=0):
* 338688000Hz / 5 = 67737600Hz = ssi1_clk
*
* SSI bit clock dividers (DIV2=1, PSR=0, PM=0):
* ssi1_clk / 4 = 16934400Hz = INT_BIT_CLK (MCLK)
*
* WM Codec post divider (MCLKDIV=1.5):
* 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),
CCM_PDR1_SSI1_PODF | CCM_PDR1_SSI2_PODF |
CCM_PDR1_SSI1_PRE_PODF | CCM_PDR1_SSI2_PRE_PODF);
}

View file

@ -27,7 +27,7 @@
#include "adc-target.h"
#include "button-target.h"
#include "usb-target.h"
#include "power-imx31.h"
#include "power-gigabeat-s.h"
#include "powermgmt-target.h"
/* Gigabeat S definitions for static MC13783 event registration */

View file

@ -23,7 +23,7 @@
#include "usb.h"
#include "usb_core.h"
#include "power.h"
#include "power-imx31.h"
#include "power-gigabeat-s.h"
#include "backlight.h"
#include "backlight-target.h"
#include "avic-imx31.h"

View file

@ -26,7 +26,7 @@
#include "adc.h"
#include "powermgmt.h"
#include "power.h"
#include "power-imx31.h"
#include "power-gigabeat-s.h"
/* TODO: Battery tests to get the right values! */
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =

View file

@ -27,10 +27,10 @@
#include "usb_core.h"
#include "usb_drv.h"
#include "usb-target.h"
#include "ccm-imx31.h"
#include "power-imx31.h"
#include "avic-imx31.h"
#include "mc13783.h"
#include "ccm-imx31.h"
#include "avic-imx31.h"
#include "power-gigabeat-s.h"
static int usb_status = USB_EXTRACTED;

View file

@ -25,6 +25,7 @@
#include "kernel.h"
#include "sound.h"
#include "wmcodec.h"
#include "i2s.h"
#include "i2c-imx31.h"
/* NOTE: Some port-specific bits will have to be moved away (node and GPIO
@ -41,24 +42,7 @@ static struct i2c_node wm8978_i2c_node =
void audiohw_init(void)
{
/* How SYSCLK for codec is derived (USBPLL=338.688MHz).
*
* SSI post dividers (SSI2 PODF=4, SSI2 PRE PODF=0):
* 338688000Hz / 5 = 67737600Hz = ssi1_clk
*
* SSI bit clock dividers (DIV2=1, PSR=0, PM=0):
* ssi1_clk / 4 = 16934400Hz = INT_BIT_CLK (MCLK)
*
* WM Codec post divider (MCLKDIV=1.5):
* 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),
CCM_PDR1_SSI1_PODF | CCM_PDR1_SSI2_PODF |
CCM_PDR1_SSI1_PRE_PODF | CCM_PDR1_SSI2_PRE_PODF);
i2s_reset();
i2c_enable_node(&wm8978_i2c_node, true);

View file

@ -26,11 +26,6 @@
#include "debug.h"
#include "kernel.h"
#include "power-imx31.h"
#include "button-target.h"
#include "adc-target.h"
#include "usb-target.h"
#ifdef BOOTLOADER
#define PMIC_DRIVER_CLOSE
#endif