* [U-Boot] M29W256GL + WEIM in uboot
@ 2012-02-13 20:30 Francisco Muñoz
2012-02-13 20:52 ` Marek Vasut
2012-02-13 21:33 ` Fabio Estevam
0 siblings, 2 replies; 8+ messages in thread
From: Francisco Muñoz @ 2012-02-13 20:30 UTC (permalink / raw)
To: u-boot
Hello, Im new to all of this, but I 've been reading most of the post
related to the M29w256 numonyx and the u-boot documentation without
any success :(
Im booting from MMC card and I want to parallel nor to be probed by
cfi, but I have not succeeded since the uboot code freezes when at the
beginning of the first "flash_cmd_write" in cfi_flash.c
/* Issue FLASH reset command */
flash_cmd_reset(info);
The CS0_BASE_ADDR has an start address matching #define
WEIM_ARB_BASE_ADDR 0x08000000 , however the range of
the WEIM interface register settings are between 021B_8000 --
021B_8098.
Many board files has the WEIM CS0 as the start of the registers and I
think this is why the NOR configuration is a matter of config settings
like the ones below.
#define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_SYS_MAX_FLASH_SECT 256
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
#define CONFIG_SYS_FLASH_CFI_AMD_RESET 1
/* Monitor at beginning of flash */
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
#define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256KiB */
#define CONFIG_ENV_SECT_SIZE 0x20000
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
If you could give me some help so that at least I could send write
commands to the chip without hang pls...
Regards,
Francisco
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 20:30 [U-Boot] M29W256GL + WEIM in uboot Francisco Muñoz
@ 2012-02-13 20:52 ` Marek Vasut
[not found] ` <CA+YwPEeJifw6oT8W+gEwOQ+N0zxVoaJd0KhLdc4kyQBgyJGbsg@mail.gmail.com>
2012-02-13 21:33 ` Fabio Estevam
1 sibling, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2012-02-13 20:52 UTC (permalink / raw)
To: u-boot
> Hello, Im new to all of this, but I 've been reading most of the post
> related to the M29w256 numonyx and the u-boot documentation without
> any success :(
>
> Im booting from MMC card and I want to parallel nor to be probed by
> cfi, but I have not succeeded since the uboot code freezes when at the
> beginning of the first "flash_cmd_write" in cfi_flash.c
>
> /* Issue FLASH reset command */
> flash_cmd_reset(info);
>
> The CS0_BASE_ADDR has an start address matching #define
> WEIM_ARB_BASE_ADDR 0x08000000 , however the range of
> the WEIM interface register settings are between 021B_8000 --
> 021B_8098.
>
> Many board files has the WEIM CS0 as the start of the registers and I
> think this is why the NOR configuration is a matter of config settings
> like the ones below.
>
> #define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR
> #define CONFIG_SYS_MAX_FLASH_BANKS 1
> #define CONFIG_SYS_MAX_FLASH_SECT 256
> #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
> #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1
>
> /* Monitor at beginning of flash */
> #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
> #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256KiB
> */
>
> #define CONFIG_ENV_SECT_SIZE 0x20000
> #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
> #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
>
> /* Address and size of Redundant Environment Sector */
> #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET +
> CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
>
>
> If you could give me some help so that at least I could send write
> commands to the chip without hang pls...
>
You're pointing CFI to configuration registers, you need to point it to where
the NOR flash is MMAPed. If it's not MMAPed, this isn't your driver.
M
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
[not found] ` <CA+YwPEeJifw6oT8W+gEwOQ+N0zxVoaJd0KhLdc4kyQBgyJGbsg@mail.gmail.com>
@ 2012-02-13 21:25 ` Marek Vasut
0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2012-02-13 21:25 UTC (permalink / raw)
To: u-boot
> Marek,
>
> Could you please go slower on this. Please point me what do I have to
> read because Im not getting the meaning of MMAPED in uboot and how to
> related this to my NOR flash.
Can you please at least obey basic rules of using a mailing list ?
DO NOT TOP-POST
DO NOT DROP IT FROM CC
MMAPed == memory mapped.
M
>
> Regards,
> Francisco.
>
> On Mon, Feb 13, 2012 at 2:52 PM, Marek Vasut <marek.vasut@gmail.com> wrote:
> >> Hello, Im new to all of this, but I 've been reading most of the post
> >> related to the M29w256 numonyx and the u-boot documentation without
> >> any success :(
> >>
> >> Im booting from MMC card and I want to parallel nor to be probed by
> >> cfi, but I have not succeeded since the uboot code freezes when at the
> >> beginning of the Marekfirst "flash_cmd_write" in cfi_flash.c
> >>
> >> /* Issue FLASH reset command */
> >> flash_cmd_reset(info);
> >>
> >> The CS0_BASE_ADDR has an start address matching #define
> >> WEIM_ARB_BASE_ADDR 0x08000000 , however the range of
> >> the WEIM interface register settings are between 021B_8000 --
> >> 021B_8098.
> >>
> >> Many board files has the WEIM CS0 as the start of the registers and I
> >> think this is why the NOR configuration is a matter of config settings
> >> like the ones below.
> >>
> >> #define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR
> >> #define CONFIG_SYS_MAX_FLASH_BANKS 1
> >> #define CONFIG_SYS_MAX_FLASH_SECT 256
> >> #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
> >> #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1
> >>
> >> /* Monitor at beginning of flash */
> >> #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
> >> #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve
> >> 256KiB */
> >>
> >> #define CONFIG_ENV_SECT_SIZE 0x20000
> >> #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
> >> #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
> >>
> >> /* Address and size of Redundant Environment Sector */
> >> #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET +
> >> CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
> >>
> >>
> >> If you could give me some help so that at least I could send write
> >> commands to the chip without hang pls...
> >
> > You're pointing CFI to configuration registers, you need to point it to
> > where the NOR flash is MMAPed. If it's not MMAPed, this isn't your
> > driver. M
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 20:30 [U-Boot] M29W256GL + WEIM in uboot Francisco Muñoz
2012-02-13 20:52 ` Marek Vasut
@ 2012-02-13 21:33 ` Fabio Estevam
2012-02-13 21:39 ` Francisco Muñoz
1 sibling, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2012-02-13 21:33 UTC (permalink / raw)
To: u-boot
On Mon, Feb 13, 2012 at 6:30 PM, Francisco Mu?oz
<francisco.missael@gmail.com> wrote:
> Hello, Im new to all of this, but I 've ?been reading most of the post
> related to the M29w256 numonyx and the u-boot documentation without
> any success :(
Which SoC are you using and which board?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 21:33 ` Fabio Estevam
@ 2012-02-13 21:39 ` Francisco Muñoz
2012-02-13 22:59 ` Fabio Estevam
0 siblings, 1 reply; 8+ messages in thread
From: Francisco Muñoz @ 2012-02-13 21:39 UTC (permalink / raw)
To: u-boot
On Mon, Feb 13, 2012 at 3:33 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Feb 13, 2012 at 6:30 PM, Francisco Mu?oz
> <francisco.missael@gmail.com> wrote:
>> Hello, Im new to all of this, but I 've ?been reading most of the post
>> related to the M29w256 numonyx and the u-boot documentation without
>> any success :(
>
> Which SoC are you using and which board?
Hey Fabio its me Francisco.
Im with the im6X
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 21:39 ` Francisco Muñoz
@ 2012-02-13 22:59 ` Fabio Estevam
2012-02-13 23:25 ` Francisco Muñoz
0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2012-02-13 22:59 UTC (permalink / raw)
To: u-boot
On Mon, Feb 13, 2012 at 7:39 PM, Francisco Mu?oz
<francisco.missael@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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 22:59 ` Fabio Estevam
@ 2012-02-13 23:25 ` Francisco Muñoz
2012-02-13 23:33 ` Fabio Estevam
0 siblings, 1 reply; 8+ messages in thread
From: Francisco Muñoz @ 2012-02-13 23:25 UTC (permalink / raw)
To: u-boot
On Mon, Feb 13, 2012 at 4:59 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Feb 13, 2012 at 7:39 PM, Francisco Mu?oz
> <francisco.missael@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] M29W256GL + WEIM in uboot
2012-02-13 23:25 ` Francisco Muñoz
@ 2012-02-13 23:33 ` Fabio Estevam
0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2012-02-13 23:33 UTC (permalink / raw)
To: u-boot
On Mon, Feb 13, 2012 at 9:25 PM, Francisco Mu?oz
<francisco.missael@gmail.com> wrote:
> I already did the reset with this lines in the
> board/freescale/mx6q_boardsabreauto.c ? ? board_init()
Hmm...this board is not in mainline U-boot, so this is not the correct
place to ask for assistance.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-02-13 23:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 20:30 [U-Boot] M29W256GL + WEIM in uboot Francisco Muñoz
2012-02-13 20:52 ` Marek Vasut
[not found] ` <CA+YwPEeJifw6oT8W+gEwOQ+N0zxVoaJd0KhLdc4kyQBgyJGbsg@mail.gmail.com>
2012-02-13 21:25 ` Marek Vasut
2012-02-13 21:33 ` Fabio Estevam
2012-02-13 21:39 ` Francisco Muñoz
2012-02-13 22:59 ` Fabio Estevam
2012-02-13 23:25 ` Francisco Muñoz
2012-02-13 23:33 ` Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.