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

Hi,
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.
Regards,
Richard Woodruff

In message FD2AC9A020DDD51194710008C7089B20053D4C7E@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
Why do you initialize bi_baudrate? Is there any place where this is used on ARM systems?
Best regards,
Wolfgang Denk

On Sun, Jun 15, 2003 at 05:04:31PM -0500, Woodruff, Richard wrote:
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.
The whole lib_arm stuff should be reviewed and made more compatible to the way it is done in ppc. I still have some patches in the -ptx U-Boot tree which change the memory handling according to what is written in the README. I agree with Wolfgang that it should be done the right way, but unfortunately I don't have that much time to do the work at the moment...
Robert

In message FD2AC9A020DDD51194710008C7089B20053D4C7E@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
participants (3)
-
Robert Schwebel
-
Wolfgang Denk
-
Woodruff, Richard