},
};
-int __init mx6q_register_gpios(void)
+int mx6q_register_gpios(void)
{
/* 7 ports for Mx6 */
return mxc_gpio_init(mxc_gpio_ports, 7);
}
return 0;
}
-void __init mx6_init_irq(void)
+void mx6_init_irq(void)
{
struct irq_desc *desc;
unsigned int i;
extern int set_cpu_freq(int wp);
#endif
extern void mx6q_suspend(suspend_state_t state);
+extern void mx6_init_irq(void);
static struct device *pm_dev;
struct clk *gpc_dvfs_clk;
__raw_writel(local_timer[3], local_twd_base + LOCAL_TWD_INT_OFFSET);
#endif
}
+
static int mx6_suspend_enter(suspend_state_t state)
{
mx6_suspend_store();
mx6q_suspend(state);
if (state == PM_SUSPEND_MEM) {
- /* need to re-init gic */
- gic_init(0, 29, gic_dist_base, gic_cpu_base);
+ /* need to re-init irq */
+ mx6_init_irq();
#ifdef CONFIG_LOCAL_TIMERS
gic_enable_ppi(IRQ_LOCALTIMER);
*/
static struct lock_class_key gpio_lock_class;
-int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
+int mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
{
int i, j;
+ static bool initialed;
/* save for local usage */
mxc_gpio_ports = port;
spin_lock_init(&port[i].lock);
- /* its a serious configuration bug when it fails */
- BUG_ON( gpiochip_add(&port[i].chip) < 0 );
+ if (!initialed)
+ /* its a serious configuration bug when it fails */
+ BUG_ON(gpiochip_add(&port[i].chip) < 0);
if (cpu_is_mx1() || cpu_is_mx3() || cpu_is_mx25() ||
cpu_is_mx51() || cpu_is_mx53() || cpu_is_mx6q()) {
}
}
}
-
+ initialed = true;
if (cpu_is_mx2()) {
/* setup one handler for all GPIO interrupts */
irq_set_chained_handler(port[0].irq, mx2_gpio_irq_handler);