A22:switch to 32k when sleep
authorxsf@rock-chips.com <root@xxx-desktop.(none)>
Tue, 28 Jun 2011 03:50:02 +0000 (11:50 +0800)
committerxsf@rock-chips.com <root@xxx-desktop.(none)>
Tue, 28 Jun 2011 03:50:02 +0000 (11:50 +0800)
arch/arm/mach-rk29/board-rk29-a22.c

index f665242e61565adccd2a361f87cd13c784c60ff0..0a0558f3d4e5fd310f93a0aa60e431ab37a434a0 100755 (executable)
@@ -2542,6 +2542,8 @@ struct platform_device rk29_device_vibrator ={
 
 static void __init rk29_board_iomux_init(void)
 {
+               int err;
+
        #if CONFIG_ANDROID_TIMED_GPIO
        rk29_mux_api_set(GPIO1B5_PWM0_NAME, GPIO1L_GPIO1B5);//for timed gpio
        #endif
@@ -2551,6 +2553,30 @@ static void __init rk29_board_iomux_init(void)
        #ifdef CONFIG_RK_HEADSET_DET
        rk29_mux_api_set(GPIO3A6_SMCADDR14_HOSTDATA14_NAME,GPIO3L_GPIO3A6);
        #endif
+       
+       rk29_mux_api_set(GPIO4C0_RMIICLKOUT_RMIICLKIN_NAME,GPIO4H_GPIO4C0);
+
+       err = gpio_request(RK29_PIN4_PC0, "clk27M_control");
+       if (err) {
+               gpio_free(RK29_PIN4_PC0);
+               printk("-------request RK29_PIN4_PC0 fail--------\n");
+               return -1;
+       }
+       //phy power down
+       gpio_direction_output(RK29_PIN4_PC0, GPIO_LOW);
+       gpio_set_value(RK29_PIN4_PC0, GPIO_LOW);
+
+       rk29_mux_api_set(GPIO4C5_RMIICSRDVALID_MIIRXDVALID_NAME,GPIO4H_GPIO4C5);
+
+       err = gpio_request(RK29_PIN4_PC5, "clk24M_control");
+       if (err) {
+               gpio_free(RK29_PIN4_PC5);
+               printk("-------request RK29_PIN4_PC5 fail--------\n");
+               return -1;
+       }
+       //phy power down
+       gpio_direction_output(RK29_PIN4_PC5, GPIO_LOW);
+       gpio_set_value(RK29_PIN4_PC5, GPIO_LOW);        
 }
 
 static struct platform_device *devices[] __initdata = {