[U-Boot] [PATCH v3 1/5] Kconfig: Migrate BOUNCE_BUFFER

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Mon Dec 3 12:38:23 UTC 2018


Alexey,

> On 03.12.2018, at 13:35, Alexey Brodkin <alexey.brodkin at synopsys.com> wrote:
> 
> Hi Philipp,
> 
> On Mon, 2018-12-03 at 13:32 +0100, Philipp Tomsich wrote:
>> Alexey,
>> 
>>> On 03.12.2018, at 12:17, Alexey Brodkin <alexey.brodkin at synopsys.com <mailto:alexey.brodkin at synopsys.com>> wrote:
>>> 
>>> Hi Philipp,
>>> 
>>> On Fri, 2018-11-30 at 22:13 +0100, Philipp Tomsich wrote:
>>>> The bounce buffer is used by a few drivers (most of the MMC drivers)
>>>> to overcome limitations in their respective DMA implementation.
>>>> 
>>>> This moves the configuration to Kconfig and makes it user-selectable
>>>> (even though it will be a required feature to make those drivers
>>>> work): the expected usage is for drivers depending on this to 'select'
>>>> it unconditionally from their respective Kconfig (see follow-up
>>>> patches).
>>>> 
>>>> This commit includes a full migration using moveconfig.py to ensure
>>>> that each commit compiles; successive commits will introduce
>>>> individual dependencies for drivers and then undo some of the changes
>>>> to the defconfig files.
>>>> 
>>>> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com <mailto:philipp.tomsich at theobroma-systems.com>>
>>>> 
>>>> ---
>>> 
>>> [snip]
>>> 
>>>> diff --git a/common/Kconfig b/common/Kconfig
>>>> index 57bd16d..5bbd00a 100644
>>>> --- a/common/Kconfig
>>>> +++ b/common/Kconfig
>>>> @@ -645,6 +645,17 @@ config DISPLAY_BOARDINFO_LATE
>>>>   the relocation phase. The board function checkboard() is called to do
>>>>   this.
>>>> 
>>>> +config BOUNCE_BUFFER
>>>> + bool "Include bounce buffer API"
>>>> + help
>>>> +   Some peripherals support DMA from a subset of physically
>>>> +   addressable memory only.  To support such peripherals, the
>>>> +   bounce buffer API uses a temporary buffer: it copies data
>>>> +   to/from DMA regions while managing cache operations.
>>>> +
>>>> +   A second possible use of bounce buffers is their ability to
>>>> +   provide aligned buffers for DMA operations.
>>>> +
>>> 
>>> Here you only add BOUNCE_BUFFER option and yet it is not dependent
>>> on anything, right?
>>> 
>>>> diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h
>>>> index 1b2966f..8febe09 100644
>>>> --- a/include/configs/axs10x.h
>>>> +++ b/include/configs/axs10x.h
>>>> @@ -85,6 +85,5 @@
>>>> /*
>>>>  * Misc utility configuration
>>>>  */
>>>> -#define CONFIG_BOUNCE_BUFFER
>>>> 
>>>> #endif /* _CONFIG_AXS10X_H_ */
>>> 
>>> ...
>>> 
>>>> diff --git a/include/configs/emsdp.h b/include/configs/emsdp.h
>>>> index 385d59e..a77f262 100644
>>>> --- a/include/configs/emsdp.h
>>>> +++ b/include/configs/emsdp.h
>>>> @@ -19,7 +19,6 @@
>>>> #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
>>>> 
>>>> /* Required by DW MMC driver */
>>>> -#define CONFIG_BOUNCE_BUFFER
>>>> 
>>>> /*
>>>>  * Environment
>>> 
>>> ...
>>> 
>>>> diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
>>>> index cdf4fdd..bafd8d0 100644
>>>> --- a/include/configs/hsdk.h
>>>> +++ b/include/configs/hsdk.h
>>>> @@ -119,7 +119,6 @@ setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"
>>>> /*
>>>>  * Misc utility configuration
>>>>  */
>>>> -#define CONFIG_BOUNCE_BUFFER
>>>> 
>>>> /* Cli configuration */
>>>> #define CONFIG_SYS_CBSIZE SZ_2K
>>>> diff --git a/include/configs/iot_devkit.h b/include/configs/iot_devkit.h
>>>> index 4ffe114..1f40d61 100644
>>>> --- a/include/configs/iot_devkit.h
>>>> +++ b/include/configs/iot_devkit.h
>>>> @@ -72,7 +72,6 @@
>>>> CONFIG_ENV_SIZE
>>>> 
>>>> /* Required by DW MMC driver */
>>>> -#define CONFIG_BOUNCE_BUFFER
>>>> 
>>>> /*
>>>>  * Environment
>>> 
>>> And here in xxx.h files you unconditionally remove CONFIG_BOUNCE_BUFFER
>>> which breaks MMC on these boards.
>>> 
>>> I understand that you're fixing that in the subsequent commit but
>>> I'd prefer all changes to be bisectable, i.e. have normally working system
>>> on each and every commit.
>>> 
>>> Moreover IMHO it doesn't look logical to remove "#define CONFIG_BOUNCE_BUFFER" here
>>> while remove comment which is clearly bounded to CONFIG_BOUNCE_BUFFER in the next commit.
>> 
>> In this patch, moveconfig has moved the selction this into the respective _defconfig files
>> for the  AXS10x boards.
> 
> Hm... are you sure axs101_defconfig & axs103_defconfig were updated in this patch?
> I didn't see them there.

You are right: my ARC toolchain wasn’t configured …
I’ll need to debug my toolchain configs and rerun my moveconfig.

Thanks for pointing this out.

—Philipp.


More information about the U-Boot mailing list