Skip to contentSkip to conversation

ARM: tegra: make bounce buffer option common

PATCH New Stephen Warren 3 participants 10 messages Mar 1, 2013 – Mar 8, 2013 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 ARM: tegra: make bounce buffer option common

From: Stephen Warren <[email protected]>

All Tegra devices will need CONFIG_BOUNCE_BUFFER. Move it to tegra-common.h to ensure it's always set.

---
v2: Add missing word to commit subject.

This is based on u-boot-tegra/next, plus my reset vector fix (which shouldn't conflict), plus Tom's Tegra30 MMC series.

 include/configs/tegra-common.h   |    3 +++
 include/configs/tegra20-common.h |    3 ---
 include/configs/tegra30-common.h |    3 ---
 3 files changed, 3 insertions(+), 6 deletions(-)
include/configs/tegra-common.h +3 -0
index 4a656bb..a3cb5b9 100644
@@ -157,4 +157,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
 
+/* Misc utility code */
+#define CONFIG_BOUNCE_BUFFER
+
 #endif /* _TEGRA_COMMON_H_ */
include/configs/tegra20-common.h +0 -3
index 33e5f52..dac8245 100644
@@ -114,7 +114,4 @@
 #define CONFIG_SYS_NAND_SELF_INIT
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
 #endif /* _TEGRA20_COMMON_H_ */
include/configs/tegra30-common.h +0 -3
index bd1dfe8..04517e1 100644
@@ -86,7 +86,4 @@
 /* Total I2C ports on Tegra30 */
 #define TEGRA_I2C_NUM_CONTROLLERS	5
 
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
 #endif /* _TEGRA30_COMMON_H_ */
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v2 2/4 disk: define HAVE_BLOCK_DEVICE in a common place

From: Stephen Warren <[email protected]>

This set of ifdefs is used in a number of places. Move its definition somewhere common so it doesn't have to be repeated.

---
v2: New patch

---
 disk/part.c                |   10 ----------
 disk/part_amiga.c          |    6 +-----
 disk/part_dos.c            |    7 +------
 disk/part_efi.c            |    8 +-------
 disk/part_iso.c            |    7 +------
 disk/part_mac.c            |    7 +------
 include/config_fallbacks.h |   10 ++++++++++
 7 files changed, 15 insertions(+), 40 deletions(-)
disk/part.c +0 -10
index 7bdc90e..1525ed9 100644
@@ -35,16 +35,6 @@
 #define PRINTF(fmt,args...)
 #endif
 
-/* Rather than repeat this expression each time, add a define for it */
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC) || \
-     defined(CONFIG_SYSTEMACE) )
-#define HAVE_BLOCK_DEVICE
-#endif
-
 struct block_drvr {
 	char *name;
 	block_dev_desc_t* (*get_dev)(int dev);
disk/part_amiga.c +1 -5
index dc7d462..0e6d82d 100644
@@ -26,11 +26,7 @@
 #include <ide.h>
 #include "part_amiga.h"
 
-#if defined(CONFIG_CMD_IDE) || \
-    defined(CONFIG_CMD_SCSI) || \
-    defined(CONFIG_CMD_USB) || \
-    defined(CONFIG_MMC) || \
-    defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 #undef AMIGA_DEBUG
 
disk/part_dos.c +1 -6
index 3fe901b..37087a6 100644
@@ -35,12 +35,7 @@
 #include <ide.h>
 #include "part_dos.h"
 
-#if defined(CONFIG_CMD_IDE) || \
-    defined(CONFIG_CMD_SATA) || \
-    defined(CONFIG_CMD_SCSI) || \
-    defined(CONFIG_CMD_USB) || \
-    defined(CONFIG_MMC) || \
-    defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 /* Convert char[4] in little endian format to the host format integer
  */
disk/part_efi.c +1 -7
index 7665017..b3fd0e9 100644
@@ -39,13 +39,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_CMD_IDE) || \
-    defined(CONFIG_CMD_SATA) || \
-    defined(CONFIG_CMD_SCSI) || \
-    defined(CONFIG_CMD_USB) || \
-    defined(CONFIG_MMC) || \
-    defined(CONFIG_SYSTEMACE)
-
+#ifdef HAVE_BLOCK_DEVICE
 /**
  * efi_crc32() - EFI version of crc32 function
  * @buf: buffer to calculate crc32 of
disk/part_iso.c +1 -6
index 4401790..49639af 100644
@@ -25,12 +25,7 @@
 #include <command.h>
 #include "part_iso.h"
 
-#if defined(CONFIG_CMD_IDE) || \
-    defined(CONFIG_CMD_SCSI) || \
-    defined(CONFIG_CMD_SATA) || \
-    defined(CONFIG_CMD_USB) || \
-    defined(CONFIG_MMC) || \
-    defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 /* #define	ISO_PART_DEBUG */
 
disk/part_mac.c +1 -6
index cb443ac..74dc12f 100644
@@ -34,12 +34,7 @@
 #include <ide.h>
 #include "part_mac.h"
 
-#if defined(CONFIG_CMD_IDE) || \
-    defined(CONFIG_CMD_SCSI) || \
-    defined(CONFIG_CMD_SATA) || \
-    defined(CONFIG_CMD_USB) || \
-    defined(CONFIG_MMC) || \
-    defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 /* stdlib.h causes some compatibility problems; should fixe these! -- wd */
 #ifndef __ldiv_t_defined
include/config_fallbacks.h +10 -0
index bfb9680..653ff2b 100644
@@ -26,4 +26,14 @@
 #define CONFIG_EXT4_WRITE
 #endif
 
+/* Rather than repeat this expression each time, add a define for it */
+#if defined(CONFIG_CMD_IDE) || \
+	defined(CONFIG_CMD_SATA) || \
+	defined(CONFIG_CMD_SCSI) || \
+	defined(CONFIG_CMD_USB) || \
+	defined(CONFIG_MMC) || \
+	defined(CONFIG_SYSTEMACE)
+#define HAVE_BLOCK_DEVICE
+#endif
+
 #endif	/* __CONFIG_FALLBACKS_H */
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH v2 2/4 disk: define HAVE_BLOCK_DEVICE in a common place

In reply to Stephen Warren
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This set of ifdefs is used in a number of places. Move its definition somewhere common so it doesn't have to be repeated.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130308/3978e2f0/attachment.pgp>
#4 lore raw

PATCH v2 3/4 disk: define HAVE_BLOCK_DEVICE if CONFIG_CMD_PART

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

Various code that is conditional upon HAVE_BLOCK_DEVICE is required by code conditional upon CONFIG_CMD_PART. So, enable HAVE_BLOCK_DEVICE if CONFIG_CMD_PART is enabled.

---
v2: New patch

---
 include/config_fallbacks.h |    1 +
 1 file changed, 1 insertion(+)
include/config_fallbacks.h +1 -0
index 653ff2b..9298d0e 100644
@@ -31,6 +31,7 @@
 	defined(CONFIG_CMD_SATA) || \
 	defined(CONFIG_CMD_SCSI) || \
 	defined(CONFIG_CMD_USB) || \
+	defined(CONFIG_CMD_PART) || \
 	defined(CONFIG_MMC) || \
 	defined(CONFIG_SYSTEMACE)
 #define HAVE_BLOCK_DEVICE
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v2 3/4 disk: define HAVE_BLOCK_DEVICE if CONFIG_CMD_PART

Quoted 7 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Various code that is conditional upon HAVE_BLOCK_DEVICE is required by code conditional upon CONFIG_CMD_PART. So, enable HAVE_BLOCK_DEVICE if CONFIG_CMD_PART is enabled.

Quoted 21 lines

---
v2: New patch

---
 include/config_fallbacks.h |    1 +
 1 file changed, 1 insertion(+)
include/config_fallbacks.h +1 -1
index 653ff2b..9298d0e 100644
@@ -31,6 +31,7 @@
        defined(CONFIG_CMD_SATA) || \
        defined(CONFIG_CMD_SCSI) || \
        defined(CONFIG_CMD_USB) || \
+       defined(CONFIG_CMD_PART) || \
        defined(CONFIG_MMC) || \
        defined(CONFIG_SYSTEMACE)
 #define HAVE_BLOCK_DEVICE
--

1.7.10.4

#6 lore raw

PATCH v2 3/4 disk: define HAVE_BLOCK_DEVICE if CONFIG_CMD_PART

In reply to Stephen Warren
Quoted 7 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Various code that is conditional upon HAVE_BLOCK_DEVICE is required by code conditional upon CONFIG_CMD_PART. So, enable HAVE_BLOCK_DEVICE if CONFIG_CMD_PART is enabled.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130308/c7804412/attachment.pgp>
#7 lore raw

PATCH v2 4/4 ARM: tegra: enable a common set of disk-related commands everywhere

In reply to Stephen Warren

From: Stephen Warren <[email protected]>

Enable a common set of partition types, filesystems, and related commands in tegra-common.h, so that they are available on all Tegra boards. This allows boot.scr (loaded and executed by the default built-in environment) on those boards to assume that certain features are always available.

Do this in tegra-common.h, so that individual board files can undefine the features if they really don't want any of them.

---
v2: Reworked to avoid compilation issues on Dalmore, and enable all features on all Tegra boards.

---
 include/configs/cardhu.h           |    8 --------
 include/configs/colibri_t20_iris.h |    6 ------
 include/configs/harmony.h          |    8 --------
 include/configs/medcom-wide.h      |    5 -----
 include/configs/paz00.h            |    8 --------
 include/configs/plutux.h           |    5 -----
 include/configs/seaboard.h         |    8 --------
 include/configs/tec.h              |    5 -----
 include/configs/tegra-common.h     |   12 ++++++++++++
 include/configs/tegra20-common.h   |    3 ---
 include/configs/trimslice.h        |    8 --------
 include/configs/ventana.h          |    8 --------
 include/configs/whistler.h         |    8 --------
 13 files changed, 12 insertions(+), 80 deletions(-)
include/configs/cardhu.h +0 -8
index 18c7eb8..55dc83d 100644
@@ -53,14 +53,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* Environment in eMMC, at the end of 2nd "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_OFFSET		((512 * 1024) - CONFIG_ENV_SIZE)
include/configs/colibri_t20_iris.h +0 -6
index 0e5f281..856c860 100644
@@ -40,12 +40,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-/* File system support */
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-
 /* USB host support */
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
include/configs/harmony.h +0 -8
index 8d1fd47..0c73f86 100644
@@ -56,14 +56,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* NAND support */
 #define CONFIG_CMD_NAND
 #define CONFIG_TEGRA_NAND
include/configs/medcom-wide.h +0 -5
index bae4ba0..57a50d7 100644
@@ -66,11 +66,6 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_DHCP
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-
 #define CONFIG_FIT
 
 #define CONFIG_BOOTCOMMAND				\
include/configs/paz00.h +0 -8
index 2edb4aa..eac1ef9 100644
@@ -44,14 +44,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* Environment in eMMC, at the end of 2nd "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)
include/configs/plutux.h +0 -5
index deee237..4cfe88a 100644
@@ -65,11 +65,6 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_DHCP
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-
 #define CONFIG_FIT
 
 #define CONFIG_BOOTCOMMAND				\
include/configs/seaboard.h +0 -8
index de0c777..f66173e 100644
@@ -70,14 +70,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* Environment in eMMC, at the end of 2nd "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE)
include/configs/tec.h +0 -5
index caeb9cd..f90f5c7 100644
@@ -73,11 +73,6 @@
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_DHCP
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-
 #define CONFIG_FIT
 
 #define CONFIG_BOOTCOMMAND				\
include/configs/tegra-common.h +12 -0
index a3cb5b9..9598104 100644
@@ -90,6 +90,18 @@
 #define CONFIG_COMMAND_HISTORY
 #define CONFIG_AUTO_COMPLETE
 
+/* turn on commonly used storage-related commands */
+
+#define CONFIG_DOS_PARTITION
+#define CONFIG_EFI_PARTITION
+#define CONFIG_PARTITION_UUIDS
+#define CONFIG_FS_EXT4
+#define CONFIG_FS_FAT
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_CMD_FS_GENERIC
+#define CONFIG_CMD_PART
+
 #define CONFIG_SYS_NO_FLASH
 
 #define CONFIG_CONSOLE_MUX
include/configs/tegra20-common.h +0 -3
index dac8245..311680e 100644
@@ -108,9 +108,6 @@
 /* Total I2C ports on Tegra20 */
 #define TEGRA_I2C_NUM_CONTROLLERS	4
 
-#define CONFIG_PARTITION_UUIDS
-#define CONFIG_CMD_PART
-
 #define CONFIG_SYS_NAND_SELF_INIT
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
include/configs/trimslice.h +0 -8
index 334d3a3..0644f7a 100644
@@ -67,14 +67,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* Environment in SPI */
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SPI_MAX_HZ		48000000
include/configs/ventana.h +0 -8
index b55ebc9..5755f11 100644
@@ -50,14 +50,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /* Environment in eMMC, at the end of 2nd "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)
include/configs/whistler.h +0 -8
index 1e554d8..9542c7e 100644
@@ -59,14 +59,6 @@
 #define CONFIG_TEGRA_MMC
 #define CONFIG_CMD_MMC
 
-#define CONFIG_DOS_PARTITION
-#define CONFIG_EFI_PARTITION
-#define CONFIG_FS_EXT4
-#define CONFIG_FS_FAT
-#define CONFIG_CMD_EXT2
-#define CONFIG_CMD_FAT
-#define CONFIG_CMD_FS_GENERIC
-
 /*
  * Environment in eMMC, at the end of 2nd "boot sector". Note: This assumes
  * the user plugged the standard 8MB MoviNAND card into J29/HSMMC/POP. If
Signature · 1 line
1.7.10.4
#8 lore raw

PATCH v2 4/4 ARM: tegra: enable a common set of disk-related commands everywhere

Quoted 8 lines · Stephen Warren

From: Stephen Warren <[email protected]>

Enable a common set of partition types, filesystems, and related commands in tegra-common.h, so that they are available on all Tegra boards. This allows boot.scr (loaded and executed by the default built-in environment) on those boards to assume that certain features are always available.

Quoted 4 lines

Do this in tegra-common.h, so that individual board files can undefine the features if they really don't want any of them.

Quoted 19 lines

---
v2: Reworked to avoid compilation issues on Dalmore, and enable all features on all Tegra boards.

---
 include/configs/cardhu.h           |    8 --------
 include/configs/colibri_t20_iris.h |    6 ------
 include/configs/harmony.h          |    8 --------
 include/configs/medcom-wide.h      |    5 -----
 include/configs/paz00.h            |    8 --------
 include/configs/plutux.h           |    5 -----
 include/configs/seaboard.h         |    8 --------
 include/configs/tec.h              |    5 -----
 include/configs/tegra-common.h     |   12 ++++++++++++
 include/configs/tegra20-common.h   |    3 ---
 include/configs/trimslice.h        |    8 --------
 include/configs/ventana.h          |    8 --------
 include/configs/whistler.h         |    8 --------
 13 files changed, 12 insertions(+), 80 deletions(-)
#9 lore raw

PATCH v2 1/4 ARM: tegra: make bounce buffer option common

In reply to Stephen Warren
Quoted 6 lines · Stephen Warren

From: Stephen Warren <[email protected]>

All Tegra devices will need CONFIG_BOUNCE_BUFFER. Move it to tegra-common.h to ensure it's always set.

Quoted 50 lines

---
v2: Add missing word to commit subject.

This is based on u-boot-tegra/next, plus my reset vector fix (which shouldn't conflict), plus Tom's Tegra30 MMC series.

 include/configs/tegra-common.h   |    3 +++
 include/configs/tegra20-common.h |    3 ---
 include/configs/tegra30-common.h |    3 ---
 3 files changed, 3 insertions(+), 6 deletions(-)
include/configs/tegra-common.h +3 -0
index 4a656bb..a3cb5b9 100644
@@ -157,4 +157,7 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
 
+/* Misc utility code */
+#define CONFIG_BOUNCE_BUFFER
+
 #endif /* _TEGRA_COMMON_H_ */
include/configs/tegra20-common.h +0 -3
index 33e5f52..dac8245 100644
@@ -114,7 +114,4 @@
 #define CONFIG_SYS_NAND_SELF_INIT
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
 #endif /* _TEGRA20_COMMON_H_ */
include/configs/tegra30-common.h +0 -4
index bd1dfe8..04517e1 100644
@@ -86,7 +86,4 @@
 /* Total I2C ports on Tegra30 */
 #define TEGRA_I2C_NUM_CONTROLLERS      5
 
-/* Misc utility code */
-#define CONFIG_BOUNCE_BUFFER
-
 #endif /* _TEGRA30_COMMON_H_ */
--

1.7.10.4