diff options
Diffstat (limited to 'firmware/target/arm/as3525/ascodec-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ascodec-as3525.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/ascodec-as3525.c b/firmware/target/arm/as3525/ascodec-as3525.c index 768fb8293f..9d13994cbc 100644 --- a/firmware/target/arm/as3525/ascodec-as3525.c +++ b/firmware/target/arm/as3525/ascodec-as3525.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "clock-target.h" | 41 | #include "clock-target.h" |
42 | #include "kernel.h" | 42 | #include "kernel.h" |
43 | #include "as3525.h" | 43 | #include "as3525.h" |
44 | #include "i2c.h" | ||
44 | 45 | ||
45 | #define I2C2_DATA *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x00)) | 46 | #define I2C2_DATA *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x00)) |
46 | #define I2C2_SLAD0 *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x04)) | 47 | #define I2C2_SLAD0 *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x04)) |
@@ -57,14 +58,13 @@ | |||
57 | 58 | ||
58 | static struct mutex as_mtx SHAREDBSS_ATTR; | 59 | static struct mutex as_mtx SHAREDBSS_ATTR; |
59 | 60 | ||
61 | void i2c_init(void) | ||
62 | { | ||
63 | } | ||
64 | |||
60 | /* initialises the internal i2c bus and prepares for transfers to the codec */ | 65 | /* initialises the internal i2c bus and prepares for transfers to the codec */ |
61 | void ascodec_init(void) | 66 | void ascodec_init(void) |
62 | { | 67 | { |
63 | /* reset device */ | ||
64 | CCU_SRC = CCU_SRC_I2C_AUDIO_EN; | ||
65 | CCU_SRL = CCU_SRL_MAGIC_NUMBER; | ||
66 | CCU_SRL = 0; | ||
67 | |||
68 | /* enable clock */ | 68 | /* enable clock */ |
69 | CGU_PERI |= CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE; | 69 | CGU_PERI |= CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE; |
70 | 70 | ||