Hi,
     I want to use IRQ_DM355_GPIO6 interrupt, I configure the GPIO6 pin so that 
it generates an interrupt only at falling edge.
    Below is my code:

long status;
poweron_gpio();

//set bit in BINTEN:: BANK0 , GPIO pin no. 6.
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x08));
printk("[Viet]::BINTEN = %x", status);
status |= 0x01;
__raw_writel( status, (( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x08)));
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x08));
printk("\tBINTEN = %x\n", status);
    
// clear raising edge of GPIO6
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x28));
printk("[Viet]::CLR_RIS_TRIG01 = %x", status);
status |= 0x00000040;
printk("\tCLR_RIS_TRIG01 = %x", status);
__raw_writel( status, (( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x28)));
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x28));
printk("\tCLR_RIS_TRIG01 = %x\n", status);

// set falling edge of GPIO6
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x2C));
printk("[Viet]::SET_FAL_TRIG01 = %x", status);
status |= 0x40;
printk("\tSET_FAL_TRIG01 = %x", status);
__raw_writel( status, (( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x2C)));
status = __raw_readl(( void* __iomem)IO_ADDRESS( GPIO_BASE + 0x2C));
printk("\tSET_FAL_TRIG01 = %x\n", status);

And here are the messages during kernel's boot:
.......... 
[Viet]::BINTEN = 1      BINTEN = 1
[Viet]::CLR_RIS_TRIG01 = 2      CLR_RIS_TRIG01 = 42     CLR_RIS_TRIG01 = 0
[Viet]::SET_FAL_TRIG01 = 0      SET_FAL_TRIG01 = 40     SET_FAL_TRIG01 = 40
..........
 At the 2nd line, you can see the code cannot write 0x42 to CLR_RIS_TRIG01 
register, it even clears that register to 0x0, that clears the raising edge 
ethernet interrupt and causes the DHCP's failure then
(
eth0: link down
Sending DHCP requests .<6>eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
..<6>NETDEV WATCHDOG: eth0: transmit timed out
.<6>NETDEV WATCHDOG: eth0: transmit timed out
)
   Do you know why? Please give me an advice.
Thanks,
Viet Hoang.

 Send instant messages to your online friends http://uk.messenger.yahoo.com 
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to