Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: cpu/armv7Scorpion/QSD8x50/proc_comm_clients.c

Issue 1329001: ST1.5 board support and some ST1.0/1.5 common changes. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cpu/armv7Scorpion/QSD8x50/pll.c ('k') | drivers/mmc/qsd_sdcc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved. 2 * Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved.
3 * 3 *
4 * This software is licensed under the terms of the GNU General Public 4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms. 6 * may be copied, distributed, and modified under those terms.
7 * 7 *
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 * 12 *
13 */ 13 */
14 14
15 #include <common.h> 15 #include <common.h>
16 #include <asm/arch/QSD8x50_reg.h>
17 16
18 #ifdef USE_PROC_COMM 17 #ifdef USE_PROC_COMM
19 18
20 #include <asm/arch/proc_comm.h> 19 #include <asm/arch/proc_comm.h>
21 20
22 extern int msm_proc_comm(proc_comm_t *cmd_pkt); 21 extern int msm_proc_comm(proc_comm_t *cmd_pkt);
23 22
24 extern void gpio_tlmm_config(uint32_t gpio, uint8_t func, 23 extern void gpio_tlmm_config(uint32_t gpio, uint8_t func,
25 uint8_t dir, uint8_t pull, 24 uint8_t dir, uint8_t pull,
26 uint8_t drvstr, uint32_t enable); 25 uint8_t drvstr, uint32_t enable);
(...skipping 26 matching lines...) Expand all
53 pc_pkt.command = PROC_COMM_VREG_SWITCH; 52 pc_pkt.command = PROC_COMM_VREG_SWITCH;
54 pc_pkt.data1 = vreg; 53 pc_pkt.data1 = vreg;
55 pc_pkt.data2 = state ? PROC_COMM_ENABLE : PROC_COMM_DISABLE; 54 pc_pkt.data2 = state ? PROC_COMM_ENABLE : PROC_COMM_DISABLE;
56 pc_pkt.status = PROC_COMM_INVALID_STATUS; 55 pc_pkt.status = PROC_COMM_INVALID_STATUS;
57 56
58 do{ 57 do{
59 msm_proc_comm((proc_comm_t *)&pc_pkt); 58 msm_proc_comm((proc_comm_t *)&pc_pkt);
60 }while(PROC_COMM_CMD_SUCCESS != pc_pkt.status); 59 }while(PROC_COMM_CMD_SUCCESS != pc_pkt.status);
61 } 60 }
62 61
62 #ifndef CONFIG_GENERIC_MMC
63 void proc_comm_sdcard_power(int state) 63 void proc_comm_sdcard_power(int state)
64 { 64 {
65 volatile proc_comm_t pc_pkt; 65 volatile proc_comm_t pc_pkt;
66 while(1) { 66 while(1) {
67 pc_pkt.command = PROC_COMM_VREG_SWITCH; 67 pc_pkt.command = PROC_COMM_VREG_SWITCH;
68 pc_pkt.data1 = PROC_COMM_VREG_SDC; 68 pc_pkt.data1 = PROC_COMM_VREG_SDC;
69 pc_pkt.data2 = state ? PROC_COMM_ENABLE : PROC_COMM_DISABLE; 69 pc_pkt.data2 = state ? PROC_COMM_ENABLE : PROC_COMM_DISABLE;
70 70
71 msm_proc_comm((proc_comm_t *)&pc_pkt); 71 msm_proc_comm((proc_comm_t *)&pc_pkt);
72 debug("PROC_COMM_VREG_SWITCH TRY\n"); 72 debug("PROC_COMM_VREG_SWITCH TRY\n");
73 if(PROC_COMM_CMD_SUCCESS != pc_pkt.status) { 73 if(PROC_COMM_CMD_SUCCESS != pc_pkt.status) {
74 debug("Error: PROC_COMM_VREG_SWITCH failed...retrying\n"); 74 debug("Error: PROC_COMM_VREG_SWITCH failed...retrying\n");
75 } else { 75 } else {
76 debug("PROC_COMM_VREG_SWITCH DONE\n"); 76 debug("PROC_COMM_VREG_SWITCH DONE\n");
77 break; 77 break;
78 } 78 }
79 } 79 }
80 80
81 } 81 }
82 #endif
82 83
83 void proc_comm_sdcard_gpio_config(int instance) 84 void proc_comm_sdcard_gpio_config(int instance)
84 { 85 {
85 86
86 //Note: GPIO_NO_PULL is for clock lines. 87 //Note: GPIO_NO_PULL is for clock lines.
87 switch (instance) { 88 switch (instance) {
88 case 1: 89 case 1:
89 gpio_tlmm_config(51, 1, GPIO_OUTPUT, GPIO_PULL_UP, 90 gpio_tlmm_config(51, 1, GPIO_OUTPUT, GPIO_PULL_UP,
90 GPIO_8MA, GPIO_ENABLE); 91 GPIO_8MA, GPIO_ENABLE);
91 gpio_tlmm_config(52, 1, GPIO_OUTPUT, GPIO_PULL_UP, 92 gpio_tlmm_config(52, 1, GPIO_OUTPUT, GPIO_PULL_UP,
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 proc_comm_clk_enable(PROC_COMM_MDP_LCDC_PCLK_CLK); 442 proc_comm_clk_enable(PROC_COMM_MDP_LCDC_PCLK_CLK);
442 } 443 }
443 444
444 /* enables LCD_NS_REG->MNCNTR_EN,LCD_ROOT_ENA, LCD_CLK_EXT_BRANCH_ENA */ 445 /* enables LCD_NS_REG->MNCNTR_EN,LCD_ROOT_ENA, LCD_CLK_EXT_BRANCH_ENA */
445 uint32_t proc_comm_get_lcdc_clk(void) 446 uint32_t proc_comm_get_lcdc_clk(void)
446 { 447 {
447 return proc_comm_get_clk_rate(PROC_COMM_MDP_LCDC_PCLK_CLK); 448 return proc_comm_get_clk_rate(PROC_COMM_MDP_LCDC_PCLK_CLK);
448 } 449 }
449 450
450 #endif /*USE_PROC_COMM*/ 451 #endif /*USE_PROC_COMM*/
OLDNEW
« no previous file with comments | « cpu/armv7Scorpion/QSD8x50/pll.c ('k') | drivers/mmc/qsd_sdcc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698