All of lore.kernel.org
 help / color / mirror / Atom feed
From: 石洋 <shy828301@126.com>
To: linux-omap-open-source@linux.omap.com
Subject: OMAP2430sdp MMC driver for 2.6.21
Date: Mon, 23 Jul 2007 18:32:02 +0800 (CST)	[thread overview]
Message-ID: <46A483A2.0000A7.03863@bj126app59.126.com> (raw)

Hi folks,

I'm doing on OMAP2430sdp MMC driver for 2.6.21.5. I  based on minimal OMAP2430 patch on this mailing list and ported twl4030 GPIO and virtual busses drivers form 2.6.14.7.  Now kernel works well on my board. I2C also works well on 2.6.21.5, following is I2C log message:

i2c_omap i2c_omap.2: bus 2 rev3.7 at 100 kHz
i2c_omap i2c_omap.1: bus 1 rev3.7 at 100 kHz
TWL4030: TRY attach Slave TWL4030-ID0 on Adapter OMAP I2C adapter[1][1]
TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter[1][1]
TWL4030: TRY attach Slave TWL4030-ID2 on Adapter OMAP I2C adapter[1][1]
TWL4030: TRY attach Slave TWL4030-ID3 on Adapter OMAP I2C adapter[1][1]
TWL4030 Power Companion Active
TWL4030: Driver registration complete.

TWL4030 GPIO Demux: IRQ Range 329 to 338, Initialization Success

 56:          0        INTC  i2c_omap
 57:        130        INTC  i2c_omap

So I ported MMC driver from 2.6.14.7. New driver can initialize host coltroller successfully. It seems power supply, clocks and interrupt work well. Following is MMC log message:

Registering OMAP device 'omap2430-mmc12'. Parent at L3

mmc0: set_ios: clock 0Hz busmode 1 powermode 0 Vdd 0 Bus Width 0

Advanced Linux Sound Architecture Driver Version 1.0.14rc3 (Wed Mar 14 07:25:50 2007 UTC).
mmc0: set_ios: clock 0Hz busmode 1 powermode 1 Vdd 15 Bus Width 0
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 15 Bus Width 0
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 15 Bus Width 0
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 15 Bus Width 0
ALSA device list:

OMAP GPIO switch handler initializing
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 14 Bus Width 0
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 14 Bus Width 0
mmc0: set_ios: clock 400000Hz busmode 1 powermode 2 Vdd 14 Bus Width 0

 72:         74        INTC  serial
 83:        114        INTC  omap2430-mmc1
309:       2302        GPIO  eth0

There is a SD card in slot 1 on my board. But drvier can't detect this card. I printed SYSCTL, CAPA, CUR_CAPA and HCTL registers' values(SYSCTL is e0007. CAPA is 6e10080. CUR_CAPA is 0. HCTL is d00.), they are same as 2.6.14.7. And I enabled debug message for MMC driver. I found driver can send CMD1 command, but CMD1's reponse value always is 0x00ff8000. But according manual, the right reponse value should be 0x80ff8000. So CMD2 is always timeout. Following is the debug message:

...
mmc0: CMD1, argument 0x00300000

, 32-bit response,

Status in IRQ 1

mmc0: Response 00ff8000

mmc0: End request, err 0

mmc0: CMD1, argument 0x00300000

, 32-bit response,

Status in IRQ 1

mmc0: Response 00ff8000

mmc0: End request, err 0

mmc0: CMD2, argument 0x00000000

, 128-bit response, CRC

Status in IRQ 18000

mmc0: Response 00000000 00000000 00000000 00ff8000

mmc0: End request, err 1

mmc0: CMD2, argument 0x00000000

, 128-bit response, CRC

Status in IRQ 18000

mmc0: Response 00000000 00000000 00000000 00ff8000

mmc0: End request, err 1

mmc0: CMD2, argument 0x00000000

, 128-bit response, CRC

Status in IRQ 18000

mmc0: Response 00000000 00000000 00000000 00ff8000

mmc0: End request, err 1

mmc0: CMD2, argument 0x00000000
,  128-bit response, CRC

Status in IRQ 18000

mmc0: Response 00000000 00000000 00000000 00ff8000

mmc0: End request, err 1

mmc0: set_ios: clock 400000Hz busmode 2 powermode 2 Vdd 14 Bus Width 0

mmc0: set_ios: clock 0Hz busmode 1 powermode 0 Vdd 0 Bus Width 0


I suspected the root cause is not in MMC driver, maybe I forgot something else. So could anyone please give me some hints? Thanks.

Best Regards,
Yang Shi

  


《大 话 西 游 3》 首 届 玩 家 见 面 会 即 将 在 广 州 召 开!敬 请 关 注 >> 

             reply	other threads:[~2007-07-23 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 10:32 石洋 [this message]
2007-07-23 22:04 ` OMAP2430sdp MMC driver for 2.6.21 Syed Mohammed, Khasim
  -- strict thread matches above, loose matches on Subject: below --
2007-07-24  2:01 sree
2007-07-24  4:11 ` Syed Mohammed, Khasim
2007-07-25 17:13 石洋
2007-07-25 17:17 ` sree
2007-07-25 19:22   ` andrzej zaborowski
2007-07-26  9:28     ` andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46A483A2.0000A7.03863@bj126app59.126.com \
    --to=shy828301@126.com \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.