ts-7000
[Top] [All Lists]

[ts-7000] Re: Power Management on TS7260

To:
Subject: [ts-7000] Re: Power Management on TS7260
From: "Gonzalo A. de la Vega" <>
Date: Wed, 24 Oct 2007 18:05:16 -0000
--- In  Jim Jackson <> wrote:
>
> 
> 
> 
> On Wed, 24 Oct 2007, Gonzalo A. de la Vega wrote:
> 
> > > I have tried your program and yes, it can change the clock rates
> > > just fine. However I get an I/O error when trying to turn the
> > > ethernet I/F on/off.
> >
> > The Ethernet module is enabled only down to a certain clock speed (I
> > can't remeber which), below which it doesn't work anymore.

Oh! I see, you clearly mean you can change processor speed, but not
switch off the eth. I understood you couldn't switch it off WHEN you
changed the CPU speed :-P

This is a piece of code I use to turn off the ethernet interface:
//CODE BEGINS HERE ---------------------------------------------
// Written by Gonzalo A. de la Vega <>
// based on original code by Technologic Systems - www.embeddedarm.com
// Turns off the eth module to save power
// Note: This is modified code from Technologic Systems with almost
// no original parts from me. Nothing essential anyway.
// compile with: arm-linux-gcc -o eth_off eth_off.c
//

#include<unistd.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<stdio.h>
#include<fcntl.h>
#include<string.h>

int main(int argc, char **argv)
{
   volatile unsigned int *PHDR, *PHDDR, *PHDR2, *PHDDR2, *GPIOBDB;
   int i;
   unsigned char state;
   unsigned char *start;
   int fd = open("/dev/mem", O_RDWR);

   start = mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED,
fd, 0x80840000);
   PHDR = (unsigned int *)(start + 0x40); // port e data
   PHDDR = (unsigned int *)(start + 0x44);// port e direction register

   *PHDDR |= 0x04;                        // all output (just 2 bits)

   *PHDR &= 0xff-0x04;
   
   close(fd);
   return 0;
}
//CODE ENDS HERE ---------------------------------------------



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU