ARM: rockchip: fix some build error when some configs no selected
author黄涛 <huangtao@rock-chips.com>
Mon, 17 Mar 2014 11:41:25 +0000 (19:41 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 17 Mar 2014 11:41:59 +0000 (19:41 +0800)
arch/arm/mach-rockchip/common.c
arch/arm/mach-rockchip/rk3188.c
arch/arm/mach-rockchip/rk3288.c

index a9fea3dab329a82d64b1989dce640a3af2be3c89..74736af569760d49f6683f0fad193b9730766b68 100755 (executable)
@@ -270,7 +270,9 @@ extern int __init rockchip_ion_find_reserve_mem(unsigned long node,
                                const char *uname, int depth, void *data);
 void __init rockchip_ion_reserve(void)
 {
+#ifdef CONFIG_ION_ROCKCHIP
        printk("%s\n", __func__);
        of_scan_flat_dt(rockchip_ion_find_reserve_mem, NULL);
+#endif
 }
 
index 0426863350744ff6399adc5a0d48bb87f7585ac7..c7992ef594e62d9da62b11387db97af498a87d05 100755 (executable)
@@ -315,7 +315,9 @@ DT_MACHINE_START(RK3188_DT, "RK30board")
        .map_io         = rk3188_dt_map_io,
        .init_time      = rk3188_dt_init_timer,
        .dt_compat      = rk3188_dt_compat,
+#ifdef CONFIG_PM
        .init_late      = rockchip_suspend_init,
+#endif
        .reserve        = rk3188_reserve,
        .restart        = rk3188_restart,
 MACHINE_END
@@ -370,6 +372,7 @@ static int __init rk3188_ddr_init(void)
 }
 arch_initcall_sync(rk3188_ddr_init);
 
+#ifdef CONFIG_PM
 #include "pm-rk3188.c"
-
+#endif
 
index 052ebe2daf5b1cb97ca4a5004798a2027e0c4487..aa1d37692e09bae76df8f29c93a88f43ead2d103 100755 (executable)
@@ -90,8 +90,6 @@ static void __init rk3288_boot_mode_init(void)
        rockchip_boot_mode_init(flag, mode);
 }
 
-extern void secondary_startup(void);
-
 static void usb_uart_init(void)
 {
     u32 soc_status2;
@@ -107,6 +105,8 @@ static void usb_uart_init(void)
 #endif // end of CONFIG_RK_USB_UART
 }
 
+extern void secondary_startup(void);
+
 static void __init rk3288_dt_map_io(void)
 {
        iotable_init(rk3288_io_desc, ARRAY_SIZE(rk3288_io_desc));
@@ -117,9 +117,11 @@ static void __init rk3288_dt_map_io(void)
        /* rkpwm is used instead of old pwm */
        //writel_relaxed(0x00010001, RK_GRF_VIRT + RK3288_GRF_SOC_CON2);
 
+#ifdef CONFIG_SMP
        /* enable fast boot */
        writel_relaxed(0x01000100, RK_SGRF_VIRT + RK3288_SGRF_SOC_CON0);
        writel_relaxed(virt_to_phys(secondary_startup), RK_SGRF_VIRT + RK3288_SGRF_FAST_BOOT_ADDR);
+#endif
 
        rk3288_boot_mode_init();
 }
@@ -343,7 +345,9 @@ DT_MACHINE_START(RK3288_DT, "RK30board")
        .map_io         = rk3288_dt_map_io,
        .init_time      = rk3288_dt_init_timer,
        .dt_compat      = rk3288_dt_compat,
+#ifdef CONFIG_PM
        .init_late      = rockchip_suspend_init,
+#endif
        .reserve        = rk3288_reserve,
        .restart        = rk3288_restart,
 MACHINE_END