Re: Success!

"Bruce D. Lightner" <lightner-2huV/[email protected]>
Newsgroups gmane.linux.uclinux.actiontec
Message-ID <[email protected]>
Craig Hollabaugh wrote:

> On Fri, Mar 19, 2004 at 06:52:07PM -0800, Bruce D. Lightner wrote:
> 
>>You may be interested to know that I've built a working uClinux kernel for 
>>my Actiontec Dual PC modem using 100% GPL source code.  The kernel appears 
>>to be stable and is running on the unmodified "stock" Actiontec ROM file 
>>system.  (OK...I did add "set -v" to the beginning of the file "/etc/rc".)
> 
> what happened? did you get a working .config file?

Of course.  However, it wasn't that simple.  Please stand by for details...

Other discoveries:

(1) The modem seems to behave like a some kind of Rockwell
     data/FAX/Voice "Soft Modem".  The following manual seems
     to apply...

         http://www.lightner.net/ActionTec/Rockwell56kSoft.pdf

     I'd say that is very interesting.  I'm working on getting
     the voice mode to work.

(2) The loaded up the Dhrystone benchmark and ran it...

   MACHINE      MICROPROCESSOR  OS            COMPILER    DHRY/SEC
   -----------  --------------  ------------  ----------  --------
   Dell laptop  P4-1.6GHz       Vmware/Linux  gcc 2.96     1544760
   Actiontec    Conexant ARM9   uClinux       gcc 2.95.3     89047
   Amdahl 580   -               UTS 5.0 r1.2  cc v1.5        23076
   Sun 3/180    68020-16.67MHz  Sun 4.2       cc              3333
   VAX 11/780   -               UNIX 5.2      cc              1515
   IBM PC/AT    80286-6MHz      PCDOS 3.0     CI-C86 2.1       666
   IBM PC/XT    8088-4.77MHz    PC/IX         cc               257

    I'm impressed!  (Remember that a VAX 780 was defined to be "1 MIPS".)

(3) The UART on my "home grown" development PCB has 4 extra digital
     inputs and 4 extra digital outputs...mostly the unused
     "modem control lines".  You can access them via any "user
     mode" program...no kernel driver required.  You can find my "pio"
     test program at the end of this message.

     I found that one can toggle the UART output bits OUT1 and OUT2
     at a rate of 3 MHz.  A couple of resistors and a diode should
     give you a nice "bit-banged" I2C port, or a bit-banged SPI
     port with no extra parts.  I think I'll hook an MP3 player
     chip up to it! :-)  See...

            http://www.myplace.nu/mp3/index2.htm

      ...and especially this more or less "glueless" MP3 decoder IC...

            http://www.myplace.nu/mp3/files/vs1001.pdf

So many possibilities, so little time!

It note that most of the stuff I want to do does not require
re-compiling the stock Actiontec kernel, just altering the ROM
file system...which is easy.

Best regards,

Bruce

-- 
  Bruce D. Lightner
  Lightner Engineering
  La Jolla, California
  Voice: +1-858-551-4011
  FAX: +1-858-551-0777
  Email: lightner-2huV/[email protected]
  URL: http://www.lightner.net/lightner/bruce/

----------------------------------------------------------------------------

/*
  *      pio.c -- UART PIO Test Program
  *
  *      (C) Copyright 2004, Bruce D. Lightner ([email protected])
  */

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

#define UART0_Base_Addr    0x002C0000

struct uart_regs
{
    volatile unsigned short  fifo;
    volatile unsigned short  irqe;
    volatile unsigned short  iir;
    volatile unsigned short  line_ctrl;
    volatile unsigned short  modem_ctrl;
    volatile unsigned short  line_status_reg;
    volatile unsigned short  msr;
    volatile unsigned short  scratch;
};

#define OUT1 2
#define OUT2 3

#define BIT(n) (1 << (n))

struct uart_regs *regs = (struct uart_regs*)UART0_Base_Addr;

void show_regs(void)
{
         printf("\nUART registers:\n"
                  "---------------\n");
         printf("UART base =       0x%08x\n", (unsigned long)regs);
         printf("fifo =            0x%02x\n", regs->fifo & 0xff);
         printf("irqe =            0x%02x\n", regs->irqe & 0xff);
         printf("iir =             0x%02x\n", regs->iir & 0xff);
         printf("line_ctrl =       0x%02x\n", regs->line_ctrl & 0xff);
         printf("modem_ctrl =      0x%02x\n", regs->modem_ctrl & 0xff);
         printf("line_status_reg = 0x%02x\n", regs->line_status_reg & 0xff);
         printf("msr =             0x%02x\n", regs->msr & 0xff);
         printf("scratch =         0x%02x\n", regs->scratch & 0xff);
}

int main(int argc, char *argv[])
{
         long i;

         show_regs();
         regs->scratch = 0x00;
         regs->modem_ctrl ^= BIT(OUT1) | BIT(OUT2);
         show_regs();

         // toggle rate test
         for (i = 0; i < 10000000L; ++i)
                  regs->modem_ctrl ^=  BIT(OUT1) | BIT(OUT2);
         printf("done...\n");
         exit(0);
}



__
ActionHack Mailing List - ActionHack-W7/[email protected]
http://www.express.org/mailman/listinfo/actionhack
http://www.embeddedlinuxinterfacing.com/wiki.php/ActiontecDualModem
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.