summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2009-04-07 17:20:31 +0000
committerBertrik Sikken <bertrik@sikken.nl>2009-04-07 17:20:31 +0000
commit070ee525acdf22d445eb5f5f41371f5922b675ca (patch)
treeda83bd6e624445ba7d627809a49f5432d933dc46
parent9ab84b073f6280093910aaa1efc9d56c0e067843 (diff)
downloadrockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.zip
rockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.tar.gz
rockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.tar.bz2
rockbox-070ee525acdf22d445eb5f5f41371f5922b675ca.tar.xz
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
-rw-r--r--firmware/SOURCES1
-rw-r--r--firmware/target/arm/as3525/ascodec-as3525.c10
-rw-r--r--firmware/target/arm/as3525/i2c-as3525.c28
3 files changed, 5 insertions, 34 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 91482bf..adbcb08 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -366,7 +366,6 @@ target/arm/adc-as3514.c
target/arm/as3525/audio-as3525.c
target/arm/as3525/debug-as3525.c
target/arm/as3525/fmradio-i2c-as3525.c
-target/arm/as3525/i2c-as3525.c
target/arm/as3525/i2s-as3525.c
target/arm/as3525/pcm-as3525.c
#endif /* BOOTLOADER */
diff --git a/firmware/target/arm/as3525/ascodec-as3525.c b/firmware/target/arm/as3525/ascodec-as3525.c
index 768fb82..9d13994 100644
--- a/firmware/target/arm/as3525/ascodec-as3525.c
+++ b/firmware/target/arm/as3525/ascodec-as3525.c
@@ -41,6 +41,7 @@
#include "clock-target.h"
#include "kernel.h"
#include "as3525.h"
+#include "i2c.h"
#define I2C2_DATA *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x00))
#define I2C2_SLAD0 *((volatile unsigned int *)(I2C_AUDIO_BASE + 0x04))
@@ -57,14 +58,13 @@
static struct mutex as_mtx SHAREDBSS_ATTR;
+void i2c_init(void)
+{
+}
+
/* initialises the internal i2c bus and prepares for transfers to the codec */
void ascodec_init(void)
{
- /* reset device */
- CCU_SRC = CCU_SRC_I2C_AUDIO_EN;
- CCU_SRL = CCU_SRL_MAGIC_NUMBER;
- CCU_SRL = 0;
-
/* enable clock */
CGU_PERI |= CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE;
diff --git a/firmware/target/arm/as3525/i2c-as3525.c b/firmware/target/arm/as3525/i2c-as3525.c
deleted file mode 100644
index 32f3343..0000000
--- a/firmware/target/arm/as3525/i2c-as3525.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright © 2008 Rafaël Carré
- *
- * 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 "i2c.h"
-
-/* TODO */
-
-void i2c_init(void)
-{
-}