#define CMMB_1186_SPIIRQ RK2818_PIN_PA6
+void cmmb_io_init_mux(void)
+{
+ rk2818_mux_api_set(GPIOA6_FLASHCS2_SEL_NAME, 0);
+
+}
+
static struct cmmb_io_def_s cmmb_io = {
.cmmb_pw_en = FPGA_PIO4_03,
.cmmb_pw_dwn = FPGA_PIO2_09,
.cmmb_pw_rst = FPGA_PIO2_06,
- .cmmb_irq = RK2818_PIN_PA6
+ .cmmb_irq = RK2818_PIN_PA6,
+ .io_init_mux = cmmb_io_init_mux
};
static struct spi_board_info board_spi_devices[] = {
//check if we lost msg, if so, recover
if(g_Sms_MsgFound_Counter < g_Sms_Int_Counter){
- sms_err("we lost msg, probably becouse dma time out\n");
+ // sms_err("we lost msg, probably becouse dma time out\n");
//for(i=0; i<16; i++)
{
//smsspi_common_transfer_msg(&spi_device->dev, NULL, 1);
u_irq_count ++;
// PDEBUG("INT counter = %d\n", u_irq_count);
- printk("cmmb siano 1186 int\n");
+// printk("cmmb siano 1186 int\n");
sms_info("spibus_interrupt %d\n", u_irq_count);
if (spiphy_dev->interruptHandler)
mdelay(100);
gpio_direction_output(cmmb_io_ctrl->cmmb_pw_en,1);
// gpio_set_value(CMMB_1186_POWER_ENABLE,GPIO_HIGH);
- mdelay(500);
+ mdelay(200);
// gpio_set_value(CMMB_1186_POWER_DOWN,GPIO_HIGH);
gpio_direction_output(cmmb_io_ctrl->cmmb_pw_dwn,1);
- mdelay(500);
+ mdelay(200);
// gpio_set_value(CMMB_1186_POWER_RESET,GPIO_HIGH);
gpio_direction_output(cmmb_io_ctrl->cmmb_pw_rst,1);
- mdelay(500);
+ mdelay(200);
printk("cmmb chip_poweron !!!!\n");
}
gpio_pull_updown(CMMB_1186_SPIIRQ,GPIOPullUp);
printk("leave the request_cmmb_gpio\n");
#endif
-
+#if 1
int ret;
if(cmmb_io_ctrl)
{
+ if(cmmb_io_ctrl->io_init_mux)
+ cmmb_io_ctrl->io_init_mux();
+ else
+ printk("cmmb_io_ctrl->io_init_mux is null !!!!!!!\n");
ret = gpio_request(cmmb_io_ctrl->cmmb_pw_rst, NULL);
if (ret) {
printk("%s:failed to request CMMB_1186_POWER_RESET\n",__FUNCTION__);
//return ret;
}
- rk2818_mux_api_set(GPIOA6_FLASHCS2_SEL_NAME, 0);
+ // rk2818_mux_api_set(GPIOA6_FLASHCS2_SEL_NAME, 0);
ret = gpio_request(cmmb_io_ctrl->cmmb_irq,"cmmb irq");
if (ret) {
//dev_err(&pdev->dev, "failed to request play key gpio\n");
gpio_pull_updown(cmmb_io_ctrl->cmmb_irq,GPIOPullUp);
printk("leave the request_cmmb_gpio\n");
}
-
+#endif
}
static void release_cmmb_gpio()
{
+#if 1
if(cmmb_io_ctrl)
{
gpio_free(cmmb_io_ctrl->cmmb_pw_rst);
cmmb_io_ctrl = NULL;
printk("leave the release_cmmb_gpio\n");
}
-
+#endif
}