static inline void pnx4008_suspend(void) { void (*pnx4008_cpu_suspend_ptr) (void); local_irq_disable(); local_fiq_disable(); clk_disable(pll4_clk); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_PIN_BASE_INT)); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_INT_BASE_INT)); /*saving portion of SRAM to be used by suspend function. */ memcpy(saved_sram, (void *)SRAM_VA, pnx4008_cpu_suspend_sz); /*make sure SRAM copy gets physically written into SDRAM. SDRAM will be placed into self-refresh during power down */ flush_cache_all(); /*copy suspend function into SRAM */ memcpy((void *)SRAM_VA, pnx4008_cpu_suspend, pnx4008_cpu_suspend_sz); /*do suspend */ pnx4008_cpu_suspend_ptr = (void *)SRAM_VA; pnx4008_cpu_suspend_ptr(); /*restoring portion of SRAM that was used by suspend function */ memcpy((void *)SRAM_VA, saved_sram, pnx4008_cpu_suspend_sz); clk_enable(pll4_clk); local_fiq_enable(); local_irq_enable(); }
static void __init pnx4008_init(void) { /*disable all START interrupt sources, and clear all START interrupt flags */ __raw_writel(0, START_INT_ER_REG(SE_PIN_BASE_INT)); __raw_writel(0, START_INT_ER_REG(SE_INT_BASE_INT)); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_PIN_BASE_INT)); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_INT_BASE_INT)); platform_add_devices(devices, ARRAY_SIZE(devices)); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); /* Switch on the UART clocks */ pnx4008_uart_init(); }
static void __init pnx4008_init(void) { /*disable all START interrupt sources, and clear all START interrupt flags */ __raw_writel(0, START_INT_ER_REG(SE_PIN_BASE_INT)); __raw_writel(0, START_INT_ER_REG(SE_INT_BASE_INT)); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_PIN_BASE_INT)); __raw_writel(0xffffffff, START_INT_RSR_REG(SE_INT_BASE_INT)); platform_add_devices(devices, ARRAY_SIZE(devices)); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); /* Switch on the UART clocks */ pnx4008_uart_init(); #ifdef CONFIG_KGDB_8250 kgdb8250_add_platform_port(0, &platform_serial_ports[0]); kgdb8250_add_platform_port(1, &platform_serial_ports[1]); #endif }