* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
@ 2018-11-30 11:39 Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 1/6] Kconfig: " Philipp Tomsich
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
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(-)
--
2.1.4
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/6] Kconfig: Migrate BOUNCE_BUFFER
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 13:41 ` Alexey Brodkin
2018-11-30 11:39 ` [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER Philipp Tomsich
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
common/Kconfig | 8 ++++++++
scripts/config_whitelist.txt | 1 -
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/common/Kconfig b/common/Kconfig
index 57bd16d..f45e066 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -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
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index b3f525f..2151d65 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 1/6] Kconfig: " Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 13:37 ` Otavio Salvador
2018-11-30 11:39 ` [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally Philipp Tomsich
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
The 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.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
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(-)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index fbd1396..65d43a5 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -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
diff --git a/include/configs/emsdp.h b/include/configs/emsdp.h
index 385d59e..23c71f4 100644
--- a/include/configs/emsdp.h
+++ b/include/configs/emsdp.h
@@ -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
*/
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index f3f194f..752acc5 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -34,9 +34,6 @@
/* select serial console configuration */
-/* SD/MMC configuration */
-#define CONFIG_BOUNCE_BUFFER
-
/* PWM */
#define CONFIG_PWM
diff --git a/include/configs/hikey.h b/include/configs/hikey.h
index 1376d61..6d9e6eb 100644
--- a/include/configs/hikey.h
+++ b/include/configs/hikey.h
@@ -53,9 +53,6 @@
#define CONFIG_HIKEY_GPIO
-/* SD/MMC configuration */
-#define CONFIG_BOUNCE_BUFFER
-
/* Command line configuration */
/* BOOTP options */
diff --git a/include/configs/hsdk.h b/include/configs/hsdk.h
index cdf4fdd..2ec2fd1 100644
--- a/include/configs/hsdk.h
+++ b/include/configs/hsdk.h
@@ -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
diff --git a/include/configs/iot_devkit.h b/include/configs/iot_devkit.h
index 4ffe114..cd1309d 100644
--- a/include/configs/iot_devkit.h
+++ b/include/configs/iot_devkit.h
@@ -71,9 +71,6 @@
CONFIG_SYS_MALLOC_LEN - \
CONFIG_ENV_SIZE
-/* Required by DW MMC driver */
-#define CONFIG_BOUNCE_BUFFER
-
/*
* Environment
*/
diff --git a/include/configs/poplar.h b/include/configs/poplar.h
index 0a12600..a7a77ec 100644
--- a/include/configs/poplar.h
+++ b/include/configs/poplar.h
@@ -26,9 +26,6 @@
/* USB configuration */
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-/* SD/MMC */
-#define CONFIG_BOUNCE_BUFFER
-
/*****************************************************************************
* Initial environment variables
*****************************************************************************/
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index d4e5406..1a6aeb7 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -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)
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index 3e9e642..f4f64ed 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -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)
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index d1837d5..612d643 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -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
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index 176bd0c..e72aa8d 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -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
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 5388b13..01f297b 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -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)
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 9174c67..4afa186 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -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)
diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h
index 6638491..88c1af0 100644
--- a/include/configs/rk3368_common.h
+++ b/include/configs/rk3368_common.h
@@ -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" \
diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index eeda070..9a4da39 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -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. */
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 1/6] Kconfig: " Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 12:04 ` Fabio Estevam
2018-11-30 11:39 ` [U-Boot] [PATCH 4/6] mmc: tegra: " Philipp Tomsich
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
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 <philipp.tomsich@theobroma-systems.com>
---
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(-)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 65d43a5..e16dd6a 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -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
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 1b2961f..cdc8833 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -55,7 +55,6 @@
#define CONFIG_SYS_MAXARGS 32
/* MMC */
-#define CONFIG_BOUNCE_BUFFER
#define CONFIG_FSL_USDHC
/* Fuses */
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index b0b7e1e..a895c93 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -40,7 +40,6 @@
#define CONFIG_MXC_UART
/* MMC */
-#define CONFIG_BOUNCE_BUFFER
#define CONFIG_FSL_USDHC
/* Fuses */
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index 3d32ff1..b8dcaa1 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -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 */
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 9e59e7a..20719c9 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -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
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/6] mmc: tegra: select BOUNCE_BUFFER unconditionally
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
` (2 preceding siblings ...)
2018-11-30 11:39 ` [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 5/6] arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x Philipp Tomsich
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
The 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.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
drivers/mmc/Kconfig | 1 +
include/configs/tegra-common.h | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index e16dd6a..eb2e9bc 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -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
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 4d249dd..d37e2d7 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -88,7 +88,4 @@
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000
#endif
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
#endif /* _TEGRA_COMMON_H_ */
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/6] arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
` (3 preceding siblings ...)
2018-11-30 11:39 ` [U-Boot] [PATCH 4/6] mmc: tegra: " Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 6/6] Kconfig: migrate BOUNCE_BUFFER (final moveconfig) Philipp Tomsich
2018-11-30 13:55 ` [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Simon Goldschmidt
6 siblings, 0 replies; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
The 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.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
arch/arc/Kconfig | 2 ++
include/configs/axs10x.h | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index fa6b344..50369d5 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -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"
diff --git a/include/configs/axs10x.h b/include/configs/axs10x.h
index 1b2966f..bd1c902 100644
--- a/include/configs/axs10x.h
+++ b/include/configs/axs10x.h
@@ -82,9 +82,4 @@
* Console configuration
*/
-/*
- * Misc utility configuration
- */
-#define CONFIG_BOUNCE_BUFFER
-
#endif /* _CONFIG_AXS10X_H_ */
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 6/6] Kconfig: migrate BOUNCE_BUFFER (final moveconfig)
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
` (4 preceding siblings ...)
2018-11-30 11:39 ` [U-Boot] [PATCH 5/6] arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x Philipp Tomsich
@ 2018-11-30 11:39 ` Philipp Tomsich
2018-11-30 13:55 ` [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Simon Goldschmidt
6 siblings, 0 replies; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 11:39 UTC (permalink / raw)
To: u-boot
There'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.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
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(-)
diff --git a/configs/bcm911360_entphn-ns_defconfig b/configs/bcm911360_entphn-ns_defconfig
index 7e4920f..be8a90e 100644
--- a/configs/bcm911360_entphn-ns_defconfig
+++ b/configs/bcm911360_entphn-ns_defconfig
@@ -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
diff --git a/configs/bcm911360_entphn_defconfig b/configs/bcm911360_entphn_defconfig
index a7c6475..ba81847 100644
--- a/configs/bcm911360_entphn_defconfig
+++ b/configs/bcm911360_entphn_defconfig
@@ -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
diff --git a/configs/bcm911360k_defconfig b/configs/bcm911360k_defconfig
index 349f2b8..132234c 100644
--- a/configs/bcm911360k_defconfig
+++ b/configs/bcm911360k_defconfig
@@ -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
diff --git a/configs/bcm958300k-ns_defconfig b/configs/bcm958300k-ns_defconfig
index fd0da02..d95ef15 100644
--- a/configs/bcm958300k-ns_defconfig
+++ b/configs/bcm958300k-ns_defconfig
@@ -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
diff --git a/configs/bcm958300k_defconfig b/configs/bcm958300k_defconfig
index 349f2b8..132234c 100644
--- a/configs/bcm958300k_defconfig
+++ b/configs/bcm958300k_defconfig
@@ -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
diff --git a/configs/bcm958305k_defconfig b/configs/bcm958305k_defconfig
index 349f2b8..132234c 100644
--- a/configs/bcm958305k_defconfig
+++ b/configs/bcm958305k_defconfig
@@ -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
diff --git a/configs/bcm958622hr_defconfig b/configs/bcm958622hr_defconfig
index 74d9f25..d5cb7f6 100644
--- a/configs/bcm958622hr_defconfig
+++ b/configs/bcm958622hr_defconfig
@@ -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
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index 6ebda81..f321a0a 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -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
diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h
index 0586c53a..09a5804 100644
--- a/include/configs/bcm_ep_board.h
+++ b/include/configs/bcm_ep_board.h
@@ -55,7 +55,4 @@
/* Enable Time Command */
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
#endif /* __BCM_EP_BOARD_H */
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index bd8f5c8..3b32dd2 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -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? */
diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h
index e190b3d..f9319a2 100644
--- a/include/configs/socfpga_stratix10_socdk.h
+++ b/include/configs/socfpga_stratix10_socdk.h
@@ -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
/*
--
2.1.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally
2018-11-30 11:39 ` [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally Philipp Tomsich
@ 2018-11-30 12:04 ` Fabio Estevam
0 siblings, 0 replies; 15+ messages in thread
From: Fabio Estevam @ 2018-11-30 12:04 UTC (permalink / raw)
To: u-boot
On Fri, Nov 30, 2018 at 9:43 AM Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
>
> 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 <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER
2018-11-30 11:39 ` [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER Philipp Tomsich
@ 2018-11-30 13:37 ` Otavio Salvador
0 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2018-11-30 13:37 UTC (permalink / raw)
To: u-boot
On Fri, Nov 30, 2018 at 9:41 AM Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
>
> The 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.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
--
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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/6] Kconfig: Migrate BOUNCE_BUFFER
2018-11-30 11:39 ` [U-Boot] [PATCH 1/6] Kconfig: " Philipp Tomsich
@ 2018-11-30 13:41 ` Alexey Brodkin
0 siblings, 0 replies; 15+ messages in thread
From: Alexey Brodkin @ 2018-11-30 13:41 UTC (permalink / raw)
To: u-boot
Hi Philipp,
> -----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 <trini@konsulko.com>; Philipp Tomsich <philipp.tomsich@theobroma-systems.com>; Mario Six <mario.six@gdsys.cc>;
> Michal Simek <michal.simek@xilinx.com>; Simon Glass <sjg@chromium.org>; Masahiro Yamada
> <yamada.masahiro@socionext.com>; Alexey Brodkin <alexey.brodkin@synopsys.com>; Alex Kiernan <alex.kiernan@gmail.com>; Eric
> Nelson <eric@nelint.com>; Marek Vasut <marek.vasut@gmail.com>; Jörg Krause <joerg.krause@embedded.rocks>; Adam Ford
> <aford173@gmail.com>; Stephen Warren <swarren@nvidia.com>; Angelo Dureghello <angelo@sysam.it>; Tuomas Tynkkynen
> <tuomas.tynkkynen@iki.fi>; Eugeniu Rosca <roscaeugeniu@gmail.com>
> Subject: [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.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>
> ---
>
> common/Kconfig | 8 ++++++++
> scripts/config_whitelist.txt | 1 -
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/common/Kconfig b/common/Kconfig
> index 57bd16d..f45e066 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
` (5 preceding siblings ...)
2018-11-30 11:39 ` [U-Boot] [PATCH 6/6] Kconfig: migrate BOUNCE_BUFFER (final moveconfig) Philipp Tomsich
@ 2018-11-30 13:55 ` Simon Goldschmidt
2018-11-30 14:13 ` Philipp Tomsich
6 siblings, 1 reply; 15+ messages in thread
From: Simon Goldschmidt @ 2018-11-30 13:55 UTC (permalink / raw)
To: u-boot
[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:
> 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.
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
> 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(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
2018-11-30 13:55 ` [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Simon Goldschmidt
@ 2018-11-30 14:13 ` Philipp Tomsich
2018-11-30 15:30 ` Philipp Tomsich
0 siblings, 1 reply; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 14:13 UTC (permalink / raw)
To: u-boot
Simon,
> On 30.11.2018, at 14:55, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> 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.
> Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
>> 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.
>
> 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.
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.
> 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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
2018-11-30 14:13 ` Philipp Tomsich
@ 2018-11-30 15:30 ` Philipp Tomsich
2018-11-30 15:36 ` Tom Rini
2018-11-30 16:26 ` Simon Goldschmidt
0 siblings, 2 replies; 15+ messages in thread
From: Philipp Tomsich @ 2018-11-30 15:30 UTC (permalink / raw)
To: u-boot
Tom,
> On 30.11.2018, at 15:13, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
>
> Simon,
>
>> On 30.11.2018, at 14:55, Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com <mailto:simon.k.r.goldschmidt@gmail.com>> 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.
>
>> Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
>>> 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.
>>
>> 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.
>
> 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.
>
>> 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 …)
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.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
2018-11-30 15:30 ` Philipp Tomsich
@ 2018-11-30 15:36 ` Tom Rini
2018-11-30 16:26 ` Simon Goldschmidt
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2018-11-30 15:36 UTC (permalink / raw)
To: u-boot
On Fri, Nov 30, 2018 at 04:30:53PM +0100, Philipp Tomsich wrote:
> Tom,
>
> > On 30.11.2018, at 15:13, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
> >
> > Simon,
> >
> >> On 30.11.2018, at 14:55, Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com <mailto:simon.k.r.goldschmidt@gmail.com>> 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.
> >
> >> Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
> >>> 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.
> >>
> >> 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.
> >
> > 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.
> >
> >> 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 …)
>
> 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.
--
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>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER
2018-11-30 15:30 ` Philipp Tomsich
2018-11-30 15:36 ` Tom Rini
@ 2018-11-30 16:26 ` Simon Goldschmidt
1 sibling, 0 replies; 15+ messages in thread
From: Simon Goldschmidt @ 2018-11-30 16:26 UTC (permalink / raw)
To: u-boot
Sorry 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:
> Tom,
>
>> On 30.11.2018, at 15:13, Philipp Tomsich
>> <philipp.tomsich@theobroma-systems.com
>> <mailto:philipp.tomsich@theobroma-systems.com>> wrote:
>>
>> Simon,
>>
>>> On 30.11.2018, at 14:55, Simon Goldschmidt
>>> <simon.k.r.goldschmidt@gmail.com
>>> <mailto:simon.k.r.goldschmidt@gmail.com>> 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.
>>
>>> Am 30.11.2018 um 12:39 schrieb Philipp Tomsich:
>>>> 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.
>>>
>>> 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.
>>
>> 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.
>>
>>> 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 …)
>
> 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.
Ok, in that case, I'll leave it up to Tom or others to decide.
Simon
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2018-11-30 16:26 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 11:39 [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 1/6] Kconfig: " Philipp Tomsich
2018-11-30 13:41 ` Alexey Brodkin
2018-11-30 11:39 ` [U-Boot] [PATCH 2/6] mmc: dw_mmc: depend on BOUNCE_BUFFER Philipp Tomsich
2018-11-30 13:37 ` Otavio Salvador
2018-11-30 11:39 ` [U-Boot] [PATCH 3/6] mmc: mxsmmc: select BOUNCE_BUFFER unconditionally Philipp Tomsich
2018-11-30 12:04 ` Fabio Estevam
2018-11-30 11:39 ` [U-Boot] [PATCH 4/6] mmc: tegra: " Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 5/6] arc: select BOUNCE_BUFFER for CMD_NAND on AXS10x Philipp Tomsich
2018-11-30 11:39 ` [U-Boot] [PATCH 6/6] Kconfig: migrate BOUNCE_BUFFER (final moveconfig) Philipp Tomsich
2018-11-30 13:55 ` [U-Boot] [PATCH 0/6] Migrate BOUNCE_BUFFER Simon Goldschmidt
2018-11-30 14:13 ` Philipp Tomsich
2018-11-30 15:30 ` Philipp Tomsich
2018-11-30 15:36 ` Tom Rini
2018-11-30 16:26 ` Simon Goldschmidt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.