Hi I'm a FoxBoard newbee but I have lots of experience in computer
programming. Now I need help from any one who can help me.
I have started to develop a frame buffer device driver who are using
serial port 2 as a communication channel to the VGA-controller. First
of all I try to set up the internal uart and send some initialization
codes to the controller but nothing happens and I can't see any
activity on the tx-pin connected to my oscilloscope. I'm using the
following code and makefile:
test.c
-----------
#include <asm/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("SM7LQV 1.2");
MODULE_VERSION("1.2");
int init_uVGA(void) {
*R_SERIAL2_REC_CTRL = 0x20;
*R_SERIAL2_TR_CTRL = 0x40;
*R_SERIAL2_BAUD = 0x99;
while (!(*R_SERIAL2_STATUS && 0x20)) {}
*R_SERIAL2_TR_DATA = 'U';
printk("<1>Status: %x\n",*R_SERIAL2_STATUS);
while (!(*R_SERIAL2_STATUS && 0x20)) {}
printk("<1>Auto Baud ready!\n");
*R_SERIAL2_TR_DATA = 0x56;
while (!(*R_SERIAL2_STATUS && 0x20)) {}
*R_SERIAL2_TR_DATA = 0x01;
while (!(*R_SERIAL2_STATUS && 0x20)) {}
printk("<1>Device Info Request ready!\n");
return 0;
}
void cleanup_uVGA(void) {
printk("<1>Goodbye world\n");
}
module_init(init_uVGA);
module_exit(cleanup_uVGA);
Makefile:
------------------------
MODULE = uvga.o
uvga-y = test.o
EXTRA_CFLAGS += -DNOKERNEL $(USER_OPT)
PREVENT_RECURSIVE_INCLUDE = 1
include $(AXIS_TOP_DIR)/modules/rules.build_modules
----------------
/Lars