MPC8313: fsl_elbc_nand and MDR
I am having what appears to be a little conflict with this driver, particularly with the MDR. My hardware uses NAND flash and an FPGA connected through the UPM. After the kernel is up and running, sometimes I cannot verify the data in the UPM RAM array. I am guessing right now that this is due to a use conflict between my application and the fsl_elbc_nand driver both trying to use the MDR at once.
Is there currently any sort of coordination that exists for the MDR in the fsl_elbc_nand driver? I have been looking through the code and have not been able to find any.
Any ideas on how to solve this would be appreciated as well.
Ron
Quoted 10 lines · Ron Madrid
I am having what appears to be a little conflict with this driver, particularly with the MDR. My hardware uses NAND flash and an FPGA connected through the UPM. After the kernel is up and running, sometimes I cannot verify the data in the UPM RAM array. I am guessing right now that this is due to a use conflict between my application and the
fsl_elbc_nanddriver both trying to use the MDR at once.
Quoted 4 lines
Is there currently any sort of coordination that exists for the MDR in the
fsl_elbc_nanddriver? I have been looking through the code and have not been able to find any.
There is not yet any such coordination. The current UPM code does not use MDR that I can see.
Quoted 2 lines
Any ideas on how to solve this would be appreciated as well.
Probably just add a mutex that protects the shared resources.
-Scott
Quoted 16 lines
From: Scott Wood <[email protected]>
Subject: Re: MPC8313:fsl_elbc_nandand MDR
To: "Ron Madrid" <[email protected]>
Cc: [email protected]
Date: Monday, April 26, 2010, 11:34 AMQuoted 10 lines · Ron Madrid
I am having what appears to be a little conflict with this driver, particularly with the MDR. My hardware uses NAND flash and an FPGA connected through the UPM. After the kernel is up and running, sometimes I cannot verify the data in the UPM RAM array. I am guessing right now that this is due to a use conflict between my application and the
fsl_elbc_nanddriver both trying to use the MDR at once.
Quoted 7 lines
Quoted 4 lines
Is there currently any sort of coordination that exists for the MDR in the
fsl_elbc_nanddriver? I have been looking through the code and have not been able to find any.There is not yet any such coordination. The current UPM code does not use MDR that I can see.
When you say current UPM code are you talking about fsl_upm.c? Cause that's only for a NAND device on the UPM right? If there's different code, I don't know where it is.
Quoted 5 lines
Quoted 2 lines
Any ideas on how to solve this would be appreciated as well.
Probably just add a mutex that protects the shared resources.
That's what I thought might need to happen.
Ron
Quoted 4 lines · Ron Madrid
When you say current UPM code are you talking about
fsl_upm.c? Cause that's only for a NAND device on the UPM right? If there's different code, I don't know where it is.
There's also arch/powerpc/sysdev/fsl_lbc.c
-Scott
Quoted 6 lines
From: Scott Wood <[email protected]>
Subject: Re: MPC8313:fsl_elbc_nandand MDR
To: "Ron Madrid" <[email protected]>
Cc: [email protected]
Date: Monday, April 26, 2010, 12:10 PM
Ron Madrid wrote:
Quoted 8 lines
Quoted 2 lines
When you say current UPM code are you talking about
fsl_upm.c? Cause that's only for a NAND deviceon the
Quoted 1 line
UPM right? If there's different code, I don't
know
Quoted 1 line
where it is.
There's also
arch/powerpc/sysdev/fsl_lbc.c
Thanks. Although this doesn't handle programming the UPM, which is where my conflict is occurring. MDR is used when programming the UPM. Do you think I would be better served to program the UPM in U-boot and therefore preempt this conflict?
Ron
Quoted 5 lines · Ron Madrid
Thanks. Although this doesn't handle programming the UPM, which is where my conflict is occurring. MDR is used when programming the UPM. Do you think I would be better served to program the UPM in U-boot and therefore preempt this conflict?
If you don't need to reprogram it dynamically, doing it either in u-boot or early in platform code is probably best.
I guess the UPM NAND code relies on U-Boot doing this?
-Scott
Quoted 11 lines · Scott Wood
Quoted 5 lines · Ron Madrid
Thanks. Although this doesn't handle programming the UPM, which is where my conflict is occurring. MDR is used when programming the UPM. Do you think I would be better served to program the UPM in U-boot and therefore preempt this conflict?
If you don't need to reprogram it dynamically, doing it either in u-boot or early in platform code is probably best.
I guess the UPM NAND code relies on U-Boot doing this?
Yep, u-boot or platform code.
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
Quoted 17 lines
From: Anton Vorontsov <[email protected]>
Subject: Re: MPC8313:fsl_elbc_nandand MDR
To: "Scott Wood" <[email protected]>
Cc: [email protected], "Ron Madrid" <[email protected]>
Date: Monday, April 26, 2010, 12:29 PMQuoted 2 lines · Scott Wood
Quoted 1 line · Ron Madrid
Thanks. Although this doesn't handle
programming the
Quoted 1 line
Quoted 1 line
UPM, which is where my conflict is
occurring. MDR is
Quoted 1 line
Quoted 1 line
used when programming the UPM. Do you think
I would
Quoted 3 lines
Quoted 2 lines
be better served to program the UPM in U-boot and
therefore preempt this conflict?
Quoted 8 lines
Quoted 1 line
If you don't need to reprogram it dynamically, doing
it either in
Quoted 3 lines
u-boot or early in platform code is probably best.
I guess the UPM NAND code relies on U-Boot doing
this?
Yep, u-boot or platform code.
Thank you both. This is an easier (and probably better) solution.
Ron