Added doxygen targets and support files.
made remaining changes for new superio support.
This commit is contained in:
parent
162114dd66
commit
61cf86c18e
5 changed files with 82 additions and 42 deletions
|
|
@ -9,6 +9,8 @@ makerule linuxbios.rom: linuxbios.strip makerom ; ./makerom -l0x310000 -i7 -v li
|
|||
makerule linuxbios.strip: linuxbios ; objcopy -O binary -R .note -R .comment -S linuxbios linuxbios.strip
|
||||
makerule linuxbios: linuxbios.a ; @rm -f biosobject
|
||||
makerule etags: $(SOURCES) ; etags $(SOURCES)
|
||||
makerule tags: $(SOURCES) ; gctags $(SOURCES)
|
||||
makerule documentation: $(SOURCES) ; doxygen LinuxBIOSDoc.config
|
||||
addaction linuxbios $(LINK)
|
||||
addaction linuxbios nm -n linuxbios > linuxbios.map
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ makerule linuxbios.rom: linuxbios.strip mkrom ; ./mkrom -s 64 -f -o linuxbios.ro
|
|||
makerule linuxbios.strip: linuxbios ; objcopy -O binary -R .note -R .comment -S linuxbios linuxbios.strip
|
||||
makerule linuxbios: linuxbios.a vmlinux.bin.gz ; @rm -f biosobject
|
||||
makerule etags: $(SOURCES) ; etags $(SOURCES)
|
||||
makerule tags: $(SOURCES) ; gctags $(SOURCES)
|
||||
makerule documentation: $(SOURCES) ; doxygen LinuxBIOSDoc.config
|
||||
addaction linuxbios $(LINK)
|
||||
addaction linuxbios nm -n linuxbios > linuxbios.map
|
||||
|
||||
|
|
|
|||
|
|
@ -798,6 +798,14 @@ handle_superio(int pass, struct superio *s, int nsuperio)
|
|||
continue;
|
||||
printk(KERN_INFO "handle_superio: Pass %d, Superio %s\n", pass,
|
||||
s->super->name);
|
||||
// if no port is assigned use the defaultport
|
||||
printk(KERN_INFO __FUNCTION__ " port 0x%x, defaultport 0x%x\n",
|
||||
s->port, s->super->defaultport);
|
||||
if (! s->port)
|
||||
s->port = s->super->defaultport;
|
||||
|
||||
printk(KERN_INFO __FUNCTION__ " Using port 0x%x\n", s->port);
|
||||
|
||||
// need to have both pre_pci_init and devfn defined.
|
||||
if (s->super->pre_pci_init && (pass == 0)) {
|
||||
printk(KERN_INFO " Call pre_pci_init\n");
|
||||
|
|
|
|||
|
|
@ -11,88 +11,88 @@ static char rcsid[] = "$Id$";
|
|||
#include <cpu/p5/io.h>
|
||||
|
||||
static void
|
||||
enter_pnp(void)
|
||||
enter_pnp(struct superio *s)
|
||||
{
|
||||
// unlock it XXX make this a subr at some point
|
||||
outb(0x87, 0x2e);
|
||||
outb(0x01, 0x2e);
|
||||
outb(0x55, 0x2e);
|
||||
outb(0x55, 0x2e);
|
||||
outb(0x87, s->port);
|
||||
outb(0x01, s->port);
|
||||
outb(0x55, s->port);
|
||||
outb(0x55, s->port);
|
||||
}
|
||||
|
||||
static void
|
||||
exit_pnp(void)
|
||||
exit_pnp(struct superio *s)
|
||||
{
|
||||
/* all done. */
|
||||
// select configure control
|
||||
outb(2, 0x2e);
|
||||
outb(2, 0x2f);
|
||||
outb(2, s->port);
|
||||
outb(2, s->port+1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
enable_floppy(void)
|
||||
enable_floppy(struct superio *s)
|
||||
{
|
||||
/* now set the LDN to floppy LDN */
|
||||
outb(0x7, 0x2e); /* pick reg. 7 */
|
||||
outb(0x0, 0x2f); /* LDN 0 to reg. 7 */
|
||||
outb(0x7, s->port); /* pick reg. 7 */
|
||||
outb(0x0, s->port+1); /* LDN 0 to reg. 7 */
|
||||
|
||||
/* now select register 0x30, and set bit 1 in that register */
|
||||
outb(0x30, 0x2e);
|
||||
outb(0x1, 0x2f);
|
||||
outb(0x30, s->port);
|
||||
outb(0x1, s->port+1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
enable_com(int com)
|
||||
enable_com(struct superio *s, int com)
|
||||
{
|
||||
unsigned char b;
|
||||
/* now set the LDN to com LDN */
|
||||
outb(0x7, 0x2e); /* pick reg. 7 */
|
||||
outb(com, 0x2f); /* LDN 1,2 to reg. 7 */
|
||||
outb(0x7, s->port); /* pick reg. 7 */
|
||||
outb(com, s->port+1); /* LDN 1,2 to reg. 7 */
|
||||
|
||||
/* now select register 0x30, and set bit 1 in that register */
|
||||
outb(0x30, 0x2e);
|
||||
outb(0x1, 0x2f);
|
||||
outb(0x30, s->port);
|
||||
outb(0x1, s->port+1);
|
||||
|
||||
/* set CLKIN frequence to 24 MHZ */
|
||||
outb(0x24, 0x2e);
|
||||
b = inb(0x2f) | 0xfd;
|
||||
outb(0x24, 0x2e);
|
||||
outb(b, 0x2f);
|
||||
outb(0x24, s->port);
|
||||
b = inb(s->port+1) | 0xfd;
|
||||
outb(0x24, s->port);
|
||||
outb(b, s->port+1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
enable_lpt(void)
|
||||
enable_lpt(struct superio *s)
|
||||
{
|
||||
/* now set the LDN to floppy LDN */
|
||||
outb(0x7, 0x2e); /* pick reg. 7 */
|
||||
outb(0x3, 0x2f); /* LDN 3 to reg. 7 */
|
||||
outb(0x7, s->port); /* pick reg. 7 */
|
||||
outb(0x3, s->port+1); /* LDN 3 to reg. 7 */
|
||||
|
||||
/* now select register 0x30, and set bit 1 in that register */
|
||||
outb(0x30, 0x2e);
|
||||
outb(0x1, 0x2f);
|
||||
outb(0x30, s->port);
|
||||
outb(0x1, s->port+1);
|
||||
}
|
||||
|
||||
static void
|
||||
finishup(struct superio *s)
|
||||
{
|
||||
enter_pnp();
|
||||
enter_pnp(s);
|
||||
|
||||
// don't fool with IDE just yet ...
|
||||
if (s->floppy)
|
||||
enable_floppy();
|
||||
// don't fool with IDE just yet ...
|
||||
if (s->floppy)
|
||||
enable_floppy(s);
|
||||
|
||||
if (s->com1.enable)
|
||||
enable_com(s, PNP_COM1_DEVICE);
|
||||
if (s->com2.enable)
|
||||
enable_com(s, PNP_COM2_DEVICE);
|
||||
|
||||
if (s->com1.enable)
|
||||
enable_com(PNP_COM1_DEVICE);
|
||||
if (s->com2.enable)
|
||||
enable_com(PNP_COM2_DEVICE);
|
||||
|
||||
if (s->lpt)
|
||||
enable_lpt();
|
||||
|
||||
exit_pnp();
|
||||
if (s->lpt)
|
||||
enable_lpt(s);
|
||||
|
||||
exit_pnp(s);
|
||||
}
|
||||
|
||||
struct superio_control superio_sis_950_control = {
|
||||
|
|
|
|||
|
|
@ -487,6 +487,32 @@ def writeldscript(path):
|
|||
file.close();
|
||||
|
||||
|
||||
# write ldscript
|
||||
def writedoxygenfile(path):
|
||||
global objectrules, doxyscriptbase
|
||||
doxyfilepath = os.path.join(path, "LinuxBIOSDoc.config")
|
||||
print "Trying to create ", doxyfilepath
|
||||
# try:
|
||||
file = open(doxyfilepath, 'w+')
|
||||
# FIXME. Should be computing .c once. Fix this in objectrules.append
|
||||
file.write("INPUT= \\\n")
|
||||
for i in range(len(objectrules)):
|
||||
source = objectrules[i][1]
|
||||
if (source[-2:] != '.c'): # no suffix. Build name.
|
||||
base = objectrules[i][0]
|
||||
base = base[0:len(base)-2]
|
||||
source = os.path.join(objectrules[i][1], base)
|
||||
source = source + ".c"
|
||||
file.write("%s \\\n" % source)
|
||||
|
||||
doxylines = readfile(doxyscriptbase)
|
||||
if (debug):
|
||||
print "DOXYLINES ",doxylines
|
||||
for line in doxylines:
|
||||
file.write(line)
|
||||
file.close();
|
||||
|
||||
|
||||
|
||||
# write the makefile
|
||||
# we're not sure whether to write crt0.S yet. We'll see.
|
||||
|
|
@ -582,6 +608,7 @@ treetop = command_vals['TOP']
|
|||
makebase = os.path.join(treetop, "util/config/make.base")
|
||||
crt0base = os.path.join(treetop, "arch/i386/config/crt0.base")
|
||||
ldscriptbase = os.path.join(treetop, "arch/alpha/config/ldscript.base")
|
||||
doxyscriptbase = os.path.join(treetop, "config/doxyscript.base")
|
||||
|
||||
## now read in the base files.
|
||||
#print "Now Process the base files"
|
||||
|
|
@ -600,3 +627,4 @@ writemakefile(outputdir)
|
|||
writeldscript(outputdir)
|
||||
writecrt0(outputdir)
|
||||
writesuperiofile(outputdir)
|
||||
writedoxygenfile(outputdir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue