change source file mode to 0644 instead of 0755
[profile/mobile/platform/kernel/u-boot-tm1.git] / board / spreadtrum / sp7715eaopenphone / pinctrl.c
1 /*\r
2  * This file is produced by tools!!\r
3  *\r
4  * Copyright (C) 2012 Spreadtrum Communications Inc.\r
5  *\r
6  * This software is licensed under the terms of the GNU General Public\r
7  * License version 2, as published by the Free Software Foundation, and\r
8  * may be copied, distributed, and modified under those terms.\r
9  *\r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  */\r
15 \r
16 #include <asm/io.h>\r
17 #include <asm/arch/pinmap.h>\r
18 \r
19 static pinmap_t  ctrl[] = {\r
20 \r
21                 { REG_PIN_CTRL0,           (3<<16)|0x0 },\r
22                 { REG_PIN_CTRL1,           0x0 },\r
23                 { REG_PIN_CTRL2,           (0<<22)/*CP0 Control SIM1*/|(0<<20)/*CP0 Control SIM0*/|(1<<16)|(2<<10)}, //ap_uart4-->cp0_uart0, ap_uart2-->cp1_uart1 },\r
24                 { REG_PIN_CTRL3,           0x0 },\r
25 };\r
26 \r
27 \r
28 void pinctrl_init(void)\r
29 {\r
30     int i;\r
31     for (i = 0; i < sizeof(ctrl)/sizeof(ctrl[0]); i++) {\r
32         __raw_writel(ctrl[i].val, CTL_PIN_BASE + ctrl[i].reg);\r
33     }\r
34 }\r