Migrate BOUNCE_BUFFER
Subsystems (6)
cover Migrate BOUNCE_BUFFER
A number of MMC drivers uses BOUNCE_BUFFER for their DMA buffers. This moves it into Kconfig and performs a step-by-step migration for the affected boards/drivers.
In doing so, it turns out that a few boards/configs enabled CONFIG_BOUNCE_BUFFER in their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.
Given that BOUNCE_BUFFER only controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
Philipp Tomsich (6):
Kconfig: Migrate BOUNCE_BUFFER
mmc: dw_mmc: depend on BOUNCE_BUFFER
mmc: mxsmmc: select BOUNCE_BUFFER unconditionally
mmc: tegra: select BOUNCE_BUFFER unconditionally
arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x
Kconfig: migrate BOUNCE_BUFFER (final moveconfig)
arch/arc/Kconfig | 2 ++ common/Kconfig | 8 ++++++++ configs/bcm911360_entphn-ns_defconfig | 1 + configs/bcm911360_entphn_defconfig | 1 + configs/bcm911360k_defconfig | 1 + configs/bcm958300k-ns_defconfig | 1 + configs/bcm958300k_defconfig | 1 + configs/bcm958305k_defconfig | 1 + configs/bcm958622hr_defconfig | 1 + configs/socfpga_arria10_defconfig | 1 + drivers/mmc/Kconfig | 3 +++ include/configs/axs10x.h | 5 ----- include/configs/bcm_ep_board.h | 3 --- include/configs/emsdp.h | 3 --- include/configs/exynos-common.h | 3 --- include/configs/hikey.h | 3 --- include/configs/hsdk.h | 5 ----- include/configs/iot_devkit.h | 3 --- include/configs/mx6_common.h | 1 - include/configs/mx7_common.h | 1 - include/configs/mx7ulp_evk.h | 1 - include/configs/mxs.h | 5 ----- include/configs/poplar.h | 3 --- include/configs/rk3036_common.h | 2 -- include/configs/rk3128_common.h | 3 --- include/configs/rk3188_common.h | 3 --- include/configs/rk322x_common.h | 3 --- include/configs/rk3288_common.h | 3 --- include/configs/rk3328_common.h | 3 --- include/configs/rk3368_common.h | 2 -- include/configs/rk3399_common.h | 1 - include/configs/socfpga_common.h | 1 - include/configs/socfpga_stratix10_socdk.h | 1 - include/configs/tegra-common.h | 3 --- scripts/config_whitelist.txt | 1 - 35 files changed, 21 insertions(+), 62 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/6 Kconfig: Migrate BOUNCE_BUFFER
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.
---
common/Kconfig | 8 ++++++++ scripts/config_whitelist.txt | 1 - 2 files changed, 8 insertions(+), 1 deletion(-)
common/Kconfig +8 -0
@@ -645,6 +645,14 @@ 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. + menu "Start-up hooks" config ARCH_EARLY_INIT_R
scripts/config_whitelist.txt +0 -1
@@ -169,7 +169,6 @@ CONFIG_BOOT_OS_NET CONFIG_BOOT_PARAMS_ADDR CONFIG_BOOT_RETRY_MIN CONFIG_BOOT_RETRY_TIME -CONFIG_BOUNCE_BUFFER CONFIG_BPTR_VIRT_ADDR CONFIG_BS_ADDR_DEVICE CONFIG_BS_ADDR_RAM
Signature · 1 line
2.1.4
PATCH 1/6 Kconfig: Migrate BOUNCE_BUFFER
Hi Philipp,
Quoted 33 lines
-----Original Message-----
From: Philipp Tomsich [mailto:philipp.tomsich at theobroma-systems.com]
Sent: Friday, November 30, 2018 2:40 PM
To: u-boot at lists.denx.de
Cc: Tom Rini <[email protected]>; Philipp Tomsich <[email protected]>; Mario Six <[email protected]>; Michal Simek <[email protected]>; Simon Glass <[email protected]>; Masahiro Yamada <[email protected]>; Alexey Brodkin <[email protected]>; Alex Kiernan <[email protected]>; Eric Nelson <[email protected]>; Marek Vasut <[email protected]>; Jörg Krause <[email protected]>; Adam Ford <[email protected]>; Stephen Warren <[email protected]>; Angelo Dureghello <[email protected]>; Tuomas Tynkkynen <[email protected]>; Eugeniu Rosca <[email protected]>
Subject: [PATCH 1/6]Kconfig: MigrateBOUNCE_BUFFERThe 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
Kconfigand 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 respectiveKconfig.Signed-off-by Philipp Tomsich <[email protected]>---
common/Kconfig | 8 ++++++++ scripts/config_whitelist.txt | 1 - 2 files changed, 8 insertions(+), 1 deletion(-)common/Kconfig +0
-0
common/Kconfig config DISPLAY_BOARDINFO_LATE · line 654
Quoted 10 lines
common/Kconfig +7
-0@@ -645,6 +645,14 @@ 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.
IIRC I decided to use bounce buffer just to make sure data we pass to the DMA is properly aligned. Not sure though if that's a valid use-case for it but if it is IMHO it worth mentioning here in this help message.
-Alexey
PATCH 2/6 mmc: dw_mmc: depend on BOUNCE_BUFFER
In reply to Philipp TomsichThe driver for the dw_mmc depends on the bounce buffer utility functions. Unconditionally select BOUNCE_BUFFER, when DW_MMC is enabled.
Includes the migration (moveconfig with manual postprocessing of config-headers to drop unused comments) for the boards using DW_MMC.
---
drivers/mmc/Kconfig | 1 + include/configs/emsdp.h | 3 --- include/configs/exynos-common.h | 3 --- include/configs/hikey.h | 3 --- include/configs/hsdk.h | 5 ----- include/configs/iot_devkit.h | 3 --- include/configs/poplar.h | 3 --- include/configs/rk3036_common.h | 2 -- include/configs/rk3128_common.h | 3 --- include/configs/rk3188_common.h | 3 --- include/configs/rk322x_common.h | 3 --- include/configs/rk3288_common.h | 3 --- include/configs/rk3328_common.h | 3 --- include/configs/rk3368_common.h | 2 -- include/configs/rk3399_common.h | 1 - 15 files changed, 1 insertion(+), 40 deletions(-)
drivers/mmc/Kconfig +1 -0
@@ -178,6 +178,7 @@ config MMC_DAVINCI config MMC_DW bool "Synopsys DesignWare Memory Card Interface" + select BOUNCE_BUFFER help This selects support for the Synopsys DesignWare Mobile Storage IP block, this provides host support for SD and MMC interfaces, in both
include/configs/emsdp.h +0 -3
@@ -18,9 +18,6 @@#define CONFIG_SYS_MALLOC_LEN SZ_64K#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE -/* Required by DW MMC driver */ -#define CONFIG_BOUNCE_BUFFER -/* * Environment */
include/configs/exynos-common.h +0 -3
@@ -34,9 +34,6 @@/* select serial console configuration */ -/* SD/MMC configuration */ -#define CONFIG_BOUNCE_BUFFER -/* PWM */ #define CONFIG_PWM
include/configs/hikey.h +0 -3
@@ -53,9 +53,6 @@#define CONFIG_HIKEY_GPIO -/* SD/MMC configuration */ -#define CONFIG_BOUNCE_BUFFER -/* Command line configuration */ /* BOOTP options */
include/configs/hsdk.h +0 -5
@@ -116,11 +116,6 @@ setenv core_iccm_3 0x6; setenv core_dccm_3 0x6;\0"#define CONFIG_BOOTFILE "uImage"#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR -/* -* Misc utility configuration -*/ -#define CONFIG_BOUNCE_BUFFER -/* Cli configuration */ #define CONFIG_SYS_CBSIZE SZ_2K
include/configs/iot_devkit.h +0 -3
@@ -71,9 +71,6 @@CONFIG_SYS_MALLOC_LEN - \CONFIG_ENV_SIZE -/* Required by DW MMC driver */ -#define CONFIG_BOUNCE_BUFFER -/* * Environment */
include/configs/poplar.h +0 -3
@@ -26,9 +26,6 @@/* USB configuration */ #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -/* SD/MMC */ -#define CONFIG_BOUNCE_BUFFER -/***************************************************************************** * Initial environment variables *****************************************************************************/
include/configs/rk3036_common.h +0 -2
@@ -25,8 +25,6 @@#define CONFIG_ROCKCHIP_CHIP_TAG "RK30"/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -#define CONFIG_SYS_SDRAM_BASE 0x60000000#define SDRAM_BANK_SIZE (512UL << 20UL)#define SDRAM_MAX_SIZE (CONFIG_NR_DRAM_BANKS * SDRAM_BANK_SIZE)
include/configs/rk3128_common.h +0 -3
@@ -23,9 +23,6 @@#define CONFIG_SYS_BOOTM_LEN (64 << 20)/* 64M */ -/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
include/configs/rk3188_common.h +0 -3
@@ -33,9 +33,6 @@#define CONFIG_SPL_STACK 0x10087fff -/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -#define CONFIG_SYS_SDRAM_BASE 0x60000000#define SDRAM_BANK_SIZE (2UL << 30)#define SDRAM_MAX_SIZE 0x80000000
include/configs/rk322x_common.h +0 -3
@@ -25,9 +25,6 @@#define CONFIG_ROCKCHIP_MAX_INIT_SIZE (28 << 10)#define CONFIG_ROCKCHIP_CHIP_TAG "RK32" -/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -#define CONFIG_SYS_SDRAM_BASE 0x60000000#define SDRAM_BANK_SIZE (512UL << 20UL)#define SDRAM_MAX_SIZE 0x80000000
include/configs/rk3288_common.h +0 -3
@@ -29,9 +29,6 @@# define CONFIG_SPL_TEXT_BASE 0xff704000#endif -/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
include/configs/rk3328_common.h +0 -3
@@ -19,9 +19,6 @@#define CONFIG_SYS_BOOTM_LEN (64 << 20)/* 64M */ -/* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER -/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
include/configs/rk3368_common.h +0 -2
@@ -32,8 +32,6 @@#define CONFIG_SPL_BSS_START_ADDR 0x400000#define CONFIG_SPL_BSS_MAX_SIZE 0x20000 -#define CONFIG_BOUNCE_BUFFER -#ifndef CONFIG_SPL_BUILD #define ENV_MEM_LAYOUT_SETTINGS \ "scriptaddr=0x00500000\0" \
include/configs/rk3399_common.h +0 -1
@@ -28,7 +28,6 @@#define CONFIG_SYS_BOOTM_LEN (64 << 20)/* 64M */ /* MMC/SD IP block */ -#define CONFIG_BOUNCE_BUFFER #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000/* RAW SD card / eMMC locations. */
Signature · 1 line
2.1.4
PATCH 2/6 mmc: dw_mmc: depend on BOUNCE_BUFFER
Quoted 9 lines · Philipp Tomsich
The driver for the
dw_mmcdepends on the bounce buffer utility functions. Unconditionally selectBOUNCE_BUFFER, whenDW_MMCis enabled.Includes the migration (moveconfig with manual postprocessing of config-headers to drop unused comments) for the boards using
DW_MMC.Signed-off-by Philipp Tomsich <[email protected]>
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
PATCH 3/6 mmc: mxsmmc: select BOUNCE_BUFFER unconditionally
In reply to Philipp TomsichThe driver for the mxsmmc depends on the bounce buffer utility functions. Unconditionally select BOUNCE_BUFFER, when this driver is enabled.
Includes the migration (moveconfig with manual postprocessing of config-headers to drop unused comments) for the boards using mxsmmc.
---
drivers/mmc/Kconfig | 1 + include/configs/mx6_common.h | 1 - include/configs/mx7_common.h | 1 - include/configs/mx7ulp_evk.h | 1 - include/configs/mxs.h | 5 ----- 5 files changed, 1 insertion(+), 8 deletions(-)
drivers/mmc/Kconfig +1 -0
@@ -240,6 +240,7 @@ config MMC_MXC config MMC_MXS bool "Freescale MXS Multimedia Card Interface support" depends on MX23 || MX28 || MX6 || MX7 + select BOUNCE_BUFFER select APBH_DMA select APBH_DMA_BURST if ARCH_MX6 || ARCH_MX7 select APBH_DMA_BURST8 if ARCH_MX6 || ARCH_MX7
include/configs/mx6_common.h +0 -1
@@ -55,7 +55,6 @@#define CONFIG_SYS_MAXARGS 32/* MMC */ -#define CONFIG_BOUNCE_BUFFER #define CONFIG_FSL_USDHC /* Fuses */
include/configs/mx7_common.h +0 -1
@@ -40,7 +40,6 @@#define CONFIG_MXC_UART /* MMC */ -#define CONFIG_BOUNCE_BUFFER #define CONFIG_FSL_USDHC /* Fuses */
include/configs/mx7ulp_evk.h +0 -1
@@ -27,7 +27,6 @@#define IRAM_BASE_ADDR OCRAM_0_BASE#define IOMUXC_BASE_ADDR IOMUXC1_RBASE -#define CONFIG_BOUNCE_BUFFER #define CONFIG_FSL_USDHC #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
include/configs/mxs.h +0 -5
@@ -124,11 +124,6 @@#define CONFIG_VIDEO_MXS #endif -/* MMC */ -#ifdef CONFIG_CMD_MMC -#define CONFIG_BOUNCE_BUFFER -#endif -/* NAND */ #ifdef CONFIG_CMD_NAND #define CONFIG_SYS_MAX_NAND_DEVICE 1
Signature · 1 line
2.1.4
Fabio Estevam
reviewerPATCH 3/6 mmc: mxsmmc: select BOUNCE_BUFFER unconditionally
Quoted 9 lines · Philipp Tomsich
The driver for the mxsmmc depends on the bounce buffer utility functions. Unconditionally select
BOUNCE_BUFFER, when this driver is enabled.Includes the migration (moveconfig with manual postprocessing of config-headers to drop unused comments) for the boards using mxsmmc.
Signed-off-by Philipp Tomsich <[email protected]>
PATCH 4/6 mmc: tegra: select BOUNCE_BUFFER unconditionally
In reply to Philipp TomsichThe driver for the SDHCI_TEGRA depends on the bounce buffer utility functions. Unconditionally select BOUNCE_BUFFER, when this driver is enabled.
Includes the migration (moveconfig with manual postprocessing of config-headers to drop unused comments) for the boards using SDHCI_TEGRA.
---
drivers/mmc/Kconfig | 1 + include/configs/tegra-common.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/mmc/Kconfig +1 -0
@@ -531,6 +531,7 @@ config MMC_SDHCI_TANGIER config MMC_SDHCI_TEGRA bool "SDHCI platform support for the Tegra SD/MMC Controller" depends on TEGRA + select BOUNCE_BUFFER default y help This selects the Tegra SD/MMC controller. If you have a Tegra
include/configs/tegra-common.h +0 -3
@@ -88,7 +88,4 @@#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000#endif -/* Misc utility code */ -#define CONFIG_BOUNCE_BUFFER -#endif /* _TEGRA_COMMON_H_ */
Signature · 1 line
2.1.4
PATCH 5/6 arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x
In reply to Philipp TomsichThe NAND driver of AXS10x depends on the availability of the bounce buffer. As the NAND driver is gated by CMD_NAND only, we need to select BOUNCE_BUFFER conditionally (on CMD_NAND) for TARGET_AXS101 and TARGET_AXS103.
This change also contains the modification to configs/axs10x.h to avoid redefining BOUNCE_BUFFER there.
---
arch/arc/Kconfig | 2 ++ include/configs/axs10x.h | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-)
arch/arc/Kconfig +2 -0
@@ -146,9 +146,11 @@ config TARGET_NSIM config TARGET_AXS101 bool "Support Synopsys Designware SDP board AXS101" + select BOUNCE_BUFFER if CMD_NAND config TARGET_AXS103 bool "Support Synopsys Designware SDP board AXS103" + select BOUNCE_BUFFER if CMD_NAND config TARGET_EMSDP bool "Synopsys EM Software Development Platform"
include/configs/axs10x.h +0 -5
@@ -82,9 +82,4 @@* Console configuration */ -/* -* Misc utility configuration -*/ -#define CONFIG_BOUNCE_BUFFER -#endif /* _CONFIG_AXS10X_H_ */
Signature · 1 line
2.1.4
PATCH 6/6 Kconfig: migrate BOUNCE_BUFFER (final moveconfig)
In reply to Philipp TomsichThere's a few boards that seem to have BOUNCE_BUFFER as a purely elective option: at least I could not find a driver that actually depends on it for these.
As a final migration step, these boards have BOUNCE_BUFFER moved from their header files into the corresponding defconfig using moveconfig.
---
configs/bcm911360_entphn-ns_defconfig | 1 + configs/bcm911360_entphn_defconfig | 1 + configs/bcm911360k_defconfig | 1 + configs/bcm958300k-ns_defconfig | 1 + configs/bcm958300k_defconfig | 1 + configs/bcm958305k_defconfig | 1 + configs/bcm958622hr_defconfig | 1 + configs/socfpga_arria10_defconfig | 1 + include/configs/bcm_ep_board.h | 3 --- include/configs/socfpga_common.h | 1 - include/configs/socfpga_stratix10_socdk.h | 1 - 11 files changed, 8 insertions(+), 5 deletions(-)
configs/bcm911360_entphn-ns_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x20000000,ARMV7_NONSEC" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm911360_entphn_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x20000000" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm911360k_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm958300k-ns_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000,ARMV7_NONSEC" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm958300k_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm958305k_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x40000000" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/bcm958622hr_defconfig +1 -0
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_SDRAM_SIZE=0x01000000" CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOUNCE_BUFFER=y CONFIG_HUSH_PARSER=y # CONFIG_AUTOBOOT is not set CONFIG_CMD_BOOTZ=y
configs/socfpga_arria10_defconfig +1 -0
@@ -12,6 +12,7 @@ CONFIG_BOOTARGS="console=ttyS0,115200" # CONFIG_USE_BOOTCOMMAND is not set CONFIG_DEFAULT_FDT_FILE="socfpga_arria10_socdk_sdmmc.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_BOUNCE_BUFFER=y CONFIG_SPL_FPGA_SUPPORT=y CONFIG_SPL_SPI_LOAD=y CONFIG_CMD_ASKENV=y
include/configs/bcm_ep_board.h +0 -3
@@ -55,7 +55,4 @@/* Enable Time Command */ -/* Misc utility code */ -#define CONFIG_BOUNCE_BUFFER -#endif /* __BCM_EP_BOARD_H */
include/configs/socfpga_common.h +0 -1
@@ -121,7 +121,6 @@* MMC Driver */ #ifdef CONFIG_CMD_MMC -#define CONFIG_BOUNCE_BUFFER /* FIXME */ /* using smaller max blk cnt to avoid flooding the limited stack we have */ #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256/* FIXME -- SPL only? */
include/configs/socfpga_stratix10_socdk.h +0 -1
@@ -154,7 +154,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);* SDMMC configurations */ #ifdef CONFIG_CMD_MMC -#define CONFIG_BOUNCE_BUFFER #define CONFIG_SYS_MMC_MAX_BLK_COUNT 256#endif /*
Signature · 1 line
2.1.4
cover Migrate BOUNCE_BUFFER
In reply to Philipp Tomsich[cut down CC list as gmail won't let me send to that many people :-( ]
Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
Quoted 16 lines
A number of MMC drivers uses
BOUNCE_BUFFERfor their DMA buffers. This moves it intoKconfigand performs a step-by-step migration for the affected boards/drivers.In doing so, it turns out that a few boards/configs enabled
CONFIG_BOUNCE_BUFFERin their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.Given that
BOUNCE_BUFFERonly controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.
Quoted 3 lines
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
I think this is a good idea, but I get build errors after applying patch 2/6 since CONFIG_BOUNCE_BUFFER is now enabled via Kconfig and defined as 1 while at the same time it is just defined (but to nothing) in socfpga_common.h.
Can you change or reorder this series so that every commit compiles?
Regards,
Simon
Quoted 45 lines
Philipp Tomsich (6):
Kconfig: MigrateBOUNCE_BUFFER
mmc:dw_mmc: depend onBOUNCE_BUFFER
mmc: mxsmmc: selectBOUNCE_BUFFERunconditionally
mmc: tegra: selectBOUNCE_BUFFERunconditionally
arc: selectBOUNCE_BUFFERforCMD_NANDon AXS10x
Kconfig: migrateBOUNCE_BUFFER(final moveconfig)arch/arc/Kconfig | 2 ++ common/Kconfig | 8 ++++++++ configs/bcm911360_entphn-ns_defconfig | 1 + configs/bcm911360_entphn_defconfig | 1 + configs/bcm911360k_defconfig | 1 + configs/bcm958300k-ns_defconfig | 1 + configs/bcm958300k_defconfig | 1 + configs/bcm958305k_defconfig | 1 + configs/bcm958622hr_defconfig | 1 + configs/socfpga_arria10_defconfig | 1 + drivers/mmc/Kconfig | 3 +++ include/configs/axs10x.h | 5 ----- include/configs/bcm_ep_board.h | 3 --- include/configs/emsdp.h | 3 --- include/configs/exynos-common.h | 3 --- include/configs/hikey.h | 3 --- include/configs/hsdk.h | 5 ----- include/configs/iot_devkit.h | 3 --- include/configs/mx6_common.h | 1 - include/configs/mx7_common.h | 1 - include/configs/mx7ulp_evk.h | 1 - include/configs/mxs.h | 5 ----- include/configs/poplar.h | 3 --- include/configs/rk3036_common.h | 2 -- include/configs/rk3128_common.h | 3 --- include/configs/rk3188_common.h | 3 --- include/configs/rk322x_common.h | 3 --- include/configs/rk3288_common.h | 3 --- include/configs/rk3328_common.h | 3 --- include/configs/rk3368_common.h | 2 -- include/configs/rk3399_common.h | 1 - include/configs/socfpga_common.h | 1 - include/configs/socfpga_stratix10_socdk.h | 1 - include/configs/tegra-common.h | 3 --- scripts/config_whitelist.txt | 1 - 35 files changed, 21 insertions(+), 62 deletions(-)
cover Migrate BOUNCE_BUFFER
Simon,
Quoted 3 lines · Simon Goldschmidt
[cut down CC list as gmail won't let me send to that many people :-( ]
Sometimes I wonder if patman will at some point get a feature to avoid those endless CC lists for changes like this one.
Quoted 17 lines
Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
Quoted 16 lines
A number of MMC drivers uses
BOUNCE_BUFFERfor their DMA buffers. This moves it intoKconfigand performs a step-by-step migration for the affected boards/drivers.In doing so, it turns out that a few boards/configs enabled
CONFIG_BOUNCE_BUFFERin their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.Given that
BOUNCE_BUFFERonly controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.
Quoted 5 lines
Quoted 3 lines
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
I think this is a good idea, but I get build errors after applying patch 2/6 since
CONFIG_BOUNCE_BUFFERis now enabled viaKconfigand defined as 1 while at the same time it is just defined (but to nothing) insocfpga_common.h.
This is a problem of having multiple individual patches for a moveconfig-style change. You need the final patch (6/6) in addition to (1/6) for socfpga.
Quoted 1 line
Can you change or reorder this series so that every commit compiles?
There’s a couple options (none of they appeal to me):
1. I lump everything together into one big change.
2. I have a complete moveconfig (i.e. polluting all defconfig files) in the
first patch and the individual changes to the MMC drivers then remove the defconfig entries for their platforms.
3. We skip this part of the conversion and directly skip forward to having
bounce-buffer always included and leave the cleanup to the linker…
I’m happy to change this to any of the 3 options (although I’ll probably need a shower afterwards to feel less dirty, if we go with option #1 …)
Philipp.
cover Migrate BOUNCE_BUFFER
Tom,
Quoted 47 lines · Philipp Tomsich
Simon,
Quoted 3 lines · On 30.11.2018, at 14:55, Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com…
[cut down CC list as gmail won't let me send to that many people :-( ]
Sometimes I wonder if patman will at some point get a feature to avoid those endless CC lists for changes like this one.
Quoted 17 lines
Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
Quoted 16 lines
A number of MMC drivers uses
BOUNCE_BUFFERfor their DMA buffers. This moves it intoKconfigand performs a step-by-step migration for the affected boards/drivers.In doing so, it turns out that a few boards/configs enabled
CONFIG_BOUNCE_BUFFERin their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.Given that
BOUNCE_BUFFERonly controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.Quoted 5 lines
Quoted 3 lines
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
I think this is a good idea, but I get build errors after applying patch 2/6 since
CONFIG_BOUNCE_BUFFERis now enabled viaKconfigand defined as 1 while at the same time it is just defined (but to nothing) insocfpga_common.h.This is a problem of having multiple individual patches for a moveconfig-style change. You need the final patch (6/6) in addition to (1/6) for socfpga.
Quoted 1 line
Can you change or reorder this series so that every commit compiles?
There’s a couple options (none of they appeal to me):
1. I lump everything together into one big change.
2. I have a complete moveconfig (i.e. polluting all defconfig files) in the
first patch and the individual changes to the MMC drivers then remove the defconfig entries for their platforms.
3. We skip this part of the conversion and directly skip forward to having
bounce-buffer always included and leave the cleanup to the linker…
Quoted 2 lines
I’m happy to change this to any of the 3 options (although I’ll probably need a shower afterwards to feel less dirty, if we go with option #1 …)
I now tried option #2, but that leads to the final patch being subsumed into the first one (i.e. the maintainers of socfpga and the bcm* ports don’t get a chance to say “we confirm that this is not needed, just drop patch 6/6”).
So this boils down to whether Tom is ok with this being a series that has failures if not fully applied (i.e. patch 1/1 leaving loose ends that the follow-on patches address on a per-MMC-controller and per-platform basis)…
…or if we skip the conversion and trust the linker to do the right thing.
Thanks,
Philipp.
cover Migrate BOUNCE_BUFFER
Quoted 52 lines · Philipp Tomsich
Tom,
Quoted 47 lines · Philipp Tomsich
Simon,
Quoted 3 lines · On 30.11.2018, at 14:55, Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com…
[cut down CC list as gmail won't let me send to that many people :-( ]
Sometimes I wonder if patman will at some point get a feature to avoid those endless CC lists for changes like this one.
Quoted 17 lines
Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
Quoted 16 lines
A number of MMC drivers uses
BOUNCE_BUFFERfor their DMA buffers. This moves it intoKconfigand performs a step-by-step migration for the affected boards/drivers.In doing so, it turns out that a few boards/configs enabled
CONFIG_BOUNCE_BUFFERin their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.Given that
BOUNCE_BUFFERonly controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.Quoted 5 lines
Quoted 3 lines
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
I think this is a good idea, but I get build errors after applying patch 2/6 since
CONFIG_BOUNCE_BUFFERis now enabled viaKconfigand defined as 1 while at the same time it is just defined (but to nothing) insocfpga_common.h.This is a problem of having multiple individual patches for a moveconfig-style change. You need the final patch (6/6) in addition to (1/6) for socfpga.
Quoted 1 line
Can you change or reorder this series so that every commit compiles?
There’s a couple options (none of they appeal to me):
1. I lump everything together into one big change.
2. I have a complete moveconfig (i.e. polluting all defconfig files) in the
first patch and the individual changes to the MMC drivers then remove the defconfig entries for their platforms.
3. We skip this part of the conversion and directly skip forward to having
bounce-buffer always included and leave the cleanup to the linker…Quoted 2 lines
I’m happy to change this to any of the 3 options (although I’ll probably need a shower afterwards to feel less dirty, if we go with option #1 …)
Quoted 8 lines
I now tried option #2, but that leads to the final patch being subsumed into the first one (i.e. the maintainers of socfpga and the bcm* ports don’t get a chance to say “we confirm that this is not needed, just drop patch 6/6”).
So this boils down to whether Tom is ok with this being a series that has failures if not fully applied (i.e. patch 1/1 leaving loose ends that the follow-on patches address on a per-MMC-controller and per-platform basis)…
…or if we skip the conversion and trust the linker to do the right thing.
So, what I was thinking I would do here at first was see if we see any size changes with this series, and if none, then see what happens if we drop these "enabling but doesn't look used" cases, and see what's going on. It wouldn't be the first case where it turns out we have something enabled and then being discarded as unused and people didn't realize it.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181130/4361ba91/attachment.sig>
cover Migrate BOUNCE_BUFFER
In reply to Philipp TomsichSorry for the broken format in the last mail. Seems like thunderbird broke my setup after upgrading to v60...
Am 30.11.2018 um 16:30 schrieb Philipp Tomsich:
Quoted 69 lines
Tom,
Quoted 57 lines
On 30.11.2018, at 15:13, Philipp Tomsich <[email protected] <mailto:[email protected]>> wrote:
Simon,
Quoted 5 lines
On 30.11.2018, at 14:55, Simon Goldschmidt
<[email protected]
<mailto:[email protected]>> wrote:[cut down CC list as gmail won't let me send to that many people :-( ]
Sometimes I wonder if patman will at some point get a feature to avoid those
endless CC lists for changes like this one.Quoted 17 lines
Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
Quoted 16 lines
A number of MMC drivers uses
BOUNCE_BUFFERfor their DMA buffers. This moves it intoKconfigand performs a step-by-step migration for the affected boards/drivers.In doing so, it turns out that a few boards/configs enabled
CONFIG_BOUNCE_BUFFERin their config headers without an apparent need. The migration (using moveconfig) for those boards is kept in a separate patch, so it can be more easily reviewed by the affected parties to make a determination whether it is actually needed.Given that
BOUNCE_BUFFERonly controls whether the bounce_buffer_* functions are build and linked, this configuration option could be entirely removed and the utility functions built unconditionally. For platforms that don't make use of these functions, the linker will then remove the unused symbols.Quoted 8 lines
Quoted 3 lines
I'll leave the final decision if this would be a better implementation (or if this should be done in a two-stage process) to someone else... END.
I think this is a good idea, but I get build errors after applying patch 2/6 since
CONFIG_BOUNCE_BUFFERis now enabled viaKconfigand defined as 1 while at the same time it is just defined (but to nothing) insocfpga_common.h.This is a problem of having multiple individual patches for a moveconfig-style
change. You need the final patch (6/6) in addition to (1/6) for socfpga.Quoted 1 line
Can you change or reorder this series so that every commit compiles?
There’s a couple options (none of they appeal to me):
1.I lump everything together into one big change.
2.I have a complete moveconfig (i.e. polluting all defconfig files) in the
first patch and the individual changes to the MMC drivers then remove the defconfig entries for their platforms.
3.We skip this part of the conversion and directly skip forward to having bounce-buffer always included and leave the cleanup to the linker…Quoted 3 lines
I’m happy to change this to any of the 3 options (although I’ll probably need
a shower afterwards to feel less dirty, if we go with option #1 …)I now tried option #2, but that leads to the final patch being subsumed into the
first one (i.e. the maintainers of socfpga and the bcm* ports don’t get a chance
to say “we confirm that this is not needed, just drop patch 6/6”).
Quoted 6 lines
So this boils down to whether Tom is ok with this being a series that has failures
if not fully applied (i.e. patch 1/1 leaving loose ends that the follow-on patches
address on a per-MMC-controller and per-platform basis)…
…or if we skip the conversion and trust the linker to do the right thing.
Ok, in that case, I'll leave it up to Tom or others to decide.
Simon