public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users]  Few Patches for ARM Specific Codes
@ 2007-12-18 11:40 Hebbar
  2007-12-18 16:05 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Hebbar @ 2007-12-18 11:40 UTC (permalink / raw)
  To: u-boot


Hi,

we are working on a Customized ARM Board. I am trying to port Uboot for the
same board. I found that few patches were required for ARM Specidifc Modules
and below are the few patches that i found usefull.

1. I2C Init func in lib_arm/board.c --> found the same in ppc,blackfin
modules
------------------------------------------------------------------------------

--- u-boot-1.3.1/lib_arm/board.c	2007-12-06 01:21:19.000000000 -0800
+++ uboot/lib_arm/board.c	2007-12-12 19:57:51.296875000 -0800
@@ -84,6 +84,11 @@ extern void cs8900_get_enetaddr (uchar *
 extern void rtl8019_get_enetaddr (uchar * addr);
 #endif
 
+#if defined(CONFIG_HARD_I2C) || \
+    defined(CONFIG_SOFT_I2C)
+#include <i2c.h>
+#endif
+
 /*
  * Begin and End of memory area for malloc(), and current "brk"
  */
@@ -209,6 +214,16 @@ static void display_flash_config (ulong 
 }
 #endif /* CFG_NO_FLASH */
 
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+static int init_func_i2c (void)
+{
+	puts ("I2C:   ");
+	i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
+	puts ("ready\n");
+	return (0);
+}
+#endif
+
 /*
  * Breathe some life into the board...
  *
@@ -251,6 +266,9 @@ init_fnc_t *init_sequence[] = {
 #if defined(CONFIG_DISPLAY_BOARDINFO)
 	checkboard,		/* display board info */
 #endif
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+	init_func_i2c,
+#endif
 	dram_init,		/* configure available RAM banks */
 	display_dram_config,
 	NULL,



2. Remove cpu_init_crit module if CONFIG_SKIP_LOWLEVEL_INIT not define. at
present even if CONFIG_SKIP_LOWLEVEL_INIT is not defined, cpu_init_crit  is
defined in uboot\cpu\arm926ejs\start.S
------------------------------------------------------------------------------

--- u-boot-1.3.1/cpu/arm926ejs/start.S	2007-12-06 01:21:19.000000000 -0800
+++ uboot/cpu/arm926ejs/start.S	2007-12-18 20:19:36.296875000 -0800
@@ -187,7 +187,7 @@ clbss_l:str	r2, [r0]		/* clear loop...  
 _start_armboot:
 	.word start_armboot
 
-
+#ifndef CONFIG_SKIP_LOWLEVEL_INIT
 /*
  *************************************************************************
  *
@@ -225,6 +225,9 @@ cpu_init_crit:
 	bl	lowlevel_init	/* go setup pll,mux,memory */
 	mov	lr, ip		/* restore link */
 	mov	pc, lr		/* back to my caller */
+	
+#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
+	
 /*
  *************************************************************************
  *



3.Remove compiler warning: target CPU does not support interworking
-------------------------------------------------------------------
--- u-boot-1.3.1/cpu/arm926ejs/config.mk	2007-12-06 01:21:19.000000000 -0800
+++ uboot/cpu/arm926ejs/config.mk	2007-12-18 20:22:57.093750000 -0800
@@ -31,4 +31,5 @@ PLATFORM_CPPFLAGS += -march=armv4
 #
 # =========================================================================
 PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call
cc-option,-malignment-traps,))



4. Display Ethernet inf in do_bdinfo only if CONFIG_CMD_NET is defined
----------------------------------------------------------------------
--- u-boot-1.3.1/common/cmd_bdinfo.c	2007-12-06 01:21:19.000000000 -0800
+++ uboot/common/cmd_bdinfo.c	2007-12-18 19:46:41.625000000 -0800
@@ -314,6 +314,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl
 		print_num("-> size",	bd->bi_dram[i].size);
 	}
 
+#if defined(CONFIG_CMD_NET)
 	puts ("ethaddr     =");
 	for (i=0; i<6; ++i) {
 		printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
@@ -321,6 +322,7 @@ int do_bdinfo ( cmd_tbl_t *cmdtp, int fl
 	puts  ( "\n"
 		"ip_addr     = ");
 	print_IPaddr (bd->bi_ip_addr);
+#endif		
 	printf ("\n"
 		"baudrate    = %d bps\n", bd->bi_baudrate);
 



I welcome comments, complaints, suggestions and advices.

Regards
Gururaja
-- 
View this message in context: http://www.nabble.com/Few-Patches-for-ARM-Specific-Codes-tp14395327p14395327.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot-Users] Few Patches for ARM Specific Codes
  2007-12-18 11:40 [U-Boot-Users] Few Patches for ARM Specific Codes Hebbar
@ 2007-12-18 16:05 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2007-12-18 16:05 UTC (permalink / raw)
  To: u-boot

In message <14395327.post@talk.nabble.com> you wrote:
> 
> we are working on a Customized ARM Board. I am trying to port Uboot for the
> same board. I found that few patches were required for ARM Specidifc Modules
> and below are the few patches that i found usefull.

Please submit these patches one by one, following the rulkes as
outlined in http://www.denx.de/wiki/UBoot/Patches

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
"A complex system that works is invariably found to have evolved from
a simple system that worked."             - John Gall, _Systemantics_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-18 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-18 11:40 [U-Boot-Users] Few Patches for ARM Specific Codes Hebbar
2007-12-18 16:05 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox