diff mbox series

[U-Boot,3/6] ARM: socfpga: Add the configuration for FPGA SoCFPGA A10 SoCDK

Message ID 1546157627-45489-4-git-send-email-tien.fong.chee@intel.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series Add support for loading FPGA bitstream | expand

Commit Message

Chee, Tien Fong Dec. 30, 2018, 8:13 a.m. UTC
From: Tien Fong Chee <tien.fong.chee@intel.com>

Update the default configuration file to enable the necessary functionality
to get the SoCFPGA loadfs driver support. This would enable the
implementation of programming bitstream into FPGA from MMC.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
---
 configs/socfpga_arria10_defconfig |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

Comments

Marek Vasut Dec. 30, 2018, 3:47 p.m. UTC | #1
On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
> From: Tien Fong Chee <tien.fong.chee@intel.com>
> 
> Update the default configuration file to enable the necessary functionality
> to get the SoCFPGA loadfs driver support. This would enable the
> implementation of programming bitstream into FPGA from MMC.
> 
> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> ---
>  configs/socfpga_arria10_defconfig |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
> index 6ebda81..8158dbb 100644
> --- a/configs/socfpga_arria10_defconfig
> +++ b/configs/socfpga_arria10_defconfig
> @@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
>  # CONFIG_EFI_PARTITION is not set
>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
>  CONFIG_ENV_IS_IN_MMC=y
> +CONFIG_SPL_ENV_SUPPORT=y
>  CONFIG_SPL_DM=y
>  CONFIG_SPL_DM_SEQ_ALIAS=y
> +CONFIG_SPL_DM_MMC=y
> +CONFIG_SPL_MMC_SUPPORT=y
> +CONFIG_SPL_EXT_SUPPORT=y
> +CONFIG_SPL_FAT_SUPPORT=y
> +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
> +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384

This breaks systems with large FAT clusters. Why is this needed for
programming the FPGA from MMC ?

> +CONFIG_FS_LOADER=y
>  CONFIG_FPGA_SOCFPGA=y
>  CONFIG_DM_GPIO=y
>  CONFIG_DWAPB_GPIO=y
>
Chee, Tien Fong Jan. 1, 2019, 3:32 a.m. UTC | #2
On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
> On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
> > 
> > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > 
> > Update the default configuration file to enable the necessary
> > functionality
> > to get the SoCFPGA loadfs driver support. This would enable the
> > implementation of programming bitstream into FPGA from MMC.
> > 
> > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > ---
> >  configs/socfpga_arria10_defconfig |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> > 
> > diff --git a/configs/socfpga_arria10_defconfig
> > b/configs/socfpga_arria10_defconfig
> > index 6ebda81..8158dbb 100644
> > --- a/configs/socfpga_arria10_defconfig
> > +++ b/configs/socfpga_arria10_defconfig
> > @@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
> >  # CONFIG_EFI_PARTITION is not set
> >  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
> >  CONFIG_ENV_IS_IN_MMC=y
> > +CONFIG_SPL_ENV_SUPPORT=y
> >  CONFIG_SPL_DM=y
> >  CONFIG_SPL_DM_SEQ_ALIAS=y
> > +CONFIG_SPL_DM_MMC=y
> > +CONFIG_SPL_MMC_SUPPORT=y
> > +CONFIG_SPL_EXT_SUPPORT=y
> > +CONFIG_SPL_FAT_SUPPORT=y
> > +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
> > +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> This breaks systems with large FAT clusters. Why is this needed for
> programming the FPGA from MMC ?
This is final tuning in term of getting balance between performance and
SPL image size for the socdk devkit. User can change that if they need
large FAT cluster in their design, right?
> 
> > 
> > +CONFIG_FS_LOADER=y
> >  CONFIG_FPGA_SOCFPGA=y
> >  CONFIG_DM_GPIO=y
> >  CONFIG_DWAPB_GPIO=y
> > 
>
Marek Vasut Jan. 1, 2019, 8:29 p.m. UTC | #3
On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
> On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
>> On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
>>>
>>> From: Tien Fong Chee <tien.fong.chee@intel.com>
>>>
>>> Update the default configuration file to enable the necessary
>>> functionality
>>> to get the SoCFPGA loadfs driver support. This would enable the
>>> implementation of programming bitstream into FPGA from MMC.
>>>
>>> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
>>> ---
>>>  configs/socfpga_arria10_defconfig |    8 ++++++++
>>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/configs/socfpga_arria10_defconfig
>>> b/configs/socfpga_arria10_defconfig
>>> index 6ebda81..8158dbb 100644
>>> --- a/configs/socfpga_arria10_defconfig
>>> +++ b/configs/socfpga_arria10_defconfig
>>> @@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
>>>  # CONFIG_EFI_PARTITION is not set
>>>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
>>>  CONFIG_ENV_IS_IN_MMC=y
>>> +CONFIG_SPL_ENV_SUPPORT=y
>>>  CONFIG_SPL_DM=y
>>>  CONFIG_SPL_DM_SEQ_ALIAS=y
>>> +CONFIG_SPL_DM_MMC=y
>>> +CONFIG_SPL_MMC_SUPPORT=y
>>> +CONFIG_SPL_EXT_SUPPORT=y
>>> +CONFIG_SPL_FAT_SUPPORT=y
>>> +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
>>> +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>> This breaks systems with large FAT clusters. Why is this needed for
>> programming the FPGA from MMC ?
> This is final tuning in term of getting balance between performance and
> SPL image size for the socdk devkit. User can change that if they need
> large FAT cluster in their design, right?

I think it'd rather make sense to fix the FAT driver to avoid statically
allocating those massive buffers for big clusters. I think that can be
done by allocating those on stack instead ... or mallocating them.
Chee, Tien Fong Jan. 3, 2019, 5:36 a.m. UTC | #4
On Tue, 2019-01-01 at 21:29 +0100, Marek Vasut wrote:
> On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
> > 
> > On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
> > > 
> > > On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
> > > > 
> > > > 
> > > > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > 
> > > > Update the default configuration file to enable the necessary
> > > > functionality
> > > > to get the SoCFPGA loadfs driver support. This would enable the
> > > > implementation of programming bitstream into FPGA from MMC.
> > > > 
> > > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > ---
> > > >  configs/socfpga_arria10_defconfig |    8 ++++++++
> > > >  1 files changed, 8 insertions(+), 0 deletions(-)
> > > > 
> > > > diff --git a/configs/socfpga_arria10_defconfig
> > > > b/configs/socfpga_arria10_defconfig
> > > > index 6ebda81..8158dbb 100644
> > > > --- a/configs/socfpga_arria10_defconfig
> > > > +++ b/configs/socfpga_arria10_defconfig
> > > > @@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
> > > >  # CONFIG_EFI_PARTITION is not set
> > > >  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
> > > >  CONFIG_ENV_IS_IN_MMC=y
> > > > +CONFIG_SPL_ENV_SUPPORT=y
> > > >  CONFIG_SPL_DM=y
> > > >  CONFIG_SPL_DM_SEQ_ALIAS=y
> > > > +CONFIG_SPL_DM_MMC=y
> > > > +CONFIG_SPL_MMC_SUPPORT=y
> > > > +CONFIG_SPL_EXT_SUPPORT=y
> > > > +CONFIG_SPL_FAT_SUPPORT=y
> > > > +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
> > > > +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> > > This breaks systems with large FAT clusters. Why is this needed
> > > for
> > > programming the FPGA from MMC ?
> > This is final tuning in term of getting balance between performance
> > and
> > SPL image size for the socdk devkit. User can change that if they
> > need
> > large FAT cluster in their design, right?
> I think it'd rather make sense to fix the FAT driver to avoid
> statically
> allocating those massive buffers for big clusters. I think that can
> be
> done by allocating those on stack instead ... or mallocating them.
I need to explore 1st as i'm not familiar with FAT driver. Or can we
temporary keeping this patch 1st until FAT issue is separately fixed?
>
Marek Vasut Jan. 3, 2019, 8:15 p.m. UTC | #5
On 1/3/19 6:36 AM, Chee, Tien Fong wrote:
> On Tue, 2019-01-01 at 21:29 +0100, Marek Vasut wrote:
>> On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
>>>
>>> On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
>>>>
>>>> On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
>>>>>
>>>>>
>>>>> From: Tien Fong Chee <tien.fong.chee@intel.com>
>>>>>
>>>>> Update the default configuration file to enable the necessary
>>>>> functionality
>>>>> to get the SoCFPGA loadfs driver support. This would enable the
>>>>> implementation of programming bitstream into FPGA from MMC.
>>>>>
>>>>> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
>>>>> ---
>>>>>  configs/socfpga_arria10_defconfig |    8 ++++++++
>>>>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>>>>
>>>>> diff --git a/configs/socfpga_arria10_defconfig
>>>>> b/configs/socfpga_arria10_defconfig
>>>>> index 6ebda81..8158dbb 100644
>>>>> --- a/configs/socfpga_arria10_defconfig
>>>>> +++ b/configs/socfpga_arria10_defconfig
>>>>> @@ -27,8 +27,16 @@ CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
>>>>>  # CONFIG_EFI_PARTITION is not set
>>>>>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
>>>>>  CONFIG_ENV_IS_IN_MMC=y
>>>>> +CONFIG_SPL_ENV_SUPPORT=y
>>>>>  CONFIG_SPL_DM=y
>>>>>  CONFIG_SPL_DM_SEQ_ALIAS=y
>>>>> +CONFIG_SPL_DM_MMC=y
>>>>> +CONFIG_SPL_MMC_SUPPORT=y
>>>>> +CONFIG_SPL_EXT_SUPPORT=y
>>>>> +CONFIG_SPL_FAT_SUPPORT=y
>>>>> +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
>>>>> +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>>>> This breaks systems with large FAT clusters. Why is this needed
>>>> for
>>>> programming the FPGA from MMC ?
>>> This is final tuning in term of getting balance between performance
>>> and
>>> SPL image size for the socdk devkit. User can change that if they
>>> need
>>> large FAT cluster in their design, right?
>> I think it'd rather make sense to fix the FAT driver to avoid
>> statically
>> allocating those massive buffers for big clusters. I think that can
>> be
>> done by allocating those on stack instead ... or mallocating them.
> I need to explore 1st as i'm not familiar with FAT driver. Or can we
> temporary keeping this patch 1st until FAT issue is separately fixed?

Please explore this, it'll be beneficial in the long run.
Chee, Tien Fong Jan. 4, 2019, 12:40 a.m. UTC | #6
On Thu, 2019-01-03 at 21:15 +0100, Marek Vasut wrote:
> On 1/3/19 6:36 AM, Chee, Tien Fong wrote:
> > 
> > On Tue, 2019-01-01 at 21:29 +0100, Marek Vasut wrote:
> > > 
> > > On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
> > > > 
> > > > 
> > > > On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
> > > > > 
> > > > > 
> > > > > On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > > > 
> > > > > > Update the default configuration file to enable the
> > > > > > necessary
> > > > > > functionality
> > > > > > to get the SoCFPGA loadfs driver support. This would enable
> > > > > > the
> > > > > > implementation of programming bitstream into FPGA from MMC.
> > > > > > 
> > > > > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > > > ---
> > > > > >  configs/socfpga_arria10_defconfig |    8 ++++++++
> > > > > >  1 files changed, 8 insertions(+), 0 deletions(-)
> > > > > > 
> > > > > > diff --git a/configs/socfpga_arria10_defconfig
> > > > > > b/configs/socfpga_arria10_defconfig
> > > > > > index 6ebda81..8158dbb 100644
> > > > > > --- a/configs/socfpga_arria10_defconfig
> > > > > > +++ b/configs/socfpga_arria10_defconfig
> > > > > > @@ -27,8 +27,16 @@
> > > > > > CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
> > > > > >  # CONFIG_EFI_PARTITION is not set
> > > > > >  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
> > > > > >  CONFIG_ENV_IS_IN_MMC=y
> > > > > > +CONFIG_SPL_ENV_SUPPORT=y
> > > > > >  CONFIG_SPL_DM=y
> > > > > >  CONFIG_SPL_DM_SEQ_ALIAS=y
> > > > > > +CONFIG_SPL_DM_MMC=y
> > > > > > +CONFIG_SPL_MMC_SUPPORT=y
> > > > > > +CONFIG_SPL_EXT_SUPPORT=y
> > > > > > +CONFIG_SPL_FAT_SUPPORT=y
> > > > > > +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
> > > > > > +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> > > > > This breaks systems with large FAT clusters. Why is this
> > > > > needed
> > > > > for
> > > > > programming the FPGA from MMC ?
> > > > This is final tuning in term of getting balance between
> > > > performance
> > > > and
> > > > SPL image size for the socdk devkit. User can change that if
> > > > they
> > > > need
> > > > large FAT cluster in their design, right?
> > > I think it'd rather make sense to fix the FAT driver to avoid
> > > statically
> > > allocating those massive buffers for big clusters. I think that
> > > can
> > > be
> > > done by allocating those on stack instead ... or mallocating
> > > them.
> > I need to explore 1st as i'm not familiar with FAT driver. Or can
> > we
> > temporary keeping this patch 1st until FAT issue is separately
> > fixed?
> Please explore this, it'll be beneficial in the long run.
Okay.
>
Chee, Tien Fong Jan. 15, 2019, 8:16 a.m. UTC | #7
On Thu, 2019-01-03 at 21:15 +0100, Marek Vasut wrote:
> On 1/3/19 6:36 AM, Chee, Tien Fong wrote:
> > 
> > On Tue, 2019-01-01 at 21:29 +0100, Marek Vasut wrote:
> > > 
> > > On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
> > > > 
> > > > 
> > > > On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
> > > > > 
> > > > > 
> > > > > On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > From: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > > > 
> > > > > > Update the default configuration file to enable the
> > > > > > necessary
> > > > > > functionality
> > > > > > to get the SoCFPGA loadfs driver support. This would enable
> > > > > > the
> > > > > > implementation of programming bitstream into FPGA from MMC.
> > > > > > 
> > > > > > Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> > > > > > ---
> > > > > >  configs/socfpga_arria10_defconfig |    8 ++++++++
> > > > > >  1 files changed, 8 insertions(+), 0 deletions(-)
> > > > > > 
> > > > > > diff --git a/configs/socfpga_arria10_defconfig
> > > > > > b/configs/socfpga_arria10_defconfig
> > > > > > index 6ebda81..8158dbb 100644
> > > > > > --- a/configs/socfpga_arria10_defconfig
> > > > > > +++ b/configs/socfpga_arria10_defconfig
> > > > > > @@ -27,8 +27,16 @@
> > > > > > CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
> > > > > >  # CONFIG_EFI_PARTITION is not set
> > > > > >  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
> > > > > >  CONFIG_ENV_IS_IN_MMC=y
> > > > > > +CONFIG_SPL_ENV_SUPPORT=y
> > > > > >  CONFIG_SPL_DM=y
> > > > > >  CONFIG_SPL_DM_SEQ_ALIAS=y
> > > > > > +CONFIG_SPL_DM_MMC=y
> > > > > > +CONFIG_SPL_MMC_SUPPORT=y
> > > > > > +CONFIG_SPL_EXT_SUPPORT=y
> > > > > > +CONFIG_SPL_FAT_SUPPORT=y
> > > > > > +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
> > > > > > +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> > > > > This breaks systems with large FAT clusters. Why is this
> > > > > needed
> > > > > for
> > > > > programming the FPGA from MMC ?
> > > > This is final tuning in term of getting balance between
> > > > performance
> > > > and
> > > > SPL image size for the socdk devkit. User can change that if
> > > > they
> > > > need
> > > > large FAT cluster in their design, right?
> > > I think it'd rather make sense to fix the FAT driver to avoid
> > > statically
> > > allocating those massive buffers for big clusters. I think that
> > > can
> > > be
> > > done by allocating those on stack instead ... or mallocating
> > > them.
> > I need to explore 1st as i'm not familiar with FAT driver. Or can
> > we
> > temporary keeping this patch 1st until FAT issue is separately
> > fixed?
> Please explore this, it'll be beneficial in the long run.
There is a progress on working to move statically allocating into
dynamically allocation https://www.mail-archive.com/u-boot@lists.denx.d
e/msg308353.html . 

I quickly apply the patch and having minor fixing on it. This indeed
reduce the SPL image size, but creating overflow/corruption during
runtime. So, the problem is still not enough memory for the SPL.

I think we can add a new SPL_FAT_WRITE config to exclude the
fat_write.c from SPL, because most of the time, SPL needs very simple
FAT reading. This would help us save 64KB memory space if that's
default value for FAT cluster.

What do you think?
>
Marek Vasut Jan. 15, 2019, 11:34 a.m. UTC | #8
On 1/15/19 9:16 AM, Chee, Tien Fong wrote:
> On Thu, 2019-01-03 at 21:15 +0100, Marek Vasut wrote:
>> On 1/3/19 6:36 AM, Chee, Tien Fong wrote:
>>>
>>> On Tue, 2019-01-01 at 21:29 +0100, Marek Vasut wrote:
>>>>
>>>> On 1/1/19 4:32 AM, Chee, Tien Fong wrote:
>>>>>
>>>>>
>>>>> On Sun, 2018-12-30 at 16:47 +0100, Marek Vasut wrote:
>>>>>>
>>>>>>
>>>>>> On 12/30/18 9:13 AM, tien.fong.chee@intel.com wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> From: Tien Fong Chee <tien.fong.chee@intel.com>
>>>>>>>
>>>>>>> Update the default configuration file to enable the
>>>>>>> necessary
>>>>>>> functionality
>>>>>>> to get the SoCFPGA loadfs driver support. This would enable
>>>>>>> the
>>>>>>> implementation of programming bitstream into FPGA from MMC.
>>>>>>>
>>>>>>> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
>>>>>>> ---
>>>>>>>  configs/socfpga_arria10_defconfig |    8 ++++++++
>>>>>>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>>>>>>
>>>>>>> diff --git a/configs/socfpga_arria10_defconfig
>>>>>>> b/configs/socfpga_arria10_defconfig
>>>>>>> index 6ebda81..8158dbb 100644
>>>>>>> --- a/configs/socfpga_arria10_defconfig
>>>>>>> +++ b/configs/socfpga_arria10_defconfig
>>>>>>> @@ -27,8 +27,16 @@
>>>>>>> CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
>>>>>>>  # CONFIG_EFI_PARTITION is not set
>>>>>>>  CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
>>>>>>>  CONFIG_ENV_IS_IN_MMC=y
>>>>>>> +CONFIG_SPL_ENV_SUPPORT=y
>>>>>>>  CONFIG_SPL_DM=y
>>>>>>>  CONFIG_SPL_DM_SEQ_ALIAS=y
>>>>>>> +CONFIG_SPL_DM_MMC=y
>>>>>>> +CONFIG_SPL_MMC_SUPPORT=y
>>>>>>> +CONFIG_SPL_EXT_SUPPORT=y
>>>>>>> +CONFIG_SPL_FAT_SUPPORT=y
>>>>>>> +CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
>>>>>>> +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>>>>>> This breaks systems with large FAT clusters. Why is this
>>>>>> needed
>>>>>> for
>>>>>> programming the FPGA from MMC ?
>>>>> This is final tuning in term of getting balance between
>>>>> performance
>>>>> and
>>>>> SPL image size for the socdk devkit. User can change that if
>>>>> they
>>>>> need
>>>>> large FAT cluster in their design, right?
>>>> I think it'd rather make sense to fix the FAT driver to avoid
>>>> statically
>>>> allocating those massive buffers for big clusters. I think that
>>>> can
>>>> be
>>>> done by allocating those on stack instead ... or mallocating
>>>> them.
>>> I need to explore 1st as i'm not familiar with FAT driver. Or can
>>> we
>>> temporary keeping this patch 1st until FAT issue is separately
>>> fixed?
>> Please explore this, it'll be beneficial in the long run.
> There is a progress on working to move statically allocating into
> dynamically allocation https://www.mail-archive.com/u-boot@lists.denx.d
> e/msg308353.html . 
> 
> I quickly apply the patch and having minor fixing on it. This indeed
> reduce the SPL image size, but creating overflow/corruption during
> runtime. So, the problem is still not enough memory for the SPL.
> 
> I think we can add a new SPL_FAT_WRITE config to exclude the
> fat_write.c from SPL, because most of the time, SPL needs very simple
> FAT reading. This would help us save 64KB memory space if that's
> default value for FAT cluster.
> 
> What do you think?

Sounds good.
diff mbox series

Patch

diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index 6ebda81..8158dbb 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -27,8 +27,16 @@  CONFIG_MTDIDS_DEFAULT="nor0=ff705000.spi.0"
 # CONFIG_EFI_PARTITION is not set
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_arria10_socdk_sdmmc"
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_DM=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_SPL_DM_MMC=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_EXT_SUPPORT=y
+CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
+CONFIG_FS_LOADER=y
 CONFIG_FPGA_SOCFPGA=y
 CONFIG_DM_GPIO=y
 CONFIG_DWAPB_GPIO=y