Hi all,
iam trying to configure spi registers before spi read and write operation in my init module. iam writing some values to spi control registers, but after this when iam reading values from these registers iam getting 0x0 only.what will be the problem? iam attaching the steps iam doing (memory mapped i/o) before writing.
################################################## ######################
/*
* Mapping spi registers
*/
ret_s = check_mem_region (S3C2410_SPI0_BASE, S3C2410_SPI_SIZE);
if (ret_s < 0)
{
printk ("<1>address range for spi is not available\n");
goto err_no_iomapS;
}
else
{

request_mem_region (S3C2410_SPI0_BASE, S3C2410_SPI_SIZE, "SPI");
hw->regsS = ioremap (S3C2410_SPI0_BASE, /*S3C2410_SPI_SIZE*/ 0xff*4);
printk("<1>virtual_addr_base_SPI0=%p\n",hw->regsS);
if (hw->regsS == NULL)
{
printk ("<1>Cannot map IO for SPI\n");
err = -ENXIO;
goto err_no_iomapS;
}
writeb(0x0E,hw->regsS);
regval = readb(hw->regsS);
printk("CON1 after writing = %x\r\n", regval); /*am getting zero only,write is not happening

################################################## ########################

whether i need to do any extra steps , iam not doing any operation from application level and so am not registering to core.
just i need to read and write something from low level itself.
please help me to solve this problem.


Thanks in advance,
Sunil.