2 * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
4 * Board-specific low level initialization code. Called at the very end
5 * of arch/arm/cpu/arm926ejs/davinci/lowlevel_init.S. Just returns if there is no
6 * initialization required.
8 * For _OLDER_ Sonata boards sets up GPIO4 to control NAND WP line. Newer
9 * Sonata boards, AFAIK, don't use this so it's just return by default. Ask
10 * Visioneering if they reinvented the wheel once again to make sure :)
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of
15 * the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 #ifdef SONATA_BOARD_GPIOWP
33 /* Set PINMUX0 to enable GPIO4 */
40 /* Enable GPIO LPSC module */
50 and r2, r2, $0xfffffff8
51 orr r2, r2, $0x00000003
54 orr r2, r2, $0x00000200
69 and r2, r2, $0x0000001f
80 /* Set it to 0 (Write Protect) */
81 ldr r0, GPIO_CLR_DATA01
87 #ifdef SONATA_BOARD_GPIOWP