Skip to contentSkip to conversation

at91: Add esd gmbh MEESC board support

PATCH New Daniel Gorsulowski 2 participants 10 messages Jun 23, 2009 – Jun 30, 2009

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

PATCH 1/1 at91: Add esd gmbh MEESC board support

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---

Jean-Christophe: This patch requires an up-to-date mach-types.h, please sync it.

 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 Makefile                    |    3 +
 board/esd/meesc/Makefile    |   55 +++++++++++
 board/esd/meesc/config.mk   |    1 +
 board/esd/meesc/meesc.c     |  211 +++++++++++++++++++++++++++++++++++++++++++
 board/esd/meesc/partition.c |   37 ++++++++
 include/configs/meesc.h     |  185 +++++++++++++++++++++++++++++++++++++
 8 files changed, 497 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 board/esd/meesc/partition.c
 create mode 100644 include/configs/meesc.h
MAINTAINERS +4 -0
index 9379c7e..449443a 100644
@@ -532,6 +532,10 @@ Peter Figuli <[email protected]>
 
 	wepep250	xscale
 
+Daniel Gorsulowski <[email protected]>
+
+	meesc		ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gr?ger <[email protected]>
 
 	impa7		ARM720T (EP7211)
MAKEALL +1 -0
index f4599d6..eb7b0d7 100755
@@ -587,6 +587,7 @@ LIST_at91="		\
 	cmc_pu2		\
 	csb637		\
 	kb9202		\
+	meesc		\
 	mp2usb		\
 	m501sk		\
 	pm9263		\
Makefile +3 -0
index 46871d0..a5db70d 100644
@@ -2787,6 +2787,9 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 pm9263_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
 
board/esd/meesc/Makefile new file +55 -0

55 lines not on this page · raw message

board/esd/meesc/config.mk new file +1 -0
new file mode 100644
index 0000000..9ce161e
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f00000
board/esd/meesc/meesc.c new file +211 -0

211 lines not on this page · raw message

board/esd/meesc/partition.c new file +37 -0
new file mode 100644
index 0000000..df0e1db
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <[email protected]>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
+	{CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+};
+
+/* define the area offsets */
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+};
include/configs/meesc.h new file +185 -0

185 lines not on this page · raw message

Signature · 1 line
1.5.3
#1 lore raw

PATCH 1/1 at91: Add esd gmbh MEESC board support

Quoted 36 lines · Daniel Gorsulowski

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---

Jean-Christophe: This patch requires an up-to-date mach-types.h, please sync it.

board/esd/meesc/meesc.c new file +21 -0
new file mode 100644
index 0000000..557a51c
@@ -0,0 +1,211 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <[email protected]>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <[email protected]>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
+ * 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.

board/esd/meesc/meesc.c line 31

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+ *
+ * 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 <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91sam9263_matrix.h>

please use <asm/arch/at91sam9_matrix.h>

Quoted 5 lines
board/esd/meesc/meesc.c new file +5 -0
+#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/clk.h>

board/esd/meesc/meesc.c line 46

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+#include <asm/arch/gpio.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/io.h>
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */

it will be better to only read it only and store it in a static

board/esd/meesc/meesc.c line 50

Quoted 3 lines
board/esd/meesc/meesc.c new file +3 -0
+int get_hw_rev(void)
+{
+	int rev = at91_get_gpio_value(AT91_PIN_PB19);

please add an empty line

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+	rev |= at91_get_gpio_value(AT91_PIN_PB20) << 1;
+	rev |= at91_get_gpio_value(AT91_PIN_PB21) << 2;
+	rev |= at91_get_gpio_value(AT91_PIN_PB22) << 3;
+
+	if (rev == 15)
+		rev = 0;
+
+	return rev;
+}
+

<snip>

Quoted 19 lines
board/esd/meesc/meesc.c new file +19 -0
+
+int checkboard(void)
+{
+	char str[32];
+	char buf[32];
+
+	puts("Board: esd CAN-EtherCAT Gateway");
+	if (getenv_r("serial#", str, sizeof(str)) > 0) {
+		puts(", serial# ");
+		puts(str);
+	}
+	printf("\nHardware-revision: 1.%d\n", get_hw_rev());
+	printf("Crystal frequency:\t%8s MHz\n",
+					strmhz(buf, get_main_clk_rate()));
+	printf("CPU clock:\t\t%8s MHz\n",
+					strmhz(buf, get_cpu_clk_rate()));
+#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO
+	printf("Master clock:\t\t%8s MHz\n",
+					strmhz(buf, get_mck_clk_rate()));

board/esd/meesc/meesc.c line 178

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+	printf("PLL A clock:\t\t%8s MHz\n",
+					strmhz(buf, get_plla_clk_rate()));
+	printf("PLL B Reg.:\t\t0x%08X\n",
+					at91_sys_read(AT91_CKGR_PLLBR));
+	printf("PLL B clock:\t\t%8s MHz\n",
+					strmhz(buf, get_pllb_clk_rate()));
+#endif
+	printf("Mach-type: %lu\n", gd->bd->bi_arch_number);
+	return 0;
+}

please use cpu_info when it's possible to avoid copy & paste

board/esd/meesc/meesc.c line 183

Quoted 4 lines
board/esd/meesc/meesc.c new file +4 -0
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();

no need

Quoted 16 lines
board/esd/meesc/meesc.c new file +16 -0
+
+	/* Peripheral Clock Enable Register */
+	at91_sys_write(AT91_PMC_PCER,	1 << AT91SAM9263_ID_PIOA |
+					1 << AT91SAM9263_ID_PIOB |
+					1 << AT91SAM9263_ID_PIOCDE |
+					1 << AT91SAM9263_ID_CAN);
+
+	/* arch number of MEESC-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_MEESC;
+
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+	at91_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+	meesc_nand_hw_init();

board/esd/meesc/meesc.c line 209

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+#endif
+	meesc_ethercat_hw_init();
+#ifdef CONFIG_HAS_DATAFLASH
+	at91_spi0_hw_init(1 << 0);
+#endif
+#ifdef CONFIG_MACB
+	meesc_macb_hw_init();
+#endif
+	at91_set_A_periph(AT91_PIN_PA13, 0);	/* CAN_TX */
+	at91_set_A_periph(AT91_PIN_PA14, 1);	/* CAN_RX */

please add a at91_can_hw_init function

board/esd/meesc/meesc.c

Quoted 2 lines
board/esd/meesc/meesc.c new file +2 -0
+	return 0;
+}

<snio>

board/esd/meesc/meesc.c

Quoted 6 lines
board/esd/meesc/meesc.c new file +6 -0
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* Common stuff */
+#define AT91_CPU_NAME			"AT91SAM9263"

please remove

board/esd/meesc/meesc.c

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+#define CONFIG_SYS_HZ			1000	/* decrementer freq */
+#define CONFIG_MEESC			1	/* Board is esd MEESC */
+#define CONFIG_ARM926EJS		1	/* This is an ARM926EJS Core */
+#define CONFIG_AT91SAM9263		1	/* It's an AT91SAM9263 SoC */
+#define CONFIG_ENV_OVERWRITE		1	/* necessary on prototypes */
+#define CONFIG_DISPLAY_BOARDINFO	1
+#define CONFIG_PREBOOT				/* enable preboot variable */

why which value?

board/esd/meesc/meesc.c

Quoted 5 lines
board/esd/meesc/meesc.c new file +5 -0
+#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS	1
+#define CONFIG_INITRD_TAG		1
+#undef CONFIG_USE_IRQ				/* don't need IRQ/FIQ stuff */
+

Best Regards,
J.

#2 lore raw

PATCH 1/1 at91: Add esd gmbh MEESC board support

Quoted 40 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 39 lines · Daniel Gorsulowski

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---

Jean-Christophe: This patch requires an up-to-date mach-types.h, please sync it.

board/esd/meesc/meesc.c new file +24 -0
new file mode 100644
index 0000000..557a51c
@@ -0,0 +1,211 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <[email protected]>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <[email protected]>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
+ * 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
Quoted 8 lines

board/esd/meesc/meesc.c line 31

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91sam9263_matrix.h>

please use <asm/arch/at91sam9_matrix.h>

ok

Quoted 8 lines
Quoted 8 lines
board/esd/meesc/meesc.c new file +8 -0
+#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/clk.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/io.h>
Quoted 8 lines

board/esd/meesc/meesc.c line 46

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */

it will be better to only read it only and store it in a static

I only use it once, but if you really mean, I'll change it.

Quoted 4 lines

board/esd/meesc/meesc.c line 50

Quoted 3 lines
board/esd/meesc/meesc.c new file +3 -0
+int get_hw_rev(void)
+{
+	int rev = at91_get_gpio_value(AT91_PIN_PB19);

please add an empty line

ok

Quoted 33 lines
Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+	rev |= at91_get_gpio_value(AT91_PIN_PB20) << 1;
+	rev |= at91_get_gpio_value(AT91_PIN_PB21) << 2;
+	rev |= at91_get_gpio_value(AT91_PIN_PB22) << 3;
+
+	if (rev == 15)
+		rev = 0;
+
+	return rev;
+}
+

<snip>

Quoted 22 lines
board/esd/meesc/meesc.c new file +22 -0
+
+int checkboard(void)
+{
+	char str[32];
+	char buf[32];
+
+	puts("Board: esd CAN-EtherCAT Gateway");
+	if (getenv_r("serial#", str, sizeof(str)) > 0) {
+		puts(", serial# ");
+		puts(str);
+	}
+	printf("\nHardware-revision: 1.%d\n", get_hw_rev());
+	printf("Crystal frequency:\t%8s MHz\n",
+					strmhz(buf, get_main_clk_rate()));
+	printf("CPU clock:\t\t%8s MHz\n",
+					strmhz(buf, get_cpu_clk_rate()));
+#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO
+	printf("Master clock:\t\t%8s MHz\n",
+					strmhz(buf, get_mck_clk_rate()));
+	printf("PLL A clock:\t\t%8s MHz\n",
+					strmhz(buf, get_plla_clk_rate()));
+	printf("PLL B Reg.:\t\t0x%08X\n",
Quoted 9 lines

board/esd/meesc/meesc.c line 178

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+					at91_sys_read(AT91_CKGR_PLLBR));
+	printf("PLL B clock:\t\t%8s MHz\n",
+					strmhz(buf, get_pllb_clk_rate()));
+#endif
+	printf("Mach-type: %lu\n", gd->bd->bi_arch_number);
+	return 0;
+}

please use cpu_info when it's possible to avoid copy & paste

Coud you explain a few more? I can't find a function called 'cpu_info'.

Quoted 5 lines

board/esd/meesc/meesc.c line 183

Quoted 4 lines
board/esd/meesc/meesc.c new file +4 -0
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();

no need

Ok, I'll remove it

Quoted 19 lines
Quoted 19 lines
board/esd/meesc/meesc.c new file +19 -0
+
+	/* Peripheral Clock Enable Register */
+	at91_sys_write(AT91_PMC_PCER,	1 << AT91SAM9263_ID_PIOA |
+					1 << AT91SAM9263_ID_PIOB |
+					1 << AT91SAM9263_ID_PIOCDE |
+					1 << AT91SAM9263_ID_CAN);
+
+	/* arch number of MEESC-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_MEESC;
+
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+	at91_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+	meesc_nand_hw_init();
+#endif
+	meesc_ethercat_hw_init();
+#ifdef CONFIG_HAS_DATAFLASH
Quoted 8 lines

board/esd/meesc/meesc.c line 209

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+	at91_spi0_hw_init(1 << 0);
+#endif
+#ifdef CONFIG_MACB
+	meesc_macb_hw_init();
+#endif
+	at91_set_A_periph(AT91_PIN_PA13, 0);	/* CAN_TX */
+	at91_set_A_periph(AT91_PIN_PA14, 1);	/* CAN_RX */

please add a at91_can_hw_init function

Ok, I'll do this by a separate patch

Quoted 10 lines

board/esd/meesc/meesc.c

Quoted 2 lines
board/esd/meesc/meesc.c new file +2 -0
+	return 0;
+}

<snio>

board/esd/meesc/meesc.c

Quoted 6 lines
board/esd/meesc/meesc.c new file +6 -0
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* Common stuff */
+#define AT91_CPU_NAME			"AT91SAM9263"

please remove

ok

Quoted 8 lines

board/esd/meesc/meesc.c

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+#define CONFIG_SYS_HZ			1000	/* decrementer freq */
+#define CONFIG_MEESC			1	/* Board is esd MEESC */
+#define CONFIG_ARM926EJS		1	/* This is an ARM926EJS Core */
+#define CONFIG_AT91SAM9263		1	/* It's an AT91SAM9263 SoC */
+#define CONFIG_ENV_OVERWRITE		1	/* necessary on prototypes */
+#define CONFIG_DISPLAY_BOARDINFO	1
+#define CONFIG_PREBOOT				/* enable preboot variable */

why which value?

This is a custom value, which is set, during putting the board into operation. So it is unalterable to define CONFIG_PREBOOT

Quoted 13 lines

board/esd/meesc/meesc.c

Quoted 5 lines
board/esd/meesc/meesc.c new file +5 -0
+#define CONFIG_CMDLINE_TAG		1	/* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS	1
+#define CONFIG_INITRD_TAG		1
+#undef CONFIG_USE_IRQ				/* don't need IRQ/FIQ stuff */
+

Best Regards,
J.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Best regards,
Daniel Gorsulowski

#3 lore raw

PATCH 1/1 at91: Add esd gmbh MEESC board support

Quoted 33 lines · Daniel Gorsulowski
Quoted 23 lines · Jean-Christophe PLAGNIOL-VILLARD

<snip>

Quoted 22 lines
board/esd/meesc/meesc.c new file +22 -0
+
+int checkboard(void)
+{
+	char str[32];
+	char buf[32];
+
+	puts("Board: esd CAN-EtherCAT Gateway");
+	if (getenv_r("serial#", str, sizeof(str)) > 0) {
+		puts(", serial# ");
+		puts(str);
+	}
+	printf("\nHardware-revision: 1.%d\n", get_hw_rev());
+	printf("Crystal frequency:\t%8s MHz\n",
+					strmhz(buf, get_main_clk_rate()));
+	printf("CPU clock:\t\t%8s MHz\n",
+					strmhz(buf, get_cpu_clk_rate()));
+#ifdef CONFIG_SHOW_VERBOSE_CLOCKINFO
+	printf("Master clock:\t\t%8s MHz\n",
+					strmhz(buf, get_mck_clk_rate()));
+	printf("PLL A clock:\t\t%8s MHz\n",
+					strmhz(buf, get_plla_clk_rate()));
+	printf("PLL B Reg.:\t\t0x%08X\n",
Quoted 9 lines

board/esd/meesc/meesc.c line 178

Quoted 7 lines
board/esd/meesc/meesc.c new file +7 -0
+					at91_sys_read(AT91_CKGR_PLLBR));
+	printf("PLL B clock:\t\t%8s MHz\n",
+					strmhz(buf, get_pllb_clk_rate()));
+#endif
+	printf("Mach-type: %lu\n", gd->bd->bi_arch_number);
+	return 0;
+}

please use cpu_info when it's possible to avoid copy & paste

Quoted 1 line

Coud you explain a few more? I can't find a function called 'cpu_info'.

Found config option CONFIG_DISPLAY_CPUINFO and enabled it, thank you for the hint.

Best regards,
Daniel Gorsulowski

#4 lore raw

PATCH 1/1 at91: Add esd gmbh MEESC board support

In reply to Jean-Christophe PLAGNIOL-VILLARD

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---
 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 Makefile                    |    3 +
 board/esd/meesc/Makefile    |   55 ++++++++++++
 board/esd/meesc/config.mk   |    1 +
 board/esd/meesc/meesc.c     |  197 +++++++++++++++++++++++++++++++++++++++++++
 board/esd/meesc/partition.c |   37 ++++++++
 include/configs/meesc.h     |  188 +++++++++++++++++++++++++++++++++++++++++
 8 files changed, 486 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 board/esd/meesc/partition.c
 create mode 100644 include/configs/meesc.h
MAINTAINERS +4 -0
index f36a1cc..c9066a9 100644
@@ -530,6 +530,10 @@ Peter Figuli <[email protected]>
 
 	wepep250	xscale
 
+Daniel Gorsulowski <[email protected]>
+
+	meesc		ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gr?ger <[email protected]>
 
 	impa7		ARM720T (EP7211)
MAKEALL +1 -0
index 063ebfc..47eb5af 100755
@@ -583,6 +583,7 @@ LIST_at91="		\
 	cmc_pu2		\
 	csb637		\
 	kb9202		\
+	meesc		\
 	mp2usb		\
 	m501sk		\
 	pm9261		\
Makefile +3 -0
index 0d92d67..282b9fd 100644
@@ -2769,6 +2769,9 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 pm9261_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
 
board/esd/meesc/Makefile new file +55 -0

55 lines not on this page · raw message

board/esd/meesc/config.mk new file +1 -0
new file mode 100644
index 0000000..9ce161e
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f00000
board/esd/meesc/meesc.c new file +197 -0

197 lines not on this page · raw message

board/esd/meesc/partition.c new file +37 -0
new file mode 100644
index 0000000..df0e1db
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <[email protected]>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
+	{CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+};
+
+/* define the area offsets */
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+};
include/configs/meesc.h new file +188 -0

188 lines not on this page · raw message

Signature · 1 line
1.5.3
#5 lore raw

PATCH 1/1 at91: Add esd gmbh MEESC board support

Quoted 173 lines · Daniel Gorsulowski

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---
 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 Makefile                    |    3 +
 board/esd/meesc/Makefile    |   55 ++++++++++++
 board/esd/meesc/config.mk   |    1 +
 board/esd/meesc/meesc.c     |  197 +++++++++++++++++++++++++++++++++++++++++++
 board/esd/meesc/partition.c |   37 ++++++++
 include/configs/meesc.h     |  188 +++++++++++++++++++++++++++++++++++++++++
 8 files changed, 486 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 board/esd/meesc/partition.c
 create mode 100644 include/configs/meesc.h
MAINTAINERS +4 -0
index f36a1cc..c9066a9 100644
@@ -530,6 +530,10 @@ Peter Figuli <[email protected]>
 
 	wepep250	xscale
 
+Daniel Gorsulowski <[email protected]>
+
+	meesc		ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gr?ger <[email protected]>
 
 	impa7		ARM720T (EP7211)
MAKEALL +1 -0
index 063ebfc..47eb5af 100755
@@ -583,6 +583,7 @@ LIST_at91="		\
 	cmc_pu2		\
 	csb637		\
 	kb9202		\
+	meesc		\
 	mp2usb		\
 	m501sk		\
 	pm9261		\
Makefile +3 -0
index 0d92d67..282b9fd 100644
@@ -2769,6 +2769,9 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 pm9261_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
 
board/esd/meesc/Makefile new file +55 -0
new file mode 100644
index 0000000..2dd6b25
@@ -0,0 +1,55 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <[email protected]>
+# 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).a
+
+COBJS-y	+= $(BOARD).o
+COBJS-$(CONFIG_HAS_DATAFLASH) += partition.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/esd/meesc/config.mk new file +1 -0
new file mode 100644
index 0000000..9ce161e
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f00000
board/esd/meesc/meesc.c new file +38 -0
new file mode 100644
index 0000000..cb567ac
@@ -0,0 +1,197 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <[email protected]>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <[email protected]>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
+ * 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 <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91sam9_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/clk.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/hardware.h>

board/esd/meesc/meesc.c line 48

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+#include <asm/arch/io.h>
+#include <netdev.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+

you miss my point here
as if you can use the get_hw_rev multiple time then please do something like thie

static int hw_rev = -1; /* hardware revision */

int get_hw_rev(void)

{
	if (hw_rev >= 0)
		return hw_rev;

	hw_rev = at91_get_gpio_value(AT91_PIN_PB19);

	hw_rev |= at91_get_gpio_value(AT91_PIN_PB20) << 1;
	hw_rev |= at91_get_gpio_value(AT91_PIN_PB21) << 2;
	hw_rev |= at91_get_gpio_value(AT91_PIN_PB22) << 3;

	if (hw_rev == 15)
		hw_rev = 0;

	return hw_rev;
}
Quoted 1 line
board/esd/meesc/meesc.c new file +1 -0
+

<snip>

Quoted 8 lines
board/esd/meesc/meesc.c new file +8 -0
+#define CONFIG_MACB				1
+#define CONFIG_RMII				1
+#define CONFIG_NET_MULTI			1
+#define CONFIG_NET_RETRY_COUNT			20
+#undef CONFIG_RESET_PHY_R
+
+#define CONFIG_SYS_LOAD_ADDR			0x22000000 /* load address */
+

board/esd/meesc/meesc.c

Quoted 10 lines
board/esd/meesc/meesc.c new file +10 -0
+#define CONFIG_SYS_MEMTEST_START		PHYS_SDRAM
+#define CONFIG_SYS_MEMTEST_END			0x21e00000
+
+#define CONFIG_SYS_USE_DATAFLASH		1
+#undef CONFIG_SYS_USE_NANDFLASH
+
+#ifdef CONFIG_SYS_USE_DATAFLASH
+
+/* CAN */
+#define CONFIG_CAN				1

CONFIG_AT91_CAN will be better as the code is at91 specific

Best Regards,
J.

#6 lore raw

PATCH 1/2 at91: Add CAN init function

To enable CAN init, CONFIG_CAN has to be defined in the board config file and at91_can_hw_init() has to be called in the board specific code.

CAN is available on AT91SAM9263 and AT91CAP9 SoC.

---
 cpu/arm926ejs/at91/at91cap9_devices.c    |   15 +++++++++++++++
 cpu/arm926ejs/at91/at91sam9263_devices.c |   15 +++++++++++++++
 include/asm-arm/arch-at91/at91_common.h  |    1 +
 3 files changed, 31 insertions(+), 0 deletions(-)
cpu/arm926ejs/at91/at91cap9_devices.c +15 -0
index c0024ac..39e405f 100644
@@ -3,6 +3,10 @@
  * Stelian Pop <[email protected]>
  * Lead Tech Design <www.leadtechdesign.com>
  *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <[email protected]>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -174,3 +178,14 @@ void at91_macb_hw_init(void)
 #endif
 }
 #endif
+
+#ifdef CONFIG_AT91_CAN
+void at91_can_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PA12, 0);	/* CAN_TX */
+	at91_set_A_periph(AT91_PIN_PA13, 1);	/* CAN_RX */
+
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_CAN);
+}
+#endif
cpu/arm926ejs/at91/at91sam9263_devices.c +15 -0
index 0f2613e..f72efdf 100644
@@ -3,6 +3,10 @@
  * Stelian Pop <[email protected]>
  * Lead Tech Design <www.leadtechdesign.com>
  *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <[email protected]>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -182,3 +186,14 @@ void at91_uhp_hw_init(void)
 	at91_set_gpio_output(AT91_PIN_PA24, 0);
 }
 #endif
+
+#ifdef CONFIG_AT91_CAN
+void at91_can_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PA13, 0);	/* CAN_TX */
+	at91_set_A_periph(AT91_PIN_PA14, 1);	/* CAN_RX */
+
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_CAN);
+}
+#endif
include/asm-arm/arch-at91/at91_common.h +1 -0
index 9c4e019..01840ee 100644
@@ -25,6 +25,7 @@
 #ifndef AT91_COMMON_H
 #define AT91_COMMON_H
 
+void at91_can_hw_init(void);
 void at91_macb_hw_init(void);
 void at91_serial_hw_init(void);
 void at91_serial0_hw_init(void);
Signature · 1 line
1.5.3
#7 lore raw

PATCH 2/2 at91: Add esd gmbh MEESC board support

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

---
 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 Makefile                    |    3 +
 board/esd/meesc/Makefile    |   55 ++++++++++++
 board/esd/meesc/config.mk   |    1 +
 board/esd/meesc/meesc.c     |  198 +++++++++++++++++++++++++++++++++++++++++++
 board/esd/meesc/partition.c |   37 ++++++++
 include/configs/meesc.h     |  188 ++++++++++++++++++++++++++++++++++++++++
 8 files changed, 487 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 board/esd/meesc/partition.c
 create mode 100644 include/configs/meesc.h
MAINTAINERS +4 -0
index f36a1cc..c9066a9 100644
@@ -530,6 +530,10 @@ Peter Figuli <[email protected]>
 
 	wepep250	xscale
 
+Daniel Gorsulowski <[email protected]>
+
+	meesc		ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gr?ger <[email protected]>
 
 	impa7		ARM720T (EP7211)
MAKEALL +1 -0
index 063ebfc..47eb5af 100755
@@ -583,6 +583,7 @@ LIST_at91="		\
 	cmc_pu2		\
 	csb637		\
 	kb9202		\
+	meesc		\
 	mp2usb		\
 	m501sk		\
 	pm9261		\
Makefile +3 -0
index 0d92d67..282b9fd 100644
@@ -2769,6 +2769,9 @@ at91sam9rlek_config	:	unconfig
 	fi;
 	@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 pm9261_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9261 ronetix at91
 
board/esd/meesc/Makefile new file +55 -0

55 lines not on this page · raw message

board/esd/meesc/config.mk new file +1 -0
new file mode 100644
index 0000000..9ce161e
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f00000
board/esd/meesc/meesc.c new file +198 -0

198 lines not on this page · raw message

board/esd/meesc/partition.c new file +37 -0
new file mode 100644
index 0000000..df0e1db
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <[email protected]>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = {
+	{CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+};
+
+/* define the area offsets */
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+};
include/configs/meesc.h new file +188 -0

188 lines not on this page · raw message

Signature · 1 line
1.5.3
#8 lore raw

PATCH 2/2 at91: Add esd gmbh MEESC board support

Quoted 4 lines · Daniel Gorsulowski

This patch adds support for esd gmbh MEESC board.
The MEESC is based on an Atmel AT91SAM9263 SoC.

Quoted 15 lines
---
 MAINTAINERS                 |    4 +
 MAKEALL                     |    1 +
 Makefile                    |    3 +
 board/esd/meesc/Makefile    |   55 ++++++++++++
 board/esd/meesc/config.mk   |    1 +
 board/esd/meesc/meesc.c     |  198 +++++++++++++++++++++++++++++++++++++++++++
 board/esd/meesc/partition.c |   37 ++++++++
 include/configs/meesc.h     |  188 ++++++++++++++++++++++++++++++++++++++++
 8 files changed, 487 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 board/esd/meesc/partition.c
 create mode 100644 include/configs/meesc.h

Applied to u-boot-arm

Best Regards,
J.

#9 lore raw

PATCH 1/2 at91: Add CAN init function

In reply to Daniel Gorsulowski
Quoted 11 lines · Daniel Gorsulowski

To enable CAN init, CONFIG_CAN has to be defined in the board config file and at91_can_hw_init() has to be called in the board specific code.

CAN is available on AT91SAM9263 and AT91CAP9 SoC.

---
 cpu/arm926ejs/at91/at91cap9_devices.c    |   15 +++++++++++++++
 cpu/arm926ejs/at91/at91sam9263_devices.c |   15 +++++++++++++++
 include/asm-arm/arch-at91/at91_common.h  |    1 +
 3 files changed, 31 insertions(+), 0 deletions(-)

Applied to u-boot-arm

Best Regards,
J.