diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-07-13 07:40:30 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-07-13 07:40:30 +0000 |
commit | 5f655c93f931236c173700f54e4b329bf709e7cc (patch) | |
tree | 7e4edf40a5d59ec356fdc97f8eeef020aa1074dd /firmware/drivers | |
parent | ac13e52522dac375096a65264ceae00afb3c5973 (diff) | |
download | rockbox-5f655c93f931236c173700f54e4b329bf709e7cc.tar.gz rockbox-5f655c93f931236c173700f54e4b329bf709e7cc.zip |
Patch #5639 by Ulrich Pegelow, inits the M5636 USBOTG chip on the X5 to reduce the battery consumption.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10208 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rwxr-xr-x | firmware/drivers/m5636.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/firmware/drivers/m5636.c b/firmware/drivers/m5636.c new file mode 100755 index 0000000000..e7b7a174df --- /dev/null +++ b/firmware/drivers/m5636.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 Ulrich Pegelow | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include "system.h" | ||
21 | #include "kernel.h" | ||
22 | #include "logf.h" | ||
23 | #include "m5636.h" | ||
24 | #include "m5636-target.h" | ||
25 | |||
26 | /* Disclaimer: This code had to be developed without any documentation for the | ||
27 | M5636 USBOTG chip, due to the restrictive information policy of | ||
28 | its manufacturer. | ||
29 | The development is solely based on reverse engineering. | ||
30 | Malfunctioning (with the risk of possible damage to the | ||
31 | hardware) can not be fully excluded. | ||
32 | USE THIS CODE AT YOUR OWN RISK! | ||
33 | */ | ||
34 | |||
35 | /* Init: This currently just puts the M5636 into sleep mode */ | ||
36 | |||
37 | void m5636_init(void) | ||
38 | { | ||
39 | m5636_device_init(); | ||
40 | |||
41 | M5636_4068 |= 0x0003; /* ???? */ | ||
42 | M5636_4068 |= 0x0080; /* ???? */ | ||
43 | M5636_4078 |= 0x0001; /* ???? */ | ||
44 | } | ||
45 | |||