Linus Nielsen Feltzing | 5f655c9 | 2006-07-13 07:40:30 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2006 Ulrich Pegelow |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 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. |
Linus Nielsen Feltzing | 5f655c9 | 2006-07-13 07:40:30 +0000 | [diff] [blame] | 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 "config.h" |
| 23 | #include "system.h" |
| 24 | #include "logf.h" |
| 25 | #include "m5636-target.h" |
| 26 | |
| 27 | void m5636_device_init(void) |
| 28 | { |
| 29 | and_l(~0x00004000, &GPIO_INT_EN); /* probably redundant: disable |
| 30 | interrupt; just in case ... */ |
| 31 | and_l(~0x00000004, &GPIO1_OUT); /* probably redundant: set GPIO34 low */ |
| 32 | or_l( 0x00000004, &GPIO1_ENABLE); /* GPIO34 enable (see above) */ |
| 33 | or_l( 0x00000004, &GPIO1_FUNCTION); /* GPIO34 function (see above) */ |
| 34 | } |
| 35 | |
| 36 | /* for debugging purposes only */ |
| 37 | void m5636_dump_regs(void) |
| 38 | { |
| 39 | unsigned short *address; |
| 40 | |
| 41 | for (address = (unsigned short *)M5636_BASE; |
| 42 | address < (unsigned short *)(M5636_BASE + 0x100); |
| 43 | address++) |
| 44 | { |
Michael Sevakis | 3354531 | 2007-03-20 13:53:23 +0000 | [diff] [blame] | 45 | logf("m5636 A:%08lX D:%04lX", (uintptr_t)address, |
| 46 | (uintptr_t)*address); |
Linus Nielsen Feltzing | 5f655c9 | 2006-07-13 07:40:30 +0000 | [diff] [blame] | 47 | } |
| 48 | |
Michael Sevakis | 3354531 | 2007-03-20 13:53:23 +0000 | [diff] [blame] | 49 | logf("GPIO_INT_EN %08lX", GPIO_INT_EN); |
| 50 | logf("GPIO1_OUT %08lX", GPIO1_OUT); |
| 51 | logf("GPIO1_ENABLE %08lX", GPIO1_ENABLE); |
| 52 | logf("GPIO1_FUNCTION %08lX", GPIO1_FUNCTION); |
Linus Nielsen Feltzing | 5f655c9 | 2006-07-13 07:40:30 +0000 | [diff] [blame] | 53 | } |