thor: fix invalid larger device descriptor than requested
[profile/mobile/platform/kernel/u-boot-tm1.git] / modem_boot / req_clk_gpio.c
1 /******************************************************************************
2  ** File Name:      spi_phy_v0.c                                                 *
3  ** Author:         liuhao                                                   *
4  ** DATE:           06/28/2010                                                *
5  ** Copyright:      2010 Spreatrum, Incoporated. All Rights Reserved.         *
6  ** Description:    This file define the physical layer of SPI device.      *
7  ******************************************************************************
8
9  ******************************************************************************
10  **                        Edit History                                       *
11  ** ------------------------------------------------------------------------- *
12  ** DATE           NAME             DESCRIPTION                               *
13  ** 06/28/2010     liuhao     Create.  
14  ******************************************************************************/
15
16 /**---------------------------------------------------------------------------*
17  **                         Dependencies                                      *
18  **---------------------------------------------------------------------------*/
19 #include <config.h>
20 #include <common.h>
21 #include <linux/types.h>
22 #include <asm/arch/bits.h>
23 //#define __DEBUG__
24 //#define __SPI_MODE__
25 #define mdelay(n)       udelay((n) * 1000)
26
27 extern int modem_status(void);
28
29 int     req_clk_status(void)
30 {
31         if(modem_status() == 2)  {
32                 mdelay(10);
33                 return 0;
34         } else {
35                 return gpio_get_value(CP_AP_LIV);
36         }
37 }
38 /*********************************************************************************************************
39 ** Function name: req_clk_init
40 ** Descriptions:  
41 ** input parameters:
42 **
43 **
44 **
45 ** output parameters:
46 ** Returned value:
47 *********************************************************************************************************/
48 void req_clk_init(void)
49 {
50         //gpio_direction_output(CP_AP_LIV, 0); 
51 }
52
53 void dump_gpio_register(void)
54 {
55 //      GPIO_PRINT(("GPIO(0x%x --0x%x)      = 0x%8x\n",gpio_base_for_cs+0x4,gpio_base_for_cs,REG32(gpio_base_for_cs+0x4)));
56 //      GPIO_PRINT(("GPIO(0x%x -- %d)      = 0x%8x\n",gpio_base_for_cs+0x8,gpio_bit_num_for_cs,REG32(gpio_base_for_cs+0x8)));
57 }
58