/*------------------------------------------------------------------------------ * intialize nexell soc and board status. */ static void set_gpio_strenth(U32 Group, U32 BitNumber, U32 mA) { U32 drv1=0, drv0=0; U32 drv1_value, drv0_value; switch( mA ) { case 0 : drv0 = 0; drv1 = 0; break; case 1 : drv0 = 0; drv1 = 1; break; case 2 : drv0 = 1; drv1 = 0; break; case 3 : drv0 = 1; drv1 = 1; break; default: drv0 = 0; drv1 = 0; break; } DBGOUT("DRV Strength : GRP : i %x Bit: %x ma :%d \n", Group, BitNumber, mA); drv1_value = NX_GPIO_GetDRV1(Group) & ~(1 << BitNumber); drv0_value = NX_GPIO_GetDRV0(Group) & ~(1 << BitNumber); if (drv1) drv1_value |= (drv1 << BitNumber); if (drv0) drv0_value |= (drv0 << BitNumber); DBGOUT(" Value : drv1 :%8x drv0 %8x \n ",drv1_value, drv0_value); NX_GPIO_SetDRV0 ( Group, drv0_value ); NX_GPIO_SetDRV1 ( Group, drv1_value ); }
/*------------------------------------------------------------------------------ * set nexell soc pad func. */ static void set_gpio_strenth(U32 Group, U32 BitNumber, U32 mA) { U32 drv1=0, drv0=0; U32 drv1_value, drv0_value; switch( mA ) { case 0 : drv0 = 0; drv1 = 0; break; case 1 : drv0 = 0; drv1 = 1; break; case 2 : drv0 = 1; drv1 = 0; break; case 3 : drv0 = 1; drv1 = 1; break; default: drv0 = 0; drv1 = 0; break; } drv1_value = NX_GPIO_GetDRV1(Group) & ~(1 << BitNumber); drv0_value = NX_GPIO_GetDRV0(Group) & ~(1 << BitNumber); if (drv1) drv1_value |= (drv1 << BitNumber); if (drv0) drv0_value |= (drv0 << BitNumber); NX_GPIO_SetDRV0 ( Group, drv0_value ); NX_GPIO_SetDRV1 ( Group, drv1_value ); }