change source file mode to 0644 instead of 0755
[profile/mobile/platform/kernel/u-boot-tm1.git] / board / spreadtrum / tiger / openphone.c
1 #include <common.h>
2 #include <asm/io.h>
3 DECLARE_GLOBAL_DATA_PTR;
4
5 extern void sprd_gpio_init(void);
6 extern void ADI_init (void);
7 extern int LDO_Init(void);
8
9 #include <asm/arch/regs_ana.h>
10 #include <asm/arch/adi_hal_internal.h>
11
12 #define PIN_CTL_REG 0x8C000000
13 static void chip_init(void)
14 {
15     //ANA_REG_SET(ANA_ADIE_CHIP_ID,0);
16     /* setup pins configration when LDO shutdown*/
17     //__raw_writel(0x1fff00, PIN_CTL_REG);
18      *(volatile unsigned int *)PIN_CTL_REG = 0x1fff00;
19 }
20 int board_init()
21 {
22         gd->bd->bi_arch_number = MACH_TYPE_OPENPHONE;
23         gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
24 #if 0
25     ADI_init();
26     chip_init();
27     LDO_Init();
28     sprd_gpio_init();
29     //board_gpio_init();
30 #endif  
31         return 0;
32 }
33
34 int dram_init(void)
35 {
36         //gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM_1,
37         //              PHYS_SDRAM_1_SIZE);
38         gd->ram_size = 0x8000000;//PHYS_SDRAM_1_SIZE;
39         return 0;
40 }