diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2009-04-07 17:20:31 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2009-04-07 17:20:31 +0000 |
commit | 070ee525acdf22d445eb5f5f41371f5922b675ca (patch) | |
tree | da83bd6e624445ba7d627809a49f5432d933dc46 /firmware/target/arm | |
parent | 9ab84b073f6280093910aaa1efc9d56c0e067843 (diff) | |
download | rockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.tar.gz rockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.zip |
Patch by Rafaël Carré - Sansa AMS i2c :
* remove peripheral reset (already made in system_init).
* Move empty i2c_init() from i2c-as3525.c (and remove that file)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20645 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/ascodec-as3525.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/as3525/i2c-as3525.c | 28 |
2 files changed, 5 insertions, 33 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 | ||
diff --git a/firmware/target/arm/as3525/i2c-as3525.c b/firmware/target/arm/as3525/i2c-as3525.c deleted file mode 100644 index 32f33435bc..0000000000 --- a/firmware/target/arm/as3525/i2c-as3525.c +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright © 2008 Rafaël Carré | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include "i2c.h" | ||
23 | |||
24 | /* TODO */ | ||
25 | |||
26 | void i2c_init(void) | ||
27 | { | ||
28 | } | ||