锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

MT7621和QCA9558的差距 浅谈MT7621应用

时间:2021-03-08 00:24:28

  本文主要是通过关于MT7621和QCA9558的相关技术介绍,并着重对MT7621和QCA9558进行比较详尽的对比研究分析。

  MT7621和QCA9558的差距

MT7621比9558好很多。不是一个档次的。你可以去openwrt官网看看,我给你剪个图。你会很清楚的。最后一列越高越好。9558比MT7620A好一点。MT7621应该面对的竞争对手是高通的BCM4708/4709或IPQ8064。不过这只是MTK的愿望,7621的性能离这两款还有点远,所以MT7623出来的比较晚,但是芯片已经发布一年多了。到目前为止,市场上还没有消费者级的路由芯片,我猜这还是MTK的老问题。

MT7621和QCA9558的差距 浅谈MT7621应用

MT7621和QCA9558的差距 浅谈MT7621应用

  浅谈MT7621应用

Openwrt 的最新内核(3.18.23)已经支持32m spi flash 的读、写和擦除操作。然而,要么是系统考虑不周,要么是 mt7621系统中的 bug 无法在 w25q256配置的 mt7621开发板上进行软重置!在查阅相关资料后发现,mt7621默认支持24位(3字节)的 spi 地址模式,但必须切换到32位(4字节)地址模式才能支持32m 或更多 spi 闪存。当软重置时,spi 处于32位模式,没有切换回默认的24位模式,导致重置,mt7621在默认的24位模式,无法与32位模式 spi 通信,系统崩溃。

在linux源代码内核目录下,有一个reboot.c文件,它公开了一个register_reboot_notifier方法,可以让内核中的代码有机会得到重启通知。当我们继续分析reboot.c代码时,我们会发现一些更有趣的东西:

  /**

* KERNEL_RESTART- restart the system

* @ cmd: pointer to the buffer containing the command to be restarted

  * or %NULL

  *

: : Shut everything down and perform a clean reboot.

* It is not safe to call in an interrupt context.

  */

  void kernel_restart(char *cmd)

  {

kernel _ restart _ prepare(cmd);

Migration_to_reboot_cpu ()

syscore_shutdown():

  if (!cmd)

Pr ("Restarting System N") ;

  else

Pr ("restarting system with command '% S' n" , CMD) ;

  kmsg_dump(KMSG_DUMP_RESTART);

MACHINE_RESTART (Cmd)

  }

在kernel_restart,一种新方法kernel_restart_prepare称为:

  void kernel_restart_prepare(char *cmd)

  {

Blocking notifier (& AMP; reboot notifier list, sys restart, CMD) ;

System status = system restart;

Usermodehelper_Disable ()

  device_shutdown();

  }

Device shutdown drivers/base/core. C something something:

  /**

* Device shutdown-cal-shutdown () is closed on each device.

  */

  void device_shutdown(void)

  {

struct device *dev,* parent

& & DEVICES KSET-LIST LOCK;

  /*

The list of mobile devices back, turning off each device in turn.

  * Beware that device unplug events may also start pulling

: : The device remains offline even if the system is being shut down.

  */

while(! List_empty(&devices_kset- >) list)

Dev=list_entry (device_kset- "list.prev,struct device

科比. 入口);

  /*

  * hold reference count of device‘s parent to

# Don't let your parents'

  * lock is to be held

  */

parent = get _ device(dev->)parent;

获取设备(Dev)

  /*

Make sure the device is turned off in the settings list

  * event that dev-》*-》shutdown() doesn‘t remove it.

  */

(& Dev -)/KOBJ. Entry;

& Devices kset-list Lock;

  /* hold lock to avoid race with probe/release */

如果(父母)

  device_lock(parent);

  device_lock(dev);

/ * No more runtime hangs are allowed * /

pm_runtime_get_noresume (development):

pm _ runtime _ barrier(dev);

  // manfeel, add debug info

//Dev Info (Dev, "search shutdown method..N") ;

If (dev- "bus && dev-" bus-"shutdown) {

  //if (initcall_debug) manfeel

dev_info(dev,“关机\ n”);

开发- 巴士 - 关闭 (开发):

} ELSE IF (dev- "driver & & dev-" driver-"close) {

  //if (initcall_debug) manfeel

dev_info(dev,“关机\ n”);

《驱动程序关闭》(dev);

  }

Device_unlock (Dev)

如果(父母)

Device Unlock (parent) ;

  put_device(dev);

put_device (parents):

& & DEVICES KSET-LIST LOCK;

  }

& Devices kset-list Lock;

async _ synchronize _ full();

  }

通过阅读代码不难发现,DEVICE_SHUTDOWN中枚举了设备的Shutdown方法,如果存在,则会调用它。

因此,32M spi 闪光灯的重置方法喷出薄。

  解决办法

Go to driver /MTD/ device/m25p80.c.

  修改如下代码:

25P remove (struct SPI device * Spi)

  {

Struct m25p*flash=spi_get_drvdata (SPI)

  // manfeel note: add spi flash reset code

闪存-“命令[0]=0x66

SPI_WRITE (flash- "SPI,flash-" command, 1)

flash->”命令[0]= 0x 99;

SPI_WRITE (flash- "SPI,flash-" command, 1)

  /* Clean up MTD stuff. */

Back mtd_device_unregister (Flash)

  }

25P80/DRIVER = ..

  .driver = {

  .name = “m25p80”,

.owner = this_module

  },

.id_table=m25p_ids,

。 Probes and m25p_probe,

. remove = m25p_remove,

/ / ManFeel, reset SPI FLASH by adding shutdown method

。 Close the m25p_remove,

Many chips have deep power cuts

* input should be explicitly entered in the SUSPEND () to minimize power consumption.

And when they're idle.

  */

  };

  结语

  关于MT7621和QCA9558的相关技术介绍我们就到这了,如有研究不足问题之处欢迎指正。

相关阅读推荐:ipq8064和mt7621两款SOC介绍


锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章