* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
@ 2013-09-09 14:22 Jiri Prchal
2013-09-09 15:34 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Prchal @ 2013-09-09 14:22 UTC (permalink / raw)
To: u-boot
This patch adds support for our companies board CDU9G25 with Atmel AT91SAM9G25, 128MB DDR2, 256MB NAND.
v.2
Fixed static IP and MAC addr cofiguration by random MAC and DHCP.
Added entry to MAINTAINERS.
Fixed line lenght, trailing spaces and other cosmetics.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
MAINTAINERS | 3 +
board/cdu9g25/Makefile | 48 +++++++++++
board/cdu9g25/cdu9g25.c | 134 +++++++++++++++++++++++++++++
board/cdu9g25/config.mk | 1 +
boards.cfg | 1 +
include/configs/cdu9g25.h | 204 +++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 391 insertions(+)
create mode 100644 board/cdu9g25/Makefile
create mode 100644 board/cdu9g25/cdu9g25.c
create mode 100644 board/cdu9g25/config.mk
create mode 100644 include/configs/cdu9g25.h
diff --git a/MAINTAINERS b/MAINTAINERS
index bd0f3a0..444500b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -939,6 +939,9 @@ Bo Shen <voice.shen@atmel.com>
at91sam9x5ek ARM926EJS (AT91SAM9G15,G25,G35,X25,X35 SoC)
sama5d3xek ARMV7 (SAMA5D31, D33, D34, D35 SoC)
+Jiri Prchal <jiri.prchal@aksignal.cz>
+ cdu9g25 ARM926EJS (AT91SAM9G25 SoC)
+
Rajeshwari Shinde <rajeshwari.s@samsung.com>
snow ARM ARMV7 (EXYNOS5250 SoC)
diff --git a/board/cdu9g25/Makefile b/board/cdu9g25/Makefile
new file mode 100644
index 0000000..11e2d4f
--- /dev/null
+++ b/board/cdu9g25/Makefile
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian@popies.net>
+# Lead Tech Design <www.leadtechdesign.com>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).o
+
+COBJS-y += cdu9g25.o
+
+SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
+SOBJS := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+ $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/cdu9g25/cdu9g25.c b/board/cdu9g25/cdu9g25.c
new file mode 100644
index 0000000..e9cdbc3
--- /dev/null
+++ b/board/cdu9g25/cdu9g25.c
@@ -0,0 +1,134 @@
+/*
+ * (C) Copyright 2013
+ * Jiri Prchal <jiri.prchal@aksignal.cz>
+ * AK signal <www.aksignal.cz>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/at91sam9x5_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_common.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/clk.h>
+#include <atmel_hlcdc.h>
+#include <atmel_mci.h>
+
+#ifdef CONFIG_MACB
+#include <net.h>
+#endif
+
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+#ifdef CONFIG_CMD_NAND
+static void cdu9g25_nand_hw_init(void)
+{
+ struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC;
+ struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX;
+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+ unsigned long csa;
+
+ /* Enable CS3 */
+ csa = readl(&matrix->ebicsa);
+ csa |= AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA;
+ writel(csa, &matrix->ebicsa);
+
+ /* Configure SMC CS3 for NAND/SmartMedia */
+ writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
+ AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
+ &smc->cs[3].setup);
+ writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(5) |
+ AT91_SMC_PULSE_NRD(4) | AT91_SMC_PULSE_NCS_RD(6),
+ &smc->cs[3].pulse);
+ writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(6),
+ &smc->cs[3].cycle);
+ writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
+ AT91_SMC_MODE_EXNW_DISABLE |
+ AT91_SMC_MODE_DBW_8 |
+ AT91_SMC_MODE_TDF_CYCLE(1),
+ &smc->cs[3].mode);
+
+ writel(1 << ATMEL_ID_PIOCD, &pmc->pcer);
+
+ /* Configure RDY/BSY */
+ at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1);
+
+ /* Enable NandFlash */
+ at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
+
+ at91_set_a_periph(AT91_PIO_PORTD, 0, 1); /* NAND OE */
+ at91_set_a_periph(AT91_PIO_PORTD, 1, 1); /* NAND WE */
+ at91_set_a_periph(AT91_PIO_PORTD, 2, 1); /* NAND ALE */
+ at91_set_a_periph(AT91_PIO_PORTD, 3, 1); /* NAND CLE */
+}
+#endif
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+ uchar enetaddr[6];
+
+ eth_random_enetaddr(enetaddr);
+ eth_setenv_enetaddr("ethaddr", enetaddr);
+
+#ifdef CONFIG_MACB
+ rc = macb_eth_initialize(0, (void *)ATMEL_BASE_EMAC0, 0x00);
+#endif
+ return rc;
+}
+
+static void cdu9g25_led_init(void)
+{
+ at91_set_gpio_output(CONFIG_LED_B, 1);
+ at91_set_gpio_value(CONFIG_LED_B, 0);
+}
+
+int board_early_init_f(void)
+{
+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+ at91_seriald_hw_init();
+ return 0;
+}
+
+int board_init(void)
+{
+ /* arch number of AT91SAM9X5EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9X5EK;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+
+ cdu9g25_led_init();
+
+ cdu9g25_nand_hw_init();
+
+ at91_macb_hw_init();
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+ CONFIG_SYS_SDRAM_SIZE);
+ return 0;
+}
+
+#ifdef CONFIG_RESET_PHY_R
+void reset_phy(void)
+{
+}
+#endif
+
diff --git a/board/cdu9g25/config.mk b/board/cdu9g25/config.mk
new file mode 100644
index 0000000..528ed4a
--- /dev/null
+++ b/board/cdu9g25/config.mk
@@ -0,0 +1 @@
+CONFIG_SYS_TEXT_BASE = 0x27f00000
diff --git a/boards.cfg b/boards.cfg
index be810c7..572d20d 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -77,6 +77,7 @@ integratorcp_cm926ejs arm arm926ejs integrator armltd
aspenite arm arm926ejs - Marvell armada100
gplugd arm arm926ejs - Marvell armada100
afeb9260 arm arm926ejs - - at91
+cdu9g25 arm arm926ejs - - at91
at91sam9260ek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_DATAFLASH_CS0
at91sam9260ek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_DATAFLASH_CS1
at91sam9260ek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9260,SYS_USE_NANDFLASH
diff --git a/include/configs/cdu9g25.h b/include/configs/cdu9g25.h
new file mode 100644
index 0000000..9324de5
--- /dev/null
+++ b/include/configs/cdu9g25.h
@@ -0,0 +1,204 @@
+/*
+ * (C) Copyright 2013
+ * Jiri Prchal <jiri.prchal@aksignal.cz>
+ * AK signal <www.aksignal.cz>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define CONFIG_AT91SAM9X5
+#include <asm/hardware.h>
+
+/* ARM asynchronous clock */
+#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */
+#define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* main clock xtal */
+#define CONFIG_SYS_HZ 1000
+
+/* Define actual evaluation board type from used processor type */
+#define CONFIG_CDU9G25
+#define CONFIG_AT91FAMILY
+
+/* Misc CPU related */
+#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_INITRD_TAG
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_DISPLAY_CPUINFO
+
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_OF_LIBFDT
+
+/* general purpose I/O */
+#define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
+#define CONFIG_AT91_GPIO
+#define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
+
+/* LEDs */
+#define CONFIG_LED_R AT91_PIN_PB18
+#define CONFIG_LED_G AT91_PIN_PB16
+#define CONFIG_LED_Y AT91_PIN_PB14
+#define CONFIG_LED_B AT91_PIN_PB12
+
+/* serial console */
+#define CONFIG_ATMEL_USART
+#define CONFIG_USART_BASE ATMEL_BASE_DBGU
+#define CONFIG_USART_ID ATMEL_ID_SYS
+#define CONFIG_BAUDRATE 115200
+#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
+
+#define CONFIG_BOOTDELAY 3
+
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_AT91SAM9_WATCHDOG
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_LOADS
+
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_MMC
+#define CONFIG_CMD_FAT
+
+/*
+ * SDRAM: 1 bank, min 32, max 128 MB
+ * Initialized before u-boot gets started.
+ */
+#define CONFIG_NR_DRAM_BANKS 1
+#define CONFIG_SYS_SDRAM_BASE 0x20000000 /* ATMEL_BASE_CS1 */
+#define CONFIG_SYS_SDRAM_SIZE 0x08000000
+
+/*
+ * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,
+ * leaving the correct space for initial global data structure above
+ * that address while providing maximum stack area below.
+ */
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 4 * 1024\
+ - GENERATED_GBL_DATA_SIZE)
+
+/* no NOR flash */
+#define CONFIG_SYS_NO_FLASH
+
+/* NAND flash */
+#define CONFIG_NAND_ATMEL
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BASE 0x40000000
+#define CONFIG_SYS_NAND_DBW_8 1
+#define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
+#define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
+#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4
+#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5
+
+/* PMECC & PMERRLOC */
+#define CONFIG_ATMEL_NAND_HWECC 1
+#define CONFIG_ATMEL_NAND_HW_PMECC 1
+#define CONFIG_PMECC_CAP 8
+#define CONFIG_PMECC_SECTOR_SIZE 512
+#define CONFIG_PMECC_INDEX_TABLE_OFFSET 0x8000
+
+#define CONFIG_MTD_DEVICE
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_RBTREE
+#define CONFIG_LZO
+#define CONFIG_CMD_UBI
+#define CONFIG_CMD_UBIFS
+#define CONFIG_CMD_NAND_TRIMFFS
+#define MTDIDS_DEFAULT "nand0=nand"
+#define MTDPARTS_DEFAULT "mtdparts=nand:256k(bootstrap),"\
+ "768k(uboot),256k(ubootenv),"\
+ "4864k(kernel),"\
+ "-(root)"
+
+/* MMC */
+#ifdef CONFIG_CMD_MMC
+#define CONFIG_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_GENERIC_ATMEL_MCI
+#endif
+
+/* FAT */
+#ifdef CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
+/* Ethernet */
+#define CONFIG_MACB
+#define CONFIG_RMII
+#define CONFIG_NET_RETRY_COUNT 20
+#define CONFIG_MACB_SEARCH_PHY
+#define CONFIG_RANDOM_MACADDR
+
+/* USB */
+#ifdef CONFIG_CMD_USB
+#ifdef CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_ATMEL
+#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
+#else
+#define CONFIG_USB_OHCI_NEW
+#define CONFIG_SYS_USB_OHCI_CPU_INIT
+#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
+#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9x5"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 3
+#endif
+#define CONFIG_USB_ATMEL
+#define CONFIG_USB_STORAGE
+#endif
+
+#define CONFIG_SYS_LOAD_ADDR 0x21000000 /* load address */
+
+#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
+#define CONFIG_SYS_MEMTEST_END CONFIG_SYS_TEXT_BASE
+
+/* CONFIG_SYS_USE_NANDFLASH */
+/* bootstrap + u-boot + env + linux in nandflash */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET 0x100000
+#define CONFIG_ENV_SIZE 0x20000 /* 2 sectors = 256kB */
+#define CONFIG_BOOTCOMMAND "nand read 21000000 kernel; bootm"
+#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
+ "root=ubi0:root rootfstype=ubifs rw"\
+ "g_ether.dev_addr=02:04:25:aa:55:5e"\
+ "g_ether.host_addr=02:04:25:aa:55:5f"
+#define CONFIG_SERVERIP 10.0.1.1
+#define CONFIG_BOOTFILE "kernel_cdu9g25"
+#define CONFIG_PREBOOT "mtdparts default" /* for partitions */
+
+#define CONFIG_SYS_PROMPT "U-Boot> "
+#define CONFIG_SYS_CBSIZE 256
+#define CONFIG_SYS_MAXARGS 16
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT)\
+ + 16)
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_HUSH_PARSER
+
+/*
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN (512 * 1024 + 0x1000)
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
2013-09-09 14:22 [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board Jiri Prchal
@ 2013-09-09 15:34 ` Wolfgang Denk
2013-09-10 7:58 ` Jiří Prchal
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2013-09-09 15:34 UTC (permalink / raw)
To: u-boot
Dear Jiri Prchal,
In message <1378736524-30870-1-git-send-email-jiri.prchal@aksignal.cz> you wrote:
> This patch adds support for our companies board CDU9G25 with Atmel AT91SAM9G25, 128MB DDR2, 256MB NAND.
Please keep the line length of the commit message < 70 characters.
> v.2
> Fixed static IP and MAC addr cofiguration by random MAC and DHCP.
> Added entry to MAINTAINERS.
> Fixed line lenght, trailing spaces and other cosmetics.
This comment does not belong into the commit message - please move it
to the comment section, i. e. below the "---" line.
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -939,6 +939,9 @@ Bo Shen <voice.shen@atmel.com>
> at91sam9x5ek ARM926EJS (AT91SAM9G15,G25,G35,X25,X35 SoC)
> sama5d3xek ARMV7 (SAMA5D31, D33, D34, D35 SoC)
>
> +Jiri Prchal <jiri.prchal@aksignal.cz>
> + cdu9g25 ARM926EJS (AT91SAM9G25 SoC)
> +
> Rajeshwari Shinde <rajeshwari.s@samsung.com>
Please keep the list sorted.
> +#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
> + "root=ubi0:root rootfstype=ubifs rw"\
> + "g_ether.dev_addr=02:04:25:aa:55:5e"\
> + "g_ether.host_addr=02:04:25:aa:55:5f"
> +#define CONFIG_SERVERIP 10.0.1.1
We do not allow static network configuration in board config files!
Please get rid of these MAC and IP addresses here.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The project was large enough and management communication poor enough
to prompt many members of the team to see themselves as contestants
making brownie points, rather than as builders making programming
products. Each suboptimized his piece to meet his targets; few
stopped to think about the total effect on the customer.
- Fred Brooks, "The Mythical Man Month"
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
2013-09-09 15:34 ` Wolfgang Denk
@ 2013-09-10 7:58 ` Jiří Prchal
2013-09-10 9:26 ` Andreas Bießmann
2013-09-10 22:52 ` Wolfgang Denk
0 siblings, 2 replies; 6+ messages in thread
From: Jiří Prchal @ 2013-09-10 7:58 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
Dne 9.9.2013 17:34, Wolfgang Denk napsal(a):
> Dear Jiri Prchal,
>
> In message <1378736524-30870-1-git-send-email-jiri.prchal@aksignal.cz> you wrote:
>> This patch adds support for our companies board CDU9G25 with Atmel AT91SAM9G25, 128MB DDR2, 256MB NAND.
>
> Please keep the line length of the commit message < 70 characters.
>
>> v.2
>> Fixed static IP and MAC addr cofiguration by random MAC and DHCP.
>> Added entry to MAINTAINERS.
>> Fixed line lenght, trailing spaces and other cosmetics.
>
> This comment does not belong into the commit message - please move it
> to the comment section, i. e. below the "---" line.
I'm not sure if I even should number versions of this patch?
>
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -939,6 +939,9 @@ Bo Shen <voice.shen@atmel.com>
>> at91sam9x5ek ARM926EJS (AT91SAM9G15,G25,G35,X25,X35 SoC)
>> sama5d3xek ARMV7 (SAMA5D31, D33, D34, D35 SoC)
>>
>> +Jiri Prchal <jiri.prchal@aksignal.cz>
>> + cdu9g25 ARM926EJS (AT91SAM9G25 SoC)
>> +
>> Rajeshwari Shinde <rajeshwari.s@samsung.com>
>
> Please keep the list sorted.
>
>
>> +#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
>> + "root=ubi0:root rootfstype=ubifs rw"\
>> + "g_ether.dev_addr=02:04:25:aa:55:5e"\
>> + "g_ether.host_addr=02:04:25:aa:55:5f"
This is here for linux connection with PC via USB ethernet gadget. I'd like static IP for this connection but if there
is random MAC addr I must set up IP again and again. Is another solution for this?
>> +#define CONFIG_SERVERIP 10.0.1.1
Please help me with this:
I'd like to have board prepared for download images from TFTP server on address 10.0.1.1.
Is there other way how to do it? Even with MAC addr, I solved it with random MAC, is that OK? I keep in mind that would
be nice read unique serial number from F-RAM (is on boart too) on SPI and use it as MAC addr. Will be this way better?
>
> We do not allow static network configuration in board config files!
> Please get rid of these MAC and IP addresses here.
>
> Best regards,
>
> Wolfgang Denk
>
With many thanks,
Jiri
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
2013-09-10 7:58 ` Jiří Prchal
@ 2013-09-10 9:26 ` Andreas Bießmann
2013-09-10 22:52 ` Wolfgang Denk
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Bießmann @ 2013-09-10 9:26 UTC (permalink / raw)
To: u-boot
Dear Ji?? Prchal,
On 09/10/2013 09:58 AM, Ji?? Prchal wrote:
> Dne 9.9.2013 17:34, Wolfgang Denk napsal(a):
>> In message <1378736524-30870-1-git-send-email-jiri.prchal@aksignal.cz>
>> you wrote:
<snip>
>>> +#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
>>> + "root=ubi0:root rootfstype=ubifs rw"\
>>> + "g_ether.dev_addr=02:04:25:aa:55:5e"\
>>> + "g_ether.host_addr=02:04:25:aa:55:5f"
> This is here for linux connection with PC via USB ethernet gadget. I'd
> like static IP for this connection but if there is random MAC addr I
> must set up IP again and again. Is another solution for this?
I have this in my /etc/network/interfaces on host:
---8<---
allow-hotplug usb0
iface usb0 inet static
address 192.168.50.2
netmask 255.255.255.0
broadcast 192.168.50.255
network 192.168.50.0
--->8---
And something other, hard coded in in embedded firmware config. This
works like a charm with changing MAC for usb gadget.
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
2013-09-10 7:58 ` Jiří Prchal
2013-09-10 9:26 ` Andreas Bießmann
@ 2013-09-10 22:52 ` Wolfgang Denk
2013-09-11 7:39 ` Jiří Prchal
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2013-09-10 22:52 UTC (permalink / raw)
To: u-boot
Dear Ji?? Prchal,
In message <522ED13F.90303@aksignal.cz> you wrote:
>
> > This comment does not belong into the commit message - please move it
> > to the comment section, i. e. below the "---" line.
> I'm not sure if I even should number versions of this patch?
But this is mandatory, see
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
> >> +#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
> >> + "root=ubi0:root rootfstype=ubifs rw"\
> >> + "g_ether.dev_addr=02:04:25:aa:55:5e"\
> >> + "g_ether.host_addr=02:04:25:aa:55:5f"
> This is here for linux connection with PC via USB ethernet gadget. I'd like static IP for this connection but if there
> is random MAC addr I must set up IP again and again. Is another solution for this?
>
> >> +#define CONFIG_SERVERIP 10.0.1.1
> Please help me with this:
> I'd like to have board prepared for download images from TFTP server on address 10.0.1.1.
We do not allow static networkj configuations in the U-Boot binary
image. what works for you, may be bad for others. It's especially
bad when all boards using the same image come p using the same MAC (or
IP) addresses.
> Is there other way how to do it? Even with MAC addr, I solved it with random MAC, is that OK? I keep in mind that would
No. The image must not contain any static network addresses.
> be nice read unique serial number from F-RAM (is on boart too) on SPI and use it as MAC addr. Will be this way better?
There are many ways how to initialize the MAC address on the system
during production or by reading any form of product information from
EEPROM or F-RAM or whatever you have on your board. This is OK, as
long as boards get assigned correct (i. e. different) addresses.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
HANDLE WITH EXTREME CARE: This Product Contains Minute Electrically
Charged Particles Moving at Velocities in Excess of Five Hundred
Million Miles Per Hour.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board
2013-09-10 22:52 ` Wolfgang Denk
@ 2013-09-11 7:39 ` Jiří Prchal
0 siblings, 0 replies; 6+ messages in thread
From: Jiří Prchal @ 2013-09-11 7:39 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
Dne 11.9.2013 00:52, Wolfgang Denk napsal(a):
> Dear Ji?? Prchal,
>
> In message <522ED13F.90303@aksignal.cz> you wrote:
>>
>>> This comment does not belong into the commit message - please move it
>>> to the comment section, i. e. below the "---" line.
>> I'm not sure if I even should number versions of this patch?
>
> But this is mandatory, see
> http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
>
>>>> +#define CONFIG_BOOTARGS "console=ttyS0,115200 ubi.mtd=root"\
>>>> + "root=ubi0:root rootfstype=ubifs rw"\
>>>> + "g_ether.dev_addr=02:04:25:aa:55:5e"\
>>>> + "g_ether.host_addr=02:04:25:aa:55:5f"
>> This is here for linux connection with PC via USB ethernet gadget. I'd like static IP for this connection but if there
>> is random MAC addr I must set up IP again and again. Is another solution for this?
I will remove this.
>>
>>>> +#define CONFIG_SERVERIP 10.0.1.1
>> Please help me with this:
>> I'd like to have board prepared for download images from TFTP server on address 10.0.1.1.
>
> We do not allow static networkj configuations in the U-Boot binary
> image. what works for you, may be bad for others. It's especially
> bad when all boards using the same image come p using the same MAC (or
> IP) addresses.
I thought that this is default configuration of serverip. Does not
affect network communication. And user can change it any time.
>
>> Is there other way how to do it? Even with MAC addr, I solved it with random MAC, is that OK? I keep in mind that would
>
> No. The image must not contain any static network addresses.
>
>> be nice read unique serial number from F-RAM (is on boart too) on SPI and use it as MAC addr. Will be this way better?
>
> There are many ways how to initialize the MAC address on the system
> during production or by reading any form of product information from
> EEPROM or F-RAM or whatever you have on your board. This is OK, as
> long as boards get assigned correct (i. e. different) addresses.
I'll try use F-RAM for MAC, but it will take some time.
Can I post patch now with random MAC and sometime in the future post
another patch with F-RAM?
Thanks,
Jiri
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-11 7:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09 14:22 [U-Boot] [PATCH] Subject: [PATCH v.2] at91: add support for CDU9G25 board Jiri Prchal
2013-09-09 15:34 ` Wolfgang Denk
2013-09-10 7:58 ` Jiří Prchal
2013-09-10 9:26 ` Andreas Bießmann
2013-09-10 22:52 ` Wolfgang Denk
2013-09-11 7:39 ` Jiří Prchal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox