Skip to contentSkip to conversation

AT91SAM9263-pm9263-support

PATCH New Ilko Iliev 4 participants 4 messages Oct 20, 2008

Subsystems (4)
lore
Share & tools
lore

Ilko Iliev

author
#0 lore raw

PATCH 1/1 AT91SAM9263-pm9263-support

This patch adds support for the PM9263 board of Ronetix GmbH (www.ronetix.at)

---
 MAKEALL                              |    1 +
 Makefile                             |    3 +
 board/ronetix/pm9263/Makefile        |   60 +++++
 board/ronetix/pm9263/config.mk       |    1 +
 board/ronetix/pm9263/led.c           |   68 ++++++
 board/ronetix/pm9263/lowlevel_init.S |  375 
++++++++++++++++++++++++++++++++
 board/ronetix/pm9263/partition.c     |   47 ++++
 board/ronetix/pm9263/pm9263.c        |  393 
++++++++++++++++++++++++++++++++++
 board/ronetix/pm9263/pm9263_nand.c   |   79 +++++++
 common/lcd.c                         |    9 +
 cpu/arm926ejs/at91/lowlevel_init.S   |    6 +-
 drivers/mtd/dataflash.c              |    5 +-
 include/configs/pm9263.h             |  285 ++++++++++++++++++++++++
 tools/Makefile                       |    3 +
 tools/logos/ronetix.bmp              |  Bin 0 -> 5638 bytes
 15 files changed, 1330 insertions(+), 5 deletions(-)
 mode change 100755 => 100644 MAKEALL
 create mode 100644 board/ronetix/pm9263/Makefile
 create mode 100644 board/ronetix/pm9263/config.mk
 create mode 100644 board/ronetix/pm9263/led.c
 create mode 100644 board/ronetix/pm9263/lowlevel_init.S
 create mode 100644 board/ronetix/pm9263/partition.c
 create mode 100644 board/ronetix/pm9263/pm9263.c
 create mode 100644 board/ronetix/pm9263/pm9263_nand.c
 create mode 100644 include/configs/pm9263.h
 create mode 100644 tools/logos/ronetix.bmp
MAKEALL +1 -0
old mode 100755
new mode 100644
index 9ccb9ac..bde7d73
@@ -536,6 +536,7 @@ LIST_at91="		\
 	at91sam9260ek	\
 	at91sam9261ek	\
 	at91sam9263ek	\
+	pm9263	\
 	at91sam9rlek	\
 	cmc_pu2		\
 	csb637		\
Makefile +3 -0
index 9055747..2772dd5 100644
@@ -2493,6 +2493,9 @@ at91sam9261ek_config	:	unconfig
 at91sam9263ek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91
 
+pm9263_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
+
 at91sam9rlek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9rlek atmel at91
 
board/ronetix/pm9263/Makefile new file +60 -0

60 lines not on this page · raw message

board/ronetix/pm9263/config.mk new file +1 -0
new file mode 100644
index 0000000..ff2cfd1
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
board/ronetix/pm9263/led.c new file +68 -0

68 lines not on this page · raw message

board/ronetix/pm9263/lowlevel_init.S new file +375 -0

375 lines not on this page · raw message

board/ronetix/pm9263/partition.c new file +47 -0

47 lines not on this page · raw message

board/ronetix/pm9263/pm9263.c new file +393 -0

393 lines not on this page · raw message

board/ronetix/pm9263/pm9263_nand.c new file +79 -0

79 lines not on this page · raw message

common/lcd.c +9 -0
index 25f8664..9f81031 100644
@@ -824,14 +824,23 @@ static void *lcd_logo (void)
 
 #ifdef CONFIG_ATMEL_LCD
 # ifdef CONFIG_LCD_INFO
+
 	sprintf (info, "%s", U_BOOT_VERSION);
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
 
+#ifdef CONFIG_LCD_LOGO_TEXT1
+	sprintf (info, CONFIG_LCD_LOGO_TEXT1);
+#else
 	sprintf (info, "(C) 2008 ATMEL Corp");
+#endif	
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT,
 					(uchar *)info, strlen(info));
 
+#ifdef CONFIG_LCD_LOGO_TEXT2
+	sprintf (info, CONFIG_LCD_LOGO_TEXT2);
+#else
 	sprintf (info, "at91support at atmel.com");
+#endif	
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2,
 					(uchar *)info, strlen(info));
 
cpu/arm926ejs/at91/lowlevel_init.S +3 -3
index ec6ad5d..7882e89 100644
@@ -27,7 +27,7 @@
 #include <config.h>
 #include <version.h>
 
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && !defined(CONFIG_USER_LOWLEVEL_INIT)
 
 .globl lowlevel_init
 lowlevel_init:
@@ -39,5 +39,5 @@ lowlevel_init:
 	mov	pc, lr
 
 	.ltorg
-
-#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+	
+#endif /* !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_USER_LOWLEVEL_INIT */
drivers/mtd/dataflash.c +3 -2
index 049da69..e926b38 100644
@@ -130,8 +130,9 @@ int AT91F_DataflashInit (void)
 			dfcode = 0;
 			break;
 		}
+
 		/* set the last area end to the dataflash size*/
-		area_list[NB_DATAFLASH_AREA -1].end =
+		dataflash_info[i].end_address = 
 				(dataflash_info[i].Device.pages_number *
 				dataflash_info[i].Device.pages_size)-1;
 
@@ -146,7 +147,7 @@ int AT91F_DataflashInit (void)
 				if(area_list[part].end == 0xffffffff) {
 					dataflash_info[i].Device.area_list[j].end =
 						dataflash_info[i].end_address +
-						dataflash_info	[i].logical_address;
+						dataflash_info[i].logical_address;
 					last_part = 1;
 				} else {
 					dataflash_info[i].Device.area_list[j].end =
include/configs/pm9263.h new file +285 -0

285 lines not on this page · raw message

tools/Makefile +3 -0
index 9e9ee15..fbc64ba 100644
@@ -47,6 +47,9 @@ endif
 ifeq ($(VENDOR),atmel)
 LOGO_BMP= logos/atmel.bmp
 endif
+ifeq ($(VENDOR),ronetix)
+LOGO_BMP= logos/ronetix.bmp
+endif
 
 
 #-------------------------------------------------------------------------
tools/logos/ronetix.bmp new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..f956813915c7822ba11a3ab81ad9f48fa2849a5c
GIT binary patch

zc%03cKU~{J6vq!FPL^XEQ4<1A027nM#06YR5|^g at OKA-xvFpa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;*(Q_XdWChX=;~1zg+&lK=n!

literal 0
Hc$@<O00001

-- 1.5.2.2

#1 lore raw

PATCH 1/1 AT91SAM9263-pm9263-support

Dear Ilko Iliev,

Quoted 5 lines · In message <[email protected]> you wrote:

This patch adds support for the PM9263 board of Ronetix GmbH (www.ronetix.at)

Quoted 8 lines
---
 MAKEALL                              |    1 +
 Makefile                             |    3 +
 board/ronetix/pm9263/Makefile        |   60 +++++
 board/ronetix/pm9263/config.mk       |    1 +
 board/ronetix/pm9263/led.c           |   68 ++++++
 board/ronetix/pm9263/lowlevel_init.S |  375 

++++++++++++++++++++++++++++++++

Ouch - line wrapped?

Quoted 3 lines
 board/ronetix/pm9263/partition.c     |   47 ++++
 board/ronetix/pm9263/pm9263.c        |  393 

++++++++++++++++++++++++++++++++++

Ditto?

MAKEALL LIST_at91=" \ · line 542

Quoted 10 lines
MAKEALL +1 -0
@@ -536,6 +536,7 @@ LIST_at91="		\
 	at91sam9260ek	\
 	at91sam9261ek	\
 	at91sam9263ek	\
+	pm9263	\
 	at91sam9rlek	\
 	cmc_pu2		\
 	csb637		\

Please keep lists sorted, and vertical alignment of the backslashes intact.

Makefile at91sam9261ek_config : unconfig · line 2498

Quoted 11 lines
Makefile +3 -0
index 9055747..2772dd5 100644
@@ -2493,6 +2493,9 @@ at91sam9261ek_config	:	unconfig
 at91sam9263ek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91
 
+pm9263_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
+

Please keep lists sorted.

Quoted 3 lines
Makefile +0 -0
 at91sam9rlek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9rlek atmel at91
 

...

Quoted 3 lines
board/ronetix/pm9263/led.c new file +0 -0
@@ -0,0 +1,68 @@

...

board/ronetix/pm9263/led.c line 56

Quoted 7 lines
board/ronetix/pm9263/led.c new file +7 -0
+void green_LED_off(void)
+{
+	at91_set_gpio_value(GREEN_LED, 1);
+}
+
+
+

Too many empty lines. One should be sufficient here.

Quoted 6 lines
board/ronetix/pm9263/lowlevel_init.S new file +0 -0
new file mode 100644
index 0000000..de240b7
@@ -0,0 +1,375 @@

...

board/ronetix/pm9263/lowlevel_init.S line 72

Quoted 3 lines
board/ronetix/pm9263/lowlevel_init.S new file +3 -0
+#define PIOD_PDR_VAL1 0xFFFF0000	/* define PDC[31:16] as DATA[31:16] */
+#define PIOD_PPUDR_VAL 0xFFFF0000	/* no pull-up for D[31:16] */
+#define MATRIX_EBI0CSA_VAL 0x0001010A	/* EBI0_CSA, CS1 SDRAM, CS3 NAND Flash,	3.3V memories */

Maximum line length exceeded. Actually many lines are too long, but here it is obvious.

common/lcd.c static void *lcd_logo (void) · line 828

Quoted 10 lines
common/lcd.c +1 -0
index 25f8664..9f81031 100644
@@ -824,14 +824,23 @@ static void *lcd_logo (void)
 
 #ifdef CONFIG_ATMEL_LCD
 # ifdef CONFIG_LCD_INFO
+
 	sprintf (info, "%s", U_BOOT_VERSION);

Please do not change common files witout need, and without even mentioning it!

common/lcd.c static void *lcd_logo (void) · line 837

Quoted 9 lines
common/lcd.c +4 -0
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
 
+#ifdef CONFIG_LCD_LOGO_TEXT1
+	sprintf (info, CONFIG_LCD_LOGO_TEXT1);
+#else
 	sprintf (info, "(C) 2008 ATMEL Corp");
+#endif	
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT,
 					(uchar *)info, strlen(info));

This change is unrelated to your board support. Please split it out into a separate patch.

common/lcd.c static void *lcd_logo (void) · line 843

Quoted 5 lines
common/lcd.c +4 -0
+#ifdef CONFIG_LCD_LOGO_TEXT2
+	sprintf (info, CONFIG_LCD_LOGO_TEXT2);
+#else
 	sprintf (info, "at91support at atmel.com");
+#endif	

Ditto.

And instead of the #idfef's in the code, please consider something like this:

#ifndef CONFIG_LCD_LOGO_TEXT2

# define CONFIG_LCD_LOGO_TEXT2 "at91support at atmel.com"
#endif
...
	sprintf (info, CONFIG_LCD_LOGO_TEXT2);

Same for above.

cpu/arm926ejs/at91/lowlevel_init.S line 30

Quoted 10 lines
cpu/arm926ejs/at91/lowlevel_init.S +1 -1
index ec6ad5d..7882e89 100644
@@ -27,7 +27,7 @@
 #include <config.h>
 #include <version.h>
 
-#ifndef CONFIG_SKIP_LOWLEVEL_INIT
+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && !defined(CONFIG_USER_LOWLEVEL_INIT)

This is unrelated to your board support, so please split it out into a separate patch.

drivers/mtd/dataflash.c int AT91F_DataflashInit (void) · line 134

Quoted 10 lines
drivers/mtd/dataflash.c +1 -0
index 049da69..e926b38 100644
@@ -130,8 +130,9 @@ int AT91F_DataflashInit (void)
 			dfcode = 0;
 			break;
 		}
+
 		/* set the last area end to the dataflash size*/

Please don;t change common files without need.

drivers/mtd/dataflash.c int AT91F_DataflashInit (void) · line 135

Quoted 2 lines
drivers/mtd/dataflash.c +1 -1
-		area_list[NB_DATAFLASH_AREA -1].end =
+		dataflash_info[i].end_address = 

This change is unrelated to you board support and affects all boards. Modifications by this must explicitely mentioned in the description and discussed.

Quoted 6 lines
include/configs/pm9263.h new file +0 -0
new file mode 100644
index 0000000..1646e9f
@@ -0,0 +1,285 @@

...

include/configs/pm9263.h line 127

Quoted 2 lines
include/configs/pm9263.h new file +2 -0
+/* NOR flash, if populated */
+#if 0

Please do not add dead code.

include/configs/pm9263.h line 259

Quoted 5 lines
include/configs/pm9263.h new file +5 -0
+#define CONFIG_IPADDR		192.168.3.222
+#define CONFIG_GATEWAYIP	192.168.3.1
+#define CONFIG_ETHADDR		02:DE:AD:BE:EF:01
+#define CONFIG_NETMASK		255.255.255.0
+#define CONFIG_SERVERIP		192.168.3.1

Please never encode network paramters in the default environment. Delete this.

Best regards,

Wolfgang Denk

Signature · 7 lines
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
How many seconds are there in a year? If I tell you there are 3.155 x
10^7, you won't even try to remember it. On the other hand, who could
forget that, to within half a percent, pi seconds is  a  nanocentury.
                                               -- Tom Duff, Bell Labs
#2 lore raw

PATCH 1/1 AT91SAM9263-pm9263-support

In reply to Ilko Iliev
Quoted 2 lines · Ilko Iliev

This patch adds support for the PM9263 board of Ronetix GmbH (www.ronetix.at)

Please note that u-boot-v2 has also a port for the PM9263:
http://git.denx.de/?p=u-boot/u-boot-v2.git;a=summary

Marc, you may also have some comments about the posted patches.

rsc

Signature · 5 lines
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9
#3 lore raw

PATCH 1/1 AT91SAM9263-pm9263-support

In reply to Ilko Iliev
Quoted 26 lines · Ilko Iliev

This patch adds support for the PM9263 board of Ronetix GmbH (www.ronetix.at)

---
 MAKEALL                              |    1 +
 Makefile                             |    3 +
 board/ronetix/pm9263/Makefile        |   60 +++++
 board/ronetix/pm9263/config.mk       |    1 +
 board/ronetix/pm9263/led.c           |   68 ++++++
 board/ronetix/pm9263/lowlevel_init.S |  375 
++++++++++++++++++++++++++++++++
 board/ronetix/pm9263/partition.c     |   47 ++++
 board/ronetix/pm9263/pm9263.c        |  393 
++++++++++++++++++++++++++++++++++
 board/ronetix/pm9263/pm9263_nand.c   |   79 +++++++
 common/lcd.c                         |    9 +
 cpu/arm926ejs/at91/lowlevel_init.S   |    6 +-
 drivers/mtd/dataflash.c              |    5 +-
 include/configs/pm9263.h             |  285 ++++++++++++++++++++++++
 tools/Makefile                       |    3 +
 tools/logos/ronetix.bmp              |  Bin 0 -> 5638 bytes
 15 files changed, 1330 insertions(+), 5 deletions(-)
 mode change 100755 => 100644 MAKEALL
 create mode 100644 board/ronetix/pm9263/Makefile
Quoted 9 lines
 create mode 100644 board/ronetix/pm9263/config.mk
 create mode 100644 board/ronetix/pm9263/led.c
 create mode 100644 board/ronetix/pm9263/lowlevel_init.S
 create mode 100644 board/ronetix/pm9263/partition.c
 create mode 100644 board/ronetix/pm9263/pm9263.c
 create mode 100644 board/ronetix/pm9263/pm9263_nand.c
 create mode 100644 include/configs/pm9263.h
 create mode 100644 tools/logos/ronetix.bmp

Hi,
I'd like to notice that I've plan to modify the at91 board support in order to reduce duplicate code that I've seen more and more with the adding of new board.

Of course I will review your patch but please keep in mind that the current may need to be updated against this new common part.

Best Regards,
J.