Skip to contentSkip to conversation

at91: taurus: Fix the build warnings

PATCH New Heiko Schocher 2 participants 3 messages Apr 29, 2019 – May 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover at91: taurus: Fix the build warnings

Fix build Warnings:
===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info.
====================================================
CONFIG_OF_EMBED is enabled. This option should only be used for debugging purposes. Please use CONFIG_OF_SEPARATE for boards in mainline.
See doc/README.fdt-control for more info.
This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release.

travis build:
https://travis-ci.org/hsdenx/u-boot/builds/525899093

Changes in v3:
- rebase against master 6aebc0d11a10
"Revert "fs: btrfs: fix false negatives in ROOT_ITEM search"" and fix link errors, adapt defconfig (taurus and axm)
- drop patch "dtb_platdata.py: prevent define generation of alias" as already applied from Tom.

Changes in v2:
- add comment from Eugen
fix axm_defconfig
- sync defconfig
make savedefconfig with newest mainline
- set EXTRA_ENV_SETTINGS for axm board
- set BOARD_AXM or BOARD_TAURUS through Kconfig and remove entry in scripts/config_whitelist.txt
- removed patch "at91sam9260.dtsi: add some labels" as already applied from Eugen
- rebased series against u-boot-at91

Heiko Schocher (1):
at91: cleanup taurus port

 arch/arm/dts/at91sam9g20-taurus.dts | 158 ++++++++++++++--------------
 board/siemens/taurus/Kconfig        |  16 +++
 board/siemens/taurus/taurus.c       |  33 +-----
 configs/axm_defconfig               |  44 ++++++--
 configs/taurus_defconfig            |  39 +++++--
 include/configs/taurus.h            |  56 +++++++++-
 scripts/config_whitelist.txt        |   2 -
 7 files changed, 215 insertions(+), 133 deletions(-)
Signature · 1 line
2.17.2
#1 lore raw

PATCH v3 1/1 at91: cleanup taurus port

- at91sam9g20-taurus.dts: use labels
- cleanup taurus port to compile clean with
current mainline again. SPL has no serial
output anymore, so it fits into SRAM.

---

Changes in v3:
- rebase against master 6aebc0d11a10
"Revert "fs: btrfs: fix false negatives in ROOT_ITEM search"" and fix link errors, adapt defconfig (taurus and axm)
- drop patch "dtb_platdata.py: prevent define generation of alias" as already applied from Tom.

Changes in v2:
- add comment from Eugen
fix axm_defconfig
- sync defconfig
make savedefconfig with newest mainline
- set EXTRA_ENV_SETTINGS for axm board
- set BOARD_AXM or BOARD_TAURUS through Kconfig and remove entry in scripts/config_whitelist.txt
- removed patch "at91sam9260.dtsi: add some labels" as already applied from Eugen
- rebased series against u-boot-at91

 arch/arm/dts/at91sam9g20-taurus.dts | 158 ++++++++++++++--------------
 board/siemens/taurus/Kconfig        |  16 +++
 board/siemens/taurus/taurus.c       |  33 +-----
 configs/axm_defconfig               |  44 ++++++--
 configs/taurus_defconfig            |  39 +++++--
 include/configs/taurus.h            |  56 +++++++++-
 scripts/config_whitelist.txt        |   2 -
 7 files changed, 215 insertions(+), 133 deletions(-)
arch/arm/dts/at91sam9g20-taurus.dts +78 -80
index cee228bb8c..c00c5a8b8d 100644
@@ -15,7 +15,7 @@
 
 / {
 	model = "Siemens taurus";
-	compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9";
+	compatible = "atmel,at91sam9g20", "atmel,at91sam9";
 
 	chosen {
 		u-boot,dm-pre-reloc;
@@ -35,88 +35,86 @@
 			clock-frequency = <18432000>;
 		};
 	};
+};
 
-	ahb {
-		apb {
-			pinctrl at fffff400 {
-				board {
-					pinctrl_pck0_as_mck: pck0_as_mck {
-						atmel,pins =
-							<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;	/* PC1 periph B */
-					};
-
-				};
-			};
-
-			dbgu: serial at fffff200 {
-				u-boot,dm-pre-reloc;
-				status = "okay";
-			};
-
-			usart0: serial at fffb0000 {
-				pinctrl-0 =
-					<&pinctrl_usart0
-					 &pinctrl_usart0_rts
-					 &pinctrl_usart0_cts
-					 &pinctrl_usart0_dtr_dsr
-					 &pinctrl_usart0_dcd
-					 &pinctrl_usart0_ri>;
-				status = "okay";
-			};
-
-			usart1: serial at fffb4000 {
-				status = "okay";
-			};
-
-			macb0: ethernet at fffc4000 {
-				phy-mode = "rmii";
-				status = "okay";
-			};
-
-			usb1: gadget at fffa4000 {
-				atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
-				status = "okay";
-			};
-
-			ssc0: ssc at fffbc000 {
-				status = "okay";
-				pinctrl-0 = <&pinctrl_ssc0_tx>;
-			};
-
-			spi0: spi at fffc8000 {
-				cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
-				mtd_dataflash at 0 {
-					compatible = "atmel,at45", "atmel,dataflash";
-					spi-max-frequency = <50000000>;
-					reg = <1>;
-				};
-			};
-
-			rtc at fffffd20 {
-				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
-				status = "okay";
-			};
-
-			watchdog at fffffd40 {
-				timeout-sec = <15>;
-				status = "okay";
-			};
-
-			gpbr: syscon at fffffd50 {
-				status = "okay";
-			};
-		};
+&dbgu {
+	status = "okay";
+};
 
-		nand0: nand at 40000000 {
-			nand-bus-width = <8>;
-			nand-ecc-mode = "soft";
-			nand-on-flash-bbt;
-			status = "okay";
-		};
+&gpbr {
+	status = "okay";
+};
+
+&macb0 {
+	phy-mode = "rmii";
+	status = "okay";
+};
 
-		usb0: ohci at 00500000 {
-			num-ports = <2>;
-			status = "okay";
+&nand0 {
+	nand-bus-width = <8>;
+	nand-ecc-mode = "soft";
+	nand-on-flash-bbt;
+	status = "okay";
+};
+
+&pinctrl {
+	u-boot,dm-pre-reloc;
+	board {
+		pinctrl_pck0_as_mck: pck0_as_mck {
+			atmel,pins =
+			/* PC1 periph B */
+			<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
 		};
+
 	};
 };
+
+&rtc {
+	atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
+	status = "okay";
+};
+
+&spi0 {
+	cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
+	mtd_dataflash at 0 {
+		compatible = "atmel,at45", "atmel,dataflash";
+		spi-max-frequency = <50000000>;
+		reg = <1>;
+	};
+};
+
+&ssc0 {
+	status = "okay";
+	pinctrl-0 = <&pinctrl_ssc0_tx>;
+};
+
+&usart0 {
+	pinctrl-0 =
+		<&pinctrl_usart0
+		 &pinctrl_usart0_rts
+		 &pinctrl_usart0_cts
+		 &pinctrl_usart0_dtr_dsr
+		 &pinctrl_usart0_dcd
+		 &pinctrl_usart0_ri>;
+	status = "okay";
+};
+
+&usart1 {
+	status = "okay";
+};
+
+&usb0 {
+	num-ports = <2>;
+	status = "okay";
+};
+
+&usb1 {
+	atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
+	status = "okay";
+};
+
+&watchdog {
+	u-boot,dm-pre-reloc;
+	timeout-sec = <15>;
+	status = "okay";
+};
board/siemens/taurus/Kconfig +16 -0
index cf71e4ce56..28816bc1a0 100644
@@ -9,4 +9,20 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
 	default "taurus"
 
+choice
+	prompt "Board Type AXM/TAURUS"
+	default BOARD_AXM
+
+config BOARD_AXM
+	bool "AXM board type"
+	help
+	  Select this, if you want to build for AXM board.
+
+config BOARD_TAURUS
+	bool "TAURUS board type"
+	help
+	  Select this, if you want to build for TAURUS board.
+
+endchoice
+
 endif
board/siemens/taurus/taurus.c +2 -31
index 8396ce502b..6ea97eb4e8 100644
@@ -197,11 +197,11 @@ void mem_init(void)
 
 	/* Mirrors at A15 on ATMEL G20 SDRAM Controller with 64MB*/
 	if (ram_size == 0x800) {
-		printf("\n\r 64MB");
+		printf("\n\r 64MB\n");
 		sdramc_configure(AT91_SDRAMC_NC_9);
 	} else {
 		/* Size already initialized */
-		printf("\n\r 128MB");
+		printf("\n\r 128MB\n");
 	}
 }
 #endif
@@ -282,24 +282,6 @@ int board_early_init_f(void)
 	return 0;
 }
 
-/* FIXME gpio code here need to handle through DM_GPIO */
-#ifndef CONFIG_DM_SPI
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-	return bus == 0 && cs == 0;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-	at91_set_gpio_value(TAURUS_SPI_CS_PIN, 0);
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-	at91_set_gpio_value(TAURUS_SPI_CS_PIN, 1);
-}
-#endif
-
 #ifdef CONFIG_USB_GADGET_AT91
 #include <linux/usb/at91_udc.h>
 
@@ -347,17 +329,6 @@ int dram_init(void)
 	return 0;
 }
 
-#ifndef CONFIG_DM_ETH
-int board_eth_init(bd_t *bis)
-{
-	int rc = 0;
-#ifdef CONFIG_MACB
-	rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
-#endif
-	return rc;
-}
-#endif
-
 #if !defined(CONFIG_SPL_BUILD)
 #if defined(CONFIG_BOARD_AXM)
 /*
configs/axm_defconfig +34 -8

80 lines not on this page · raw message

CONFIG_USE_TINY_PRINTF=y
+CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set

configs/taurus_defconfig +32 -7
index d69f4895ef..02a89592d7 100644
@@ -1,36 +1,48 @@
 CONFIG_ARM=y
-CONFIG_SPL_SYS_THUMB_BUILD=y
+CONFIG_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
 CONFIG_SPL_LDSCRIPT="arch/$(ARCH)/cpu/u-boot-spl.lds"
 CONFIG_SYS_TEXT_BASE=0x21000000
 CONFIG_TARGET_TAURUS=y
+CONFIG_BOARD_TAURUS=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x1000
-CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x1000
+CONFIG_NR_DRAM_BANKS=1
 CONFIG_SPL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=18432000
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
-CONFIG_NR_DRAM_BANKS=1
-CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2067,BOARD_TAURUS"
+CONFIG_DEBUG_UART=y
+CONFIG_TPL_SYS_MALLOC_F_LEN=0x1000
+CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2067"
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) root=/dev/mtdblock7 rw rootfstype=jffs2"
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="nand read 0x22000000 0x200000 0x300000; bootm"
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_BOARD_EARLY_INIT_F=y
+# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+# CONFIG_TPL_BANNER_PRINT is not set
+CONFIG_SPL_CRC32_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
-CONFIG_SPL_SPI_LOAD=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot> "
+CONFIG_SYS_XTRACE="n"
 # CONFIG_CMD_BDI is not set
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMI is not set
 CONFIG_CMD_DFU=y
 # CONFIG_CMD_LOADS is not set
 CONFIG_CMD_NAND=y
+# CONFIG_CMD_PINMUX is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
 CONFIG_CMD_USB=y
@@ -41,19 +53,30 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_MTDPARTS=y
 # CONFIG_DOS_PARTITION is not set
 CONFIG_OF_CONTROL=y
-CONFIG_OF_EMBED=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9g20-taurus"
+CONFIG_SPL_OF_PLATDATA=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_SPL_DM=y
+CONFIG_BLK=y
 CONFIG_CLK=y
 CONFIG_CLK_AT91=y
 CONFIG_DFU_NAND=y
 # CONFIG_MMC is not set
 CONFIG_NAND=y
 CONFIG_NAND_ATMEL=y
+CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_SPECIFY_CONSOLE_INDEX=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_ATMEL_USART=y
 CONFIG_USB=y
+CONFIG_DM_USB=y
+# CONFIG_SPL_DM_USB is not set
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Siemens AG"
@@ -63,3 +86,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_WDT=y
 CONFIG_WDT_AT91=y
 CONFIG_USE_TINY_PRINTF=y
+CONFIG_HEXDUMP=y
+# CONFIG_EFI_LOADER is not set
include/configs/taurus.h +51 -5

84 lines not on this page · raw message

scripts/config_whitelist.txt +0 -2
index 3e6bdf8161..93ab0ac51d 100644
@@ -118,7 +118,6 @@ CONFIG_BMP_32BPP
 CONFIG_BOARDDIR
 CONFIG_BOARDNAME
 CONFIG_BOARDNAME_LOCAL
-CONFIG_BOARD_AXM
 CONFIG_BOARD_COMMON
 CONFIG_BOARD_ECC_SUPPORT
 CONFIG_BOARD_IS_OPENRD_BASE
@@ -128,7 +127,6 @@ CONFIG_BOARD_NAME
 CONFIG_BOARD_POSTCLK_INIT
 CONFIG_BOARD_REVISION_TAG
 CONFIG_BOARD_SIZE_LIMIT
-CONFIG_BOARD_TAURUS
 CONFIG_BOOGER
 CONFIG_BOOTBLOCK
 CONFIG_BOOTFILE
Signature · 1 line
2.17.2
#2 lore raw

PATCH v3 1/1 at91: cleanup taurus port

Quoted 6 lines · Heiko Schocher

- at91sam9g20-taurus.dts: use labels
- cleanup taurus port to compile clean with
current mainline again. SPL has no serial
output anymore, so it fits into SRAM.

Applied to u-boot/master, thanks!

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/20190503/13737e95/attachment.sig>