[U-Boot] M29W256GL + WEIM in uboot

Francisco Muñoz francisco.missael at gmail.com
Tue Feb 14 00:25:20 CET 2012


On Mon, Feb 13, 2012 at 4:59 PM, Fabio Estevam <festevam at gmail.com> wrote:
> On Mon, Feb 13, 2012 at 7:39 PM, Francisco Muñoz
> <francisco.missael at gmail.com> wrote:
>
>> Im with the im6X
>
> Take a look for mx31ads.c as an example. You need to setup the chip
> select like in mxc_setup_weimcs() function.
>
> BTW, I don't see any current mx6 board with NOR in mainline U-boot.

I already did the reset with this lines in the
board/freescale/mx6q_boardsabreauto.c     board_init()

  writel(0x00020001,WEIM_BASE_ADDR);
  writel(0x1C022000,WEIM_BASE_ADDR + 0x8);
  writel(0x0804a240,WEIM_BASE_ADDR + 0x10);

However, the uboot code hangs when i runt on the board
 */
1896 ulong flash_get_size (phys_addr_t base, int banknum)
1897 {
1898         flash_info_t *info = &flash_info[banknum];
1899         int i, j;
1900         flash_sect_t sect_cnt;
1901         phys_addr_t sector;
1902         unsigned long tmp;
1903         int size_ratio;
1904         uchar num_erase_regions;
1905         int erase_region_size;
1906         int erase_region_count;
1907         struct cfi_qry qry;
1908         unsigned long max_size;
1909
1910         memset(&qry, 0, sizeof(qry));
1911
1912         info->ext_addr = 0;
1913         info->cfi_version = 0;
1914 #ifdef CONFIG_SYS_FLASH_PROTECTION
1915         info->legacy_unlock = 0;
1916 #endif
1917
1918         info->start[0] = (ulong)map_physmem(base,
info->portwidth, MAP_NOCACHE);
1919         printf("Estamos ok con el pointer malo %u \n",info->portwidth);
1920         if (flash_detect_cfi (info, &qry))
<--------------------------------------------------------------------------------------------
It hangs in the reset commands             cfi_flash.c

Regards,
Francisco


More information about the U-Boot mailing list