static void gpio_set_vbus_power(char is_power_on) { if(is_power_on) { aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 0, 3, 1); aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 0, 19, 1); // aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 0, 2, 1); // aml_set_reg32_bits(AOBUS_REG_ADDR(0x24), 1, 18, 1); } else { } }
static void ir_hardware_init(void) { unsigned int control_value; rec_idx = 0; last_jiffies = 0xffffffff; //mask--mux gpio_A07 to remote aml_set_reg32_mask(AOBUS_REG_ADDR(AO_RTI_PIN_MUX_REG),1<<0); //max frame time is 80ms, base rate is 2us control_value = 3<<28|(0x9c40 << 12)|0x1; am_remote_write_reg(AM_IR_DEC_REG0, control_value); /*[3-2]rising or falling edge detected [8-7]Measure mode */ control_value = 0x8574; am_remote_write_reg(AM_IR_DEC_REG1, control_value); request_fiq(INT_REMOTE, &ir_fiq_interrupt); }