示例#1
0
文件: pad.c 项目: freakone/Intruder-1
void pad_init(void)
{
    CMD_DIR_OUT;
    ATT_DIR_OUT;
    CLK_DIR_OUT;

	DATA_DIR_IN;

    ATT_SET;
    CLK_SET;
    CMD_SET;

	pad_config();
}
示例#2
0
void ogc_input__config(u8 num, u8 type, u8 padtype)
{
  switch (type)
  {
    case 0:
      pad_config(num, padtype);
      break;
    
    default:
#ifdef HW_RVL
      wpad_config(num,type-1, padtype);
#endif
      break;
  }
}
示例#3
0
void ogc_input__config(u8 pad, u8 type)
{
  switch (type)
  {
    case 0:
      pad_config(pad);
      break;
    
#ifdef HW_RVL
    case 1:
      wpad_config(pad);
      break;
#endif
    
    default:
      break;
  }
}
int hPlatform_Wlan_Hardware_Init(void *tnet_drv)
{
    TWlanDrvIfObj *drv = tnet_drv;

//#20100504 WiFi taewonee.kim [Start] For setting LGE SDIO of GPIO
#ifdef __HEAVEN__ // 11Aug2009 Clark for Aproject
	/* choose gpio 23, pull up */
	/* Setting MUX Mode 4 , Pull bits 0 */
	/* Should set (x is don't change):	xxxx xxxx xxxx xxxx xxxx xxxx xxx1 1000 */
#if 1
//Below Pad configuration value will confirm from TI OMAP.
//To test, you can use below Pad configuration value .
       //pad_config(CONTROL_PADCONF_ETK_D9, 0xFFFF, 0x3a1c0000);
       pad_config(CONTROL_PADCONF_ETK_D9, 0xFFFF, 0x361c0000);
#else
	pad_config(CONTROL_PADCONF_ETK_D9, 0xFFE0FFFF, 0x001C0000);
#endif

       
	pad_config(CONTROL_PADCONF_GPIO_OE, 0xFF7FFFFF, 0x00000000); // GPIO23 OutEnable

	/* choose gpio 24, pull up, activated */
	/* Setting MUX Mode 4 , Pull bits 3 */
	/* Should set (x is don't change):	xxxx xxxx xxxx xxxx xxxx xxxx xxx1 1100 */
	pad_config(CONTROL_PADCONF_ETK_D10, 0xFFFFFFF0, 0x0000011C);

	/*
	  * set pull up on all SDIO lines
	  * Setting MUX Mode of 0, and pull bits to 3
	  */

	/* set for mmc2_cmd - second half of the padconf register
	  * Should set (x is don't change):  xxxx xxxx xxx1 1000 xxxx xxxx xxxx xxxx */
	pad_config(CONTROL_PADCONF_MMC3_CMD, 0xFFF0FFFF, 0x011A0000);

	pad_config(CONTROL_PADCONF_MMC3_CLK, 0xFFFFFFE0,0x0000011A);
#endif
//#20100504 WiFi taewonee.kim [Stop]

    wifi_add_dev();
    if (wifi_irqres) {
        drv->irq = wifi_irqres->start;
        drv->irq_flags = wifi_irqres->flags & IRQF_TRIGGER_MASK;
    }
    else {
        drv->irq = TNETW_IRQ;
        drv->irq_flags = (unsigned long)IRQF_TRIGGER_FALLING;
    }

    return 0;
}