MMC driver re-initialization problem after uboot init

I am writing a custom mmc/SD driver on BB Rev2. I connect via ICE
after board reset and reload my image. My App has only MMC driver
right now and it reinitializes the MMC host (peripheral).

I assume that some initializations is already done by uboot and I have
to de-init or re-init the host.
Which is not working for me.

I enable func and interface clocks, reset the host using SYSCONF and
SYSCTL reset bits, wait for reset complete and then send CMD0, after
that I configure the timeout, data-width(1bit), clock etc and again
send CMD0 (this time enable INIT bit in CON register) but on second
time the command is not completed.

The status register (STAT) is never updated. It reads as 0x0 no
matter how may times we read it, no change. If I skip this step and
clear INIT bit then even the subsequent command(s) fails and no change
in STAT register.

It seems to me that I am unable to correctly re-initialize the host. I
am stuck at this point,
I have also verified my steps against uboot mmc driver init.
Can any body help me out on re-init or point out some source/
literature to verify my steps.

Regards,
Sarfraz

Just follow the way u-boot does.

- Pin Muxing should be done properly
- TPS chipset should be configure for LDOs (power for connector)
- Clocks enabled accordingly
- Then the MMC driver

Are you getting MMC clock,? can you check if the slot is powered?

Regards,
Khasim