public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* omap850 : MMC connected to GPIO ?
@ 2006-08-24 15:41 Anand SVR
  2006-08-28  7:13 ` I2C Remote I/O error Arnold
  0 siblings, 1 reply; 3+ messages in thread
From: Anand SVR @ 2006-08-24 15:41 UTC (permalink / raw)
  To: linux-omap-open-source

Hi,

I am trying to bring up the sd card on my omap850 based pda. The
omap.c code snippet as given below within mmc_omap_power () doesn't
have a check either for omap850 or omap730.  So, the code is falling
off to  omap_set_gpio_dataout() and subsequently the pda is getting
frozen. In the same code, what cpu does omap850 come under ?

I would like to know if the mmc/sd on omap850 connected to GPIO. I am
not finding the relevant datasheet that could answer my doubt. I would
really appreciate if someone could clarify.

Regards
Anand

The code snippet ....


...
  if (machine_is_omap_innovator())
               mmc_omap_power         innovator_fpga_socket_power(0);
                else if (machine_is_omap_h2())
                        tps65010_set_gpio_out_value(GPIO3, LOW);
                else if (machine_is_omap_h3())
                        tps65010_set_gpio_out_value(GPIO4, LOW);
                else if (cpu_is_omap24xx()) {
                        u16 reg = OMAP_MMC_READ(host->base, CON);
                        OMAP_MMC_WRITE(host->base, CON, reg & ~(1 << 11));
                } else if (host->power_pin >= 0)
                                omap_set_gpio_dataout(host->power_pin, 0);
...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* I2C Remote I/O error
  2006-08-24 15:41 omap850 : MMC connected to GPIO ? Anand SVR
@ 2006-08-28  7:13 ` Arnold
  2006-08-28  8:09   ` about gpio w.b.b
  0 siblings, 1 reply; 3+ messages in thread
From: Arnold @ 2006-08-28  7:13 UTC (permalink / raw)
  To: linux-omap-open-source

Hi Guys,

I'm using an omap5912 and would like to write and read
thru i2c.  Below are  the debug msg aswell as the
code. 

Debug msg:
#./i2c_test
(OJ) adapter number = OMAP I2C adapter
i: Remote I/O error
written -1 bytes

Code:

#define I2C_SLAVE     0x0703
#define BUFFER_SIZE   32


int adapter_nr = 0;

int addr = 0x40; /* The I2C address */

sprintf(filename,"/dev/i2c-%d",adapter_nr);
  if ((file = open(filename,O_RDWR)) < 0) {
    printf("Error Opening File\n");
    exit(1);
  }

  if (ioctl(file,I2C_SLAVE,addr) < 0) {
    exit(1);
  }
 
if (write(file,buffer,sizeof(char) * BUFFER_SIZE) < 0)
{
        perror("Error Writing:");
        exit(1);
  }
  printf("written %d bytes\n",i);
  memset(buffer,0,BUFFER_SIZE);

  if(read(file,buffer,sizeof(char) * BUFFER_SIZE) < 0
)     {
        perror("Error Reading:");
        exit(1);
  }
  printf("read %d bytes\n",i);
  for(i=0;i<BUFFER_SIZE;i++)
  {
     printf("%c",buffer[i]);
  }
  printf("\n");

  close(file);

Is there someone who knows what the problem is? 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* about gpio
  2006-08-28  7:13 ` I2C Remote I/O error Arnold
@ 2006-08-28  8:09   ` w.b.b
  0 siblings, 0 replies; 3+ messages in thread
From: w.b.b @ 2006-08-28  8:09 UTC (permalink / raw)
  To: Linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

hi:

 i want to do some work about OMAP5912'GPIO.but I am failed to do that.

 the following is a simple program:

test.c 

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

#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>

#define GPIO3_OUT 0xfffbbc40 /* lp1 */

int main()
{
  /* Get access to the ports */
  
  
  /* Set the data signals (D0-7) of the port to all low (0) */
  outb(0xffff, GPIO3_OUT);
  
  /* Sleep for a while (100 ms) */
  usleep(100000);}-----------------------------------------------------arm-linux-gcc -g test.c -o test.out----------------------------------------------------I run the binary file on the omap:./test.out-----------------------------------------------------but i get the result:segmentation falt!---------------------------------------------------who can provide me with information? if you have done work related with gpio,would you like send me some examplefile?                                   thanks!> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
> 
>

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-28  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-24 15:41 omap850 : MMC connected to GPIO ? Anand SVR
2006-08-28  7:13 ` I2C Remote I/O error Arnold
2006-08-28  8:09   ` about gpio w.b.b

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox