[U-Boot-Users] [PATCH] Enable device and console for ARM.

Wolfgang Denk wd at denx.de
Fri Jun 20 00:32:20 CEST 2003


In message <FD2AC9A020DDD51194710008C7089B20053D4C7E at dlee17.itg.ti.com> you wrote:
>
> This update enables the standard device abstraction for ARM and enables the
> console member.  It also initializes bi_baudrate for ARM.  The superficial
> effect of this is coninfo works with out hanging a system.  More importantly
> it enables devices, including the console.
> 
> The only little bit stopping some of this from working before is that
> common/devices.c was written such that it was not relocation agnostic
> (Current ARM code do not do the selective relocation which the PPC ports
> appear to do).  Everything I've tried so far still works as before (or
> better), and the console seems to work on my ARM board.

I am afraid I have to reject this code. The idea  (enabling  devices)
is good, though. Please clean up and resubmit.


> diff -purN u-boot-0.3.0/lib_arm/board.c u-boot-0.3.1/lib_arm/board.c
> --- u-boot-0.3.0/lib_arm/board.c	Fri Apr  4 17:42:23 2003
> +++ u-boot-0.3.1/lib_arm/board.c	Sun Jun 15 15:20:01 2003
> @@ -28,6 +28,7 @@
>  #include <common.h>
>  #include <command.h>
>  #include <devices.h>
> +#include <syscall.h>
>  #include <version.h>
>  #include <net.h>
>  
> @@ -87,8 +88,7 @@ static int init_baudrate (void)
>  
>  	uchar tmp[64];	/* long enough for environment variables */
>  	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
> -
> -	gd->baudrate = (i > 0)
> +   	gd->bd->bi_baudrate = gd->baudrate = (i > 0)
>  			? (int) simple_strtoul (tmp, NULL, 10)
>  			: CONFIG_BAUDRATE;
>  
> @@ -238,11 +238,6 @@ void start_armboot (void)
>  	/* initialize environment */
>  	env_relocate ();
>  
> -#ifdef CONFIG_VFD
> -	/* must do this after the framebuffer is allocated */
> -	drv_vfd_init();
> -#endif
> -

Please  do  not  modify  code  for  boards  you  cannot  test.   Your
modification  is not acceptable for the TRAB board which uses the VFD
code.


> +    /* Syscalls are not yet implemented for ARM, but probably should be. Allocating
> +     *  this allows the console_init routiene's to work with out ifdefs, and will be
> +     *  needed with syscalls are finally added (for loadable module support).
> +     */
> +	syscall_tbl = (void **) malloc (NR_SYSCALLS * sizeof (void *));

Please do not add dead code. syscall are not implemented on  anything
else  but  PowerPC  (where a corresponding trap exists). If this gets
cleaned up one day systcalls will go away for PowerPC, too.



Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
There is a time in the tides of men, Which, taken at its flood, leads
on to success. On the other hand, don't count on it.   - T. K. Lawson




More information about the U-Boot mailing list