- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This patch is needed to generate nios2_system.h correctly when using fifoed avalon uart (http://www.niosforum.com/pages/project_details.php?p_id=89&t_id=18)
--- ../uClinux-dist-nios2/linux-2.6.x/arch/nios2nommu/scripts/nios2_system.h/fifoed_avalon_uart.pm 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.x/arch/nios2nommu/scripts/nios2_system.h/fifoed_avalon_uart.pm 2007-03-09 12:36:34.000000000 +0100
@@ -0,0 +1,44 @@
+package fifoed_avalon_uart;
+
+use base qw(BasicModule);
+use strict;
+
+sub required_module_names {
+ ("uart0", "uart1", "uart2", "uart3")
+}
+
+sub required_class_name {
+ "fifoed_avalon_uart";
+}
+
+sub base_address_cast {
+ "np_uart"
+}
+
+sub print_prefix {
+ my ($class, $system) = @_;
+
+ print "#ifndef __ASSEMBLY__\n";
+ print "#include <asm/uart_struct.h>\n";
+ print "#endif\n\n";
+}
+
+sub translate {
+ my $class = shift;
+ my ($system, $required_module_name, $module_name) = @_;
+
+ $class->SUPER::translate (@_);
+
+ if (!defined ($fifoed_avalon_uart::default_uart)) {
+ print "/* The default uart is always the first one found in the PTF file */\n";
+ print "#define nasys_printf_uart na_$required_module_name\n\n";
+ $fifoed_avalon_uart::default_uart = $required_module_name;
+ }
+
+}
+
+sub run {
+ fifoed_avalon_uart->run2 (@_);
+}
+
+1;
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!! and Thanks a lot.
I checked in my local svn, and will update the wiki next.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page