Generate random ethernet mac And program it to eFuse

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate random ethernet mac And program it to eFuse

Generate random ethernet mac And program it to eFuse

Abstract:

On the time otp driver initializes, it will check the mac bits of eFuse,  when the value is invalid, generate a random mac, and program  it to eFuse.

Environment:

i.mx6dl

android-4.2.2

kernel-3.0.35

Changes:

1. kernel_imx/arch/arm/mach-mx6/mx6_fec.c

----------------------------------------------------------------

void __init imx6_init_fec(struct fec_platform_data fec_data)

{

  fec_get_mac_addr(fec_data.mac);

  if (!is_valid_ether_addr(fec_data.mac))

      fec_data.mac[0] = 0x10; // changed by xxx

  if (cpu_is_mx6sl())

  imx6sl_add_fec(&fec_data);

  else

  imx6q_add_fec(&fec_data);

}

2. kernel_imx/drivers/char/fsl_otp.c

----------------------------------------------------------------

//add by xxx

static void check_otp_mac(void)

{

  unsigned int index_mac0 = 34;

  unsigned int index_mac1 = 35;

  u32 value_mac0 = 0;

  u32 value_mac1 = 0;

  u32 value_random_mac0 = 0;

  u32 value_random_mac1 = 0;

  char otp_mac[6], random_mac[6];

  memset(otp_mac, 0, sizeof(otp_mac));

  memset(random_mac, 0, sizeof(random_mac));

  mutex_lock(&otp_mutex);

  //get

  if (otp_read_prepare(otp_data)) {

  mutex_unlock(&otp_mutex);

  return 0;

  }

  value_mac0 = __raw_readl(REGS_OCOTP_BASE + HW_OCOTP_CUSTn(index_mac0));

  value_mac1 = __raw_readl(REGS_OCOTP_BASE + HW_OCOTP_CUSTn(index_mac1));

  otp_read_post(otp_data);

  mutex_unlock(&otp_mutex);

  if(value_mac0 != 0 && value_mac1 != 0)

  {

  otp_mac[5] = value_mac0 & 0xff;

  otp_mac[4] = (value_mac0 >> 8) & 0xff;

  otp_mac[3] = (value_mac0 >> 16) & 0xff;

  otp_mac[2] = (value_mac0 >> 24) & 0xff;

  otp_mac[1] = value_mac1 & 0xff;

  otp_mac[0] = (value_mac1 >> 8) & 0xff;

  }

  printk("otp_mac=%pM\n", otp_mac);

  //check

  if (!is_valid_ether_addr(otp_mac))

  {

  random_ether_addr(random_mac);

  printk("get random mac:%pM\n", random_mac);

  //set

  value_random_mac0 = 0;

  value_random_mac0 = value_random_mac0 | random_mac[2];

  value_random_mac0 = (value_random_mac0 << 8) | random_mac[3];

  value_random_mac0 = (value_random_mac0 << 8) | random_mac[4];

  value_random_mac0 = (value_random_mac0 << 8) | random_mac[5];

  value_random_mac1 = 0;

  value_random_mac1 = value_random_mac1 | random_mac[0];

  value_random_mac1 = (value_random_mac1 << 8) | random_mac[1];

  mutex_lock(&otp_mutex);

  if (otp_write_prepare(otp_data)) {

  mutex_unlock(&otp_mutex);

  return 0;

  }

  otp_write_bits(index_mac0, value_random_mac0, 0x3e77);

  otp_write_bits(index_mac1, value_random_mac1, 0x3e77);

  otp_write_post(otp_data);

  mutex_unlock(&otp_mutex);

  }

}

//end

3.  kernel_imx/drivers/char/fsl_otp.c

----------------------------------------------------------------

static int __devinit fsl_otp_probe(struct platform_device *pdev)

{

  ...

  retval = sysfs_create_group(otp_kobj, &attr_group);

  if (retval)

  goto error;

  mutex_init(&otp_mutex);

  //add by xxx

  check_otp_mac();

  //end

Tags (2)
%3CLINGO-SUB%20id%3D%22lingo-sub-1103747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGenerate%20random%20ethernet%20mac%20And%20program%20it%20to%20eFuse%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1103747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2014pt%3B%22%3E%3CSTRONG%3EAbstract%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EOn%20the%20time%20otp%20driver%20initializes%2C%20it%20will%20check%20the%20mac%20bits%20of%20eFuse%2C%26nbsp%3B%20when%20the%20value%20is%20invalid%2C%20generate%20a%20random%20mac%2C%20and%20program%26nbsp%3B%20it%20to%20eFuse.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2014pt%3B%22%3E%3CSTRONG%3EEnvironment%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23303030%3B%22%3Ei.mx6dl%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23303030%3B%22%3Eandroid-4.2.2%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23303030%3B%22%3Ekernel-3.0.35%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2014pt%3B%22%3E%3CSTRONG%20style%3D%22color%3A%20%23303030%3B%22%3EChanges%3A%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%20style%3D%22color%3A%20%23505050%3B%22%3E1.%20kernel_imx%2Farch%2Farm%2Fmach-mx6%2Fmx6_fec.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23505050%3B%22%3E----------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Evoid%20__init%20imx6_init_fec(struct%20fec_platform_data%20fec_data)%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20fec_get_mac_addr(fec_data.mac)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20if%20(!is_valid_ether_addr(fec_data.mac))%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20fec_data.mac%5B0%5D%20%3D%200x10%3B%20%3CSPAN%20style%3D%22color%3A%20%23303030%3B%22%3E%2F%2F%20changed%20by%20xxx%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20if%20(cpu_is_mx6sl())%3C%2FP%3E%3CP%3E%26nbsp%3B%20imx6sl_add_fec(%26amp%3Bfec_data)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20else%3C%2FP%3E%3CP%3E%26nbsp%3B%20imx6q_add_fec(%26amp%3Bfec_data)%3B%3C%2FP%3E%3CP%3E%7D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E2.%20kernel_imx%2Fdrivers%2Fchar%2Ffsl_otp.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23505050%3B%22%3E----------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%2F%2Fadd%20by%20xxx%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3Estatic%20void%20check_otp_mac(void)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20unsigned%20int%20index_mac0%20%3D%2034%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20unsigned%20int%20index_mac1%20%3D%2035%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20u32%20value_mac0%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20u32%20value_mac1%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20u32%20value_random_mac0%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20u32%20value_random_mac1%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20char%20otp_mac%5B6%5D%2C%20random_mac%5B6%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20memset(otp_mac%2C%200%2C%20sizeof(otp_mac))%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20memset(random_mac%2C%200%2C%20sizeof(random_mac))%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_lock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%2F%2Fget%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20if%20(otp_read_prepare(otp_data))%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_unlock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20return%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_mac0%20%3D%20__raw_readl(REGS_OCOTP_BASE%20%2B%20HW_OCOTP_CUSTn(index_mac0))%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_mac1%20%3D%20__raw_readl(REGS_OCOTP_BASE%20%2B%20HW_OCOTP_CUSTn(index_mac1))%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_read_post(otp_data)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_unlock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20if(value_mac0%20!%3D%200%20%26amp%3B%26amp%3B%20value_mac1%20!%3D%200)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B5%5D%20%3D%20value_mac0%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B4%5D%20%3D%20(value_mac0%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B3%5D%20%3D%20(value_mac0%20%26gt%3B%26gt%3B%2016)%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B2%5D%20%3D%20(value_mac0%20%26gt%3B%26gt%3B%2024)%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B1%5D%20%3D%20value_mac1%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_mac%5B0%5D%20%3D%20(value_mac1%20%26gt%3B%26gt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%26amp%3B%200xff%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20printk(%22otp_mac%3D%25pM%5Cn%22%2C%20otp_mac)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%2F%2Fcheck%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20if%20(!is_valid_ether_addr(otp_mac))%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20random_ether_addr(random_mac)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20printk(%22get%20random%20mac%3A%25pM%5Cn%22%2C%20random_mac)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%2F%2Fset%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac0%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac0%20%3D%20value_random_mac0%20%7C%20random_mac%5B2%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac0%20%3D%20(value_random_mac0%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%20random_mac%5B3%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac0%20%3D%20(value_random_mac0%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%20random_mac%5B4%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac0%20%3D%20(value_random_mac0%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%20random_mac%5B5%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac1%20%3D%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac1%20%3D%20value_random_mac1%20%7C%20random_mac%5B0%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20value_random_mac1%20%3D%20(value_random_mac1%20%26lt%3B%26lt%3B%20%3CLI-EMOJI%20id%3D%22lia_smiling-face-with-sunglasses%22%20title%3D%22%3Asmiling_face_with_sunglasses%3A%22%3E%3C%2FLI-EMOJI%3E%20%7C%20random_mac%5B1%5D%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_lock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20if%20(otp_write_prepare(otp_data))%20%7B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_unlock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20return%200%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_write_bits(index_mac0%2C%20value_random_mac0%2C%200x3e77)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_write_bits(index_mac1%2C%20value_random_mac1%2C%200x3e77)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20otp_write_post(otp_data)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20mutex_unlock(%26amp%3Botp_mutex)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%26nbsp%3B%20%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3E%7D%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%2F%2Fend%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E3.%26nbsp%3B%20kernel_imx%2Fdrivers%2Fchar%2Ffsl_otp.c%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23505050%3B%22%3E----------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Estatic%20int%20__devinit%20fsl_otp_probe(struct%20platform_device%20*pdev)%3C%2FP%3E%3CP%3E%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%20...%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20retval%20%3D%20sysfs_create_group(otp_kobj%2C%20%26amp%3Battr_group)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20if%20(retval)%3C%2FP%3E%3CP%3E%26nbsp%3B%20goto%20error%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20mutex_init(%26amp%3Botp_mutex)%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%2F%2Fadd%20by%20xxx%3C%2FP%3E%3CP%3E%26nbsp%3B%20%3CSPAN%20style%3D%22color%3A%20%23e23d39%3B%22%3Echeck_otp_mac()%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%2F%2Fend%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎07-07-2015 10:10 PM
Updated by: