static void wlan_status_check(int card_present, void *dev_id) { struct gl520xmmc_host *host = dev_id; pr_info("SDIO Wi-Fi check status, present (%d -> %d)\n", host->sdio_present, card_present); if (card_present == 0) { pr_info("MMC: emulate power off the SDIO card\n"); module_reset(host->module_id); } host->sdio_present = card_present; mmc_detect_change(host->mmc, 0); }
int machine_reset( int hard_reset ) { size_t i; int error; /* Clear poke list (undoes effects of active pokes on Spectrum memory) */ pokemem_clear(); sound_ay_reset(); tape_stop(); memory_pool_free(); machine_current->ram.romcs = 0; machine_set_variable_timings( machine_current ); memory_reset(); /* Do the machine-specific bits, including loading the ROMs */ error = machine_current->reset(); if( error ) return error; module_reset( hard_reset ); error = machine_current->memory_map(); if( error ) return error; /* Set up the contention array */ for( i = 0; i < machine_current->timings.tstates_per_frame; i++ ) { ula_contention[ i ] = machine_current->ram.contend_delay( i ); ula_contention_no_mreq[ i ] = machine_current->ram.contend_delay_no_mreq( i ); } /* Update the disk menu items */ ui_menu_disk_update(); /* clear out old display image ready for new one */ display_refresh_all(); return 0; }
int machine_reset( int hard_reset ) { size_t i; int error; sound_ay_reset(); tape_stop(); memory_pool_free(); machine_current->ram.romcs = 0; machine_set_variable_timings( machine_current ); /* Do the machine-specific bits, including loading the ROMs */ error = machine_current->reset(); if( error ) return error; module_reset( hard_reset ); error = machine_current->memory_map(); if( error ) return error; /* Set up the contention array */ for( i = 0; i < machine_current->timings.tstates_per_frame; i++ ) { ula_contention[ i ] = machine_current->ram.contend_delay( i ); ula_contention_no_mreq[ i ] = machine_current->ram.contend_delay_no_mreq( i ); } /* Check for an Interface I ROM */ ui_statusbar_update( UI_STATUSBAR_ITEM_MICRODRIVE, UI_STATUSBAR_STATE_NOT_AVAILABLE ); /* Update the disk menu items */ ui_menu_disk_update(); /* clear out old display image ready for new one */ display_refresh_all(); return 0; }
static int sensor_clk_init(void) { struct clk *tmp = NULL; int ret = 0; module_clk_enable(MOD_ID_CSI); module_reset(MODULE_RST_CSI); DBG_INFO("sensor channel:%d", g_sens_channel); if(g_sens_channel == 0) tmp = clk_get(NULL, CLKNAME_SENSOR_CLKOUT0); else tmp = clk_get(NULL, CLKNAME_SENSOR_CLKOUT1); if (IS_ERR(tmp)) { ret = PTR_ERR(tmp); DBG_ERR("get isp-channel-%d clock error%d", g_sens_channel, ret); return ret; } g_sensor_clk = tmp; DBG_INFO("sensor_clk:%p", g_sensor_clk); return ret; }
static int isp_clk_init(void) { struct clk *tmp = NULL; int ret = 0; module_reset(MODULE_RST_BISP); module_clk_enable(MOD_ID_BISP); DBG_INFO(""); tmp = clk_get(NULL, CLKNAME_BISP_CLK); if (IS_ERR(tmp)) { ret = PTR_ERR(tmp); g_isp_clk = NULL; DBG_ERR("get isp clock error (%d)", ret); return ret; } g_isp_clk = tmp; mdelay(1); return ret; }