Skip to contentSkip to conversation

mips: Add SPL header

PATCH New Marek Vasut 2 participants 5 messages May 26, 2016 – May 27, 2016 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: Add SPL header

From: Paul Burton <[email protected]>

Add header with SPL boot mode and type definitions.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/include/asm/spl.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 arch/mips/include/asm/spl.h
arch/mips/include/asm/spl.h new file +35 -0
new file mode 100644
index 0000000..01baab6
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef	_ASM_SPL_H_
+#define	_ASM_SPL_H_
+
+enum {
+	BOOT_DEVICE_RAM,
+	BOOT_DEVICE_MMC1,
+	BOOT_DEVICE_MMC2,
+	BOOT_DEVICE_MMC2_2,
+	BOOT_DEVICE_NAND,
+	BOOT_DEVICE_ONENAND,
+	BOOT_DEVICE_NOR,
+	BOOT_DEVICE_UART,
+	BOOT_DEVICE_SPI,
+	BOOT_DEVICE_USB,
+	BOOT_DEVICE_SATA,
+	BOOT_DEVICE_I2C,
+	BOOT_DEVICE_BOARD,
+	BOOT_DEVICE_NONE
+};
+
+/* Linker symbols. */
+extern char __bss_start[];
+extern ulong __bss_end;
+
+#ifndef CONFIG_DM
+extern gd_t gdata;
+#endif
+
+#endif
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 mips: Add SPL header

Am 26.05.2016 um 20:43 schrieb Marek Vasut:

Quoted 37 lines

From: Paul Burton <[email protected]>

Add header with SPL boot mode and type definitions.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/include/asm/spl.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 arch/mips/include/asm/spl.h
arch/mips/include/asm/spl.h new file +19 -0
new file mode 100644
index 0000000..01baab6
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef	_ASM_SPL_H_
+#define	_ASM_SPL_H_
+
+enum {
+	BOOT_DEVICE_RAM,
+	BOOT_DEVICE_MMC1,
+	BOOT_DEVICE_MMC2,
+	BOOT_DEVICE_MMC2_2,
+	BOOT_DEVICE_NAND,
+	BOOT_DEVICE_ONENAND,
+	BOOT_DEVICE_NOR,
+	BOOT_DEVICE_UART,
+	BOOT_DEVICE_SPI,

arch/mips/include/asm/spl.h line 29

Quoted 10 lines
arch/mips/include/asm/spl.h new file +10 -0
+	BOOT_DEVICE_USB,
+	BOOT_DEVICE_SATA,
+	BOOT_DEVICE_I2C,
+	BOOT_DEVICE_BOARD,
+	BOOT_DEVICE_NONE
+};
+
+/* Linker symbols. */
+extern char __bss_start[];
+extern ulong __bss_end;

why not "extern char __bss_end[]" like on ARM?

Quoted 7 lines
arch/mips/include/asm/spl.h new file +6 -0
+
+#ifndef CONFIG_DM
+extern gd_t gdata;
+#endif
+
+#endif
Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160527/ef38f233/attachment.sig>
#2 lore raw

PATCH 1/1 mips: Add SPL header

Quoted 44 lines · Daniel Schwierzeck

Am 26.05.2016 um 20:43 schrieb Marek Vasut:

Quoted 41 lines

From: Paul Burton <[email protected]>

Add header with SPL boot mode and type definitions.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/include/asm/spl.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 arch/mips/include/asm/spl.h
arch/mips/include/asm/spl.h new file +23 -0
new file mode 100644
index 0000000..01baab6
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef	_ASM_SPL_H_
+#define	_ASM_SPL_H_
+
+enum {
+	BOOT_DEVICE_RAM,
+	BOOT_DEVICE_MMC1,
+	BOOT_DEVICE_MMC2,
+	BOOT_DEVICE_MMC2_2,
+	BOOT_DEVICE_NAND,
+	BOOT_DEVICE_ONENAND,
+	BOOT_DEVICE_NOR,
+	BOOT_DEVICE_UART,
+	BOOT_DEVICE_SPI,
+	BOOT_DEVICE_USB,
+	BOOT_DEVICE_SATA,
+	BOOT_DEVICE_I2C,
+	BOOT_DEVICE_BOARD,
Quoted 8 lines

arch/mips/include/asm/spl.h line 29

Quoted 6 lines
arch/mips/include/asm/spl.h new file +6 -0
+	BOOT_DEVICE_NONE
+};
+
+/* Linker symbols. */
+extern char __bss_start[];
+extern ulong __bss_end;

why not "extern char __bss_end[]" like on ARM?

Because mips defines this symbol as ulong __bss_end all over the place. I find it weird too and I suspect it's something to synchronize with other platforms.

Quoted 8 lines
Quoted 7 lines
arch/mips/include/asm/spl.h new file +6 -0
+
+#ifndef CONFIG_DM
+extern gd_t gdata;
+#endif
+
+#endif
Signature · 2 lines
Best regards,
Marek Vasut
#3 lore raw

PATCH 1/1 mips: Add SPL header

Am 27.05.2016 um 14:42 schrieb Marek Vasut:

Quoted 54 lines · Daniel Schwierzeck
Quoted 44 lines

Am 26.05.2016 um 20:43 schrieb Marek Vasut:

Quoted 41 lines

From: Paul Burton <[email protected]>

Add header with SPL boot mode and type definitions.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/include/asm/spl.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 arch/mips/include/asm/spl.h
arch/mips/include/asm/spl.h new file +23 -0
new file mode 100644
index 0000000..01baab6
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef	_ASM_SPL_H_
+#define	_ASM_SPL_H_
+
+enum {
+	BOOT_DEVICE_RAM,
+	BOOT_DEVICE_MMC1,
+	BOOT_DEVICE_MMC2,
+	BOOT_DEVICE_MMC2_2,
+	BOOT_DEVICE_NAND,
+	BOOT_DEVICE_ONENAND,
+	BOOT_DEVICE_NOR,
+	BOOT_DEVICE_UART,
+	BOOT_DEVICE_SPI,
+	BOOT_DEVICE_USB,
+	BOOT_DEVICE_SATA,
+	BOOT_DEVICE_I2C,
+	BOOT_DEVICE_BOARD,
Quoted 8 lines

arch/mips/include/asm/spl.h line 29

Quoted 6 lines
arch/mips/include/asm/spl.h new file +6 -0
+	BOOT_DEVICE_NONE
+};
+
+/* Linker symbols. */
+extern char __bss_start[];
+extern ulong __bss_end;

why not "extern char __bss_end[]" like on ARM?

Quoted 4 lines

Because mips defines this symbol as ulong __bss_end all over the place. I find it weird too and I suspect it's something to synchronize with other platforms.

hm, it's defined in include/asm-generic/sections.h. All archs but ARM are using ulong __bss_end.

But why isn't there a include/asm-generic/spl.h? The enum should be platform-independent and the linker symbols could be pulled from include/asm-generic/sections.h.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160527/848c6e77/attachment.sig>
#4 lore raw

PATCH 1/1 mips: Add SPL header

Quoted 62 lines · Daniel Schwierzeck

Am 27.05.2016 um 14:42 schrieb Marek Vasut:

Quoted 54 lines · Daniel Schwierzeck
Quoted 44 lines

Am 26.05.2016 um 20:43 schrieb Marek Vasut:

Quoted 41 lines

From: Paul Burton <[email protected]>

Add header with SPL boot mode and type definitions.

Cc Daniel Schwierzeck <[email protected]>
Cc Paul Burton <[email protected]>
---
 arch/mips/include/asm/spl.h | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 arch/mips/include/asm/spl.h
arch/mips/include/asm/spl.h new file +23 -0
new file mode 100644
index 0000000..01baab6
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2012
+ * Texas Instruments, <www.ti.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef	_ASM_SPL_H_
+#define	_ASM_SPL_H_
+
+enum {
+	BOOT_DEVICE_RAM,
+	BOOT_DEVICE_MMC1,
+	BOOT_DEVICE_MMC2,
+	BOOT_DEVICE_MMC2_2,
+	BOOT_DEVICE_NAND,
+	BOOT_DEVICE_ONENAND,
+	BOOT_DEVICE_NOR,
+	BOOT_DEVICE_UART,
+	BOOT_DEVICE_SPI,
+	BOOT_DEVICE_USB,
+	BOOT_DEVICE_SATA,
+	BOOT_DEVICE_I2C,
+	BOOT_DEVICE_BOARD,
Quoted 8 lines

arch/mips/include/asm/spl.h line 29

Quoted 6 lines
arch/mips/include/asm/spl.h new file +6 -0
+	BOOT_DEVICE_NONE
+};
+
+/* Linker symbols. */
+extern char __bss_start[];
+extern ulong __bss_end;

why not "extern char __bss_end[]" like on ARM?

Quoted 4 lines

Because mips defines this symbol as ulong __bss_end all over the place. I find it weird too and I suspect it's something to synchronize with other platforms.

Quoted 7 lines

hm, it's defined in include/asm-generic/sections.h. All archs but ARM are using ulong __bss_end.

But why isn't there a include/asm-generic/spl.h? The enum should be platform-independent and the linker symbols could be pulled from include/asm-generic/sections.h.

Yes, indeed, you have a point. I'll put unifying spl.h on the list just after libgcc issues.

Signature · 2 lines
Best regards,
Marek Vasut