diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-04-09 01:21:53 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-04-09 01:21:53 +0000 |
commit | 7abf2b53a462612808d46d6d77a7f35261a0e5a3 (patch) | |
tree | 241304f7cd2b5d1c2a9e091fe56a33d2d2f8e816 /firmware/target/arm/imx31 | |
parent | 43304b87b0662d1619ac60e5297a1694aa580310 (diff) |
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
Diffstat (limited to 'firmware/target/arm/imx31')
-rw-r--r-- | firmware/target/arm/imx31/ata-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/ata-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/ata-target.h (renamed from firmware/target/arm/imx31/gigabeat-s/ata-target.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/avic-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/avic-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/avic-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/avic-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/adc-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/adc-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/backlight-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/button-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/i2s-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/i2s-imx31.c) | 21 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/kernel-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/lcd-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/power-imx31.c) | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.h (renamed from firmware/target/arm/imx31/gigabeat-s/power-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/powermgmt-imx31.c) | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/system-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/timer-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/timer-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/usb-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/usb-imx31.c) | 4 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/wmcodec-gigabeat-s.c (renamed from firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c) | 20 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gpio-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/gpio-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gpio-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/gpio-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/i2c-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/i2c-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/i2c-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/mc13783-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c) | 5 | ||||
-rw-r--r-- | firmware/target/arm/imx31/mmu-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/mmu-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/mmu-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/serial-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/serial-imx31.h) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/spi-imx31.c (renamed from firmware/target/arm/imx31/gigabeat-s/spi-imx31.c) | 0 | ||||
-rw-r--r-- | firmware/target/arm/imx31/spi-imx31.h (renamed from firmware/target/arm/imx31/gigabeat-s/spi-imx31.h) | 0 |
29 files changed, 27 insertions, 29 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c b/firmware/target/arm/imx31/ata-imx31.c index 5ce7ad0a03..5ce7ad0a03 100644 --- a/firmware/target/arm/imx31/gigabeat-s/ata-imx31.c +++ b/firmware/target/arm/imx31/ata-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/ata-target.h b/firmware/target/arm/imx31/ata-target.h index f7f84f82e9..f7f84f82e9 100644 --- a/firmware/target/arm/imx31/gigabeat-s/ata-target.h +++ b/firmware/target/arm/imx31/ata-target.h diff --git a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c b/firmware/target/arm/imx31/avic-imx31.c index 4ba7da4be0..4ba7da4be0 100644 --- a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.c +++ b/firmware/target/arm/imx31/avic-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.h b/firmware/target/arm/imx31/avic-imx31.h index a049713600..a049713600 100644 --- a/firmware/target/arm/imx31/gigabeat-s/avic-imx31.h +++ b/firmware/target/arm/imx31/avic-imx31.h diff --git a/firmware/target/arm/imx31/gigabeat-s/adc-imx31.c b/firmware/target/arm/imx31/gigabeat-s/adc-gigabeat-s.c index 52293228f8..52293228f8 100644 --- a/firmware/target/arm/imx31/gigabeat-s/adc-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/adc-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c b/firmware/target/arm/imx31/gigabeat-s/backlight-gigabeat-s.c index ec7bf7e8a9..ec7bf7e8a9 100644 --- a/firmware/target/arm/imx31/gigabeat-s/backlight-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/backlight-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c b/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c index ae158b811d..ae158b811d 100644 --- a/firmware/target/arm/imx31/gigabeat-s/button-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/button-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/i2s-imx31.c b/firmware/target/arm/imx31/gigabeat-s/i2s-gigabeat-s.c index d1c917a209..c2ec0d6cab 100644 --- a/firmware/target/arm/imx31/gigabeat-s/i2s-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/i2s-gigabeat-s.c @@ -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); } diff --git a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c b/firmware/target/arm/imx31/gigabeat-s/kernel-gigabeat-s.c index 8e81447bd3..8e81447bd3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/kernel-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/kernel-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-gigabeat-s.c index 71d8e4bef4..71d8e4bef4 100644 --- a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/lcd-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c index fc9ad719a6..2060b7bc6a 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/mc13783-gigabeat-s.c @@ -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 */ diff --git a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c index 6cec3ecdd3..6cec3ecdd3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/pcm-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/pcm-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/power-imx31.c b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c index b29d3cd0fb..7e3b39dba8 100644 --- a/firmware/target/arm/imx31/gigabeat-s/power-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.c @@ -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" diff --git a/firmware/target/arm/imx31/gigabeat-s/power-imx31.h b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.h index 9294de102c..9294de102c 100644 --- a/firmware/target/arm/imx31/gigabeat-s/power-imx31.h +++ b/firmware/target/arm/imx31/gigabeat-s/power-gigabeat-s.h diff --git a/firmware/target/arm/imx31/gigabeat-s/powermgmt-imx31.c b/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c index bb9b8c23af..34abf04940 100644 --- a/firmware/target/arm/imx31/gigabeat-s/powermgmt-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/powermgmt-gigabeat-s.c @@ -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] = diff --git a/firmware/target/arm/imx31/gigabeat-s/system-imx31.c b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c index cd684e77ac..cd684e77ac 100644 --- a/firmware/target/arm/imx31/gigabeat-s/system-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c b/firmware/target/arm/imx31/gigabeat-s/timer-gigabeat-s.c index f3f78a1ee1..f3f78a1ee1 100644 --- a/firmware/target/arm/imx31/gigabeat-s/timer-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/timer-gigabeat-s.c diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c b/firmware/target/arm/imx31/gigabeat-s/usb-gigabeat-s.c index 64ff04e7ae..d873c19ed3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/usb-gigabeat-s.c @@ -27,10 +27,10 @@ #include "usb_core.h" #include "usb_drv.h" #include "usb-target.h" +#include "mc13783.h" #include "ccm-imx31.h" -#include "power-imx31.h" #include "avic-imx31.h" -#include "mc13783.h" +#include "power-gigabeat-s.h" static int usb_status = USB_EXTRACTED; diff --git a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c b/firmware/target/arm/imx31/gigabeat-s/wmcodec-gigabeat-s.c index 06bb4d6306..96324cc162 100644 --- a/firmware/target/arm/imx31/gigabeat-s/wmcodec-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/wmcodec-gigabeat-s.c @@ -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); diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-imx31.c b/firmware/target/arm/imx31/gpio-imx31.c index 944f70eae3..944f70eae3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-imx31.c +++ b/firmware/target/arm/imx31/gpio-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/gpio-imx31.h b/firmware/target/arm/imx31/gpio-imx31.h index 72956d4efa..72956d4efa 100644 --- a/firmware/target/arm/imx31/gigabeat-s/gpio-imx31.h +++ b/firmware/target/arm/imx31/gpio-imx31.h diff --git a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c b/firmware/target/arm/imx31/i2c-imx31.c index 1ffdce38ea..1ffdce38ea 100644 --- a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.c +++ b/firmware/target/arm/imx31/i2c-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.h b/firmware/target/arm/imx31/i2c-imx31.h index b36acecfcb..b36acecfcb 100644 --- a/firmware/target/arm/imx31/gigabeat-s/i2c-imx31.h +++ b/firmware/target/arm/imx31/i2c-imx31.h diff --git a/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c b/firmware/target/arm/imx31/mc13783-imx31.c index 2c5af8d5b7..fc5dfa72f6 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mc13783-imx31.c +++ b/firmware/target/arm/imx31/mc13783-imx31.c @@ -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 diff --git a/firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c b/firmware/target/arm/imx31/mmu-imx31.c index 920a8c9fd3..920a8c9fd3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mmu-imx31.c +++ b/firmware/target/arm/imx31/mmu-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/mmu-imx31.h b/firmware/target/arm/imx31/mmu-imx31.h index c66a3d941d..c66a3d941d 100644 --- a/firmware/target/arm/imx31/gigabeat-s/mmu-imx31.h +++ b/firmware/target/arm/imx31/mmu-imx31.h diff --git a/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h b/firmware/target/arm/imx31/serial-imx31.h index cbb7be2ec3..cbb7be2ec3 100644 --- a/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h +++ b/firmware/target/arm/imx31/serial-imx31.h diff --git a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c b/firmware/target/arm/imx31/spi-imx31.c index ac063f9b10..ac063f9b10 100644 --- a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.c +++ b/firmware/target/arm/imx31/spi-imx31.c diff --git a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.h b/firmware/target/arm/imx31/spi-imx31.h index cf536b646d..cf536b646d 100644 --- a/firmware/target/arm/imx31/gigabeat-s/spi-imx31.h +++ b/firmware/target/arm/imx31/spi-imx31.h |