[U-Boot-Users] parallel FLASH

Hey all,
I have a MPC860T board which can have one or two FLASH chips on it. When one FLASH chip is on it it is used in 16bit mode, if two FLASH chips are present it is used in 32 bit mode ( 2 * 16bit FLASH chips in parallel ). The initial chip select is set by a hardware jumper with the reset-word.
U-Boot only allows on setup for BR0/OR0 and resets the bus width, so i hacked the chip select initialization part to not reset the bus width. The question is should u-boot not all ways leave the bus width of CS0 alone ?
An other thing that happens is that i didn't really find a generic way to do flash programming. All boards seem to have their own (copied from each other) flash routines. Would it be possible to have more generic FLASH routines, and for example have a config option to select which FLASH chips are possible (to maybe save space)?
- Erwin

Hello Erwin,
in message 1049272189.27238.18.camel@drake.erwin.muffin.org you wrote:
U-Boot only allows on setup for BR0/OR0 and resets the bus width, so i hacked the chip select initialization part to not reset the bus width. The question is should u-boot not all ways leave the bus width of CS0 alone ?
What exactly are you talking about? U-Boot does not change the port size of the boot device unless you configure it that way.
An other thing that happens is that i didn't really find a generic way to do flash programming. All boards seem to have their own (copied from each other) flash routines. Would it be possible to have more generic FLASH routines, and for example have a config option to select which FLASH chips are possible (to maybe save space)?
It may be possible, but I have not seen such a patch yet. Note that it should not increase size of the existing systems, and it must not break existing code.
Best regards,
Wolfgang Denk

On Wed, 2003-04-02 at 13:05, Wolfgang Denk wrote:
Hello Erwin,
in message 1049272189.27238.18.camel@drake.erwin.muffin.org you wrote:
U-Boot only allows on setup for BR0/OR0 and resets the bus width, so i hacked the chip select initialization part to not reset the bus width. The question is should u-boot not all ways leave the bus width of CS0 alone ?
What exactly are you talking about? U-Boot does not change the port size of the boot device unless you configure it that way.
Well in cpu/mpc8xx/cpu_init.c br0 and or0 are always set to CFG_BR0_PRELIM and CFG_OR0_PRELIM. So if the bus width is set to 16 in CFG_BR0_PRELIM my board will not run when it is a dual-FLASH version, and when i set it to 32 bit it won't run when its a single-FLASH version. And i don't want to make two different bootloaders, since that flash configuration is the only difference. So what i did was just masking out the BR_PS_MSK to keep those the same as they where on reset, and that works fine.
An other thing that happens is that i didn't really find a generic way to do flash programming. All boards seem to have their own (copied from each other) flash routines. Would it be possible to have more generic FLASH routines, and for example have a config option to select which FLASH chips are possible (to maybe save space)?
It may be possible, but I have not seen such a patch yet. Note that it should not increase size of the existing systems, and it must not break existing code.
Best regards,
Wolfgang Denk
- Erwin

Hi Erwin,
in message 1049282647.27232.70.camel@drake.erwin.muffin.org you wrote:
Well in cpu/mpc8xx/cpu_init.c br0 and or0 are always set to CFG_BR0_PRELIM and CFG_OR0_PRELIM. So if the bus width is set to 16 in CFG_BR0_PRELIM my board will not run when it is a dual-FLASH version, and when i set it to 32 bit it won't run when its a single-FLASH version. And i don't want to make two different bootloaders, since that flash configuration is the only difference. So what i did was just masking out the BR_PS_MSK to keep those the same as they where on reset, and that works fine.
I see. You should be able to use something like this in such a case:
#define CFG_BR0_PRELIM ((memctl->memc_br0 & BR_PS_MSK) | your_other_bits)
Best regards,
Wolfgang Denk

On Wed, 2003-04-02 at 18:44, Wolfgang Denk wrote:
Hi Erwin,
in message 1049282647.27232.70.camel@drake.erwin.muffin.org you wrote:
Well in cpu/mpc8xx/cpu_init.c br0 and or0 are always set to CFG_BR0_PRELIM and CFG_OR0_PRELIM. So if the bus width is set to 16 in CFG_BR0_PRELIM my board will not run when it is a dual-FLASH version, and when i set it to 32 bit it won't run when its a single-FLASH version. And i don't want to make two different bootloaders, since that flash configuration is the only difference. So what i did was just masking out the BR_PS_MSK to keep those the same as they where on reset, and that works fine.
I see. You should be able to use something like this in such a case:
#define CFG_BR0_PRELIM ((memctl->memc_br0 & BR_PS_MSK) | your_other_bits)
Exactly what i was looking for :-)
Thanx,
Erwin
Best regards,
Wolfgang Denk

Hello,
just wondering... how did you connect the adress lines? for 16-Bit Mode you need to connect down to A30, for 32-Bit Mode you need to connect down to A29
either you will have weird adressing during programming or you have to shift all adress lines
Regards, Reinhard
----- Original Message -----
I have a MPC860T board which can have one or two FLASH chips on it. When one FLASH chip is on it it is used in 16bit mode, if two FLASH chips are present it is used in 32 bit mode ( 2 * 16bit FLASH chips in parallel ). The initial chip select is set by a hardware jumper with the reset-word.

On Wed, 2003-04-02 at 20:43, Reinhard Meyer wrote:
Hello,
just wondering... how did you connect the adress lines? for 16-Bit Mode you need to connect down to A30, for 32-Bit Mode you need to connect down to A29
either you will have weird adressing during programming or you have to shift all adress lines
All address lines are shifted, there are actual 3 place to put flash on the board. The PCB looks a bit like this.
A B C D E F
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A and C FLASH 1 32 bit B and E FLASH 16 BIT D and F FLASH 2 32 bit
- Erwin
Regards, Reinhard
----- Original Message -----
I have a MPC860T board which can have one or two FLASH chips on it. When one FLASH chip is on it it is used in 16bit mode, if two FLASH chips are present it is used in 32 bit mode ( 2 * 16bit FLASH chips in parallel ). The initial chip select is set by a hardware jumper with the reset-word.
This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users
participants (3)
-
Erwin Rol
-
Reinhard Meyer
-
Wolfgang Denk