Jin | 28 Feb 20:59 2013

AM335x - SD card detection code


Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Gregory Perry | 28 Feb 21:27 2013
Picon

RE: AM335x - SD card detection code

Research CONFIG_BOOT_TRACER

There is also bootchart

both will render an .SVG graphic visualization of the kernel boot process

________________________________________
From: beagleboard@...
[beagleboard@...] on behalf of Jin [jinsuk.seo@...]
Sent: Thursday, February 28, 2013 2:59 PM
To: beagleboard@...
Subject: [beagleboard] AM335x - SD card detection code

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel.

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by
difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is
opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is
inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but
cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and
still looking around. No luck yet.

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me
which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.

--

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@...
For more options, visit https://groups.google.com/groups/opt_out.

Hiremath, Vaibhav | 1 Mar 06:23 2013
Picon

RE: AM335x - SD card detection code

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Jin
Sent: Friday, March 01, 2013 1:29 AM
To: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jin | 1 Mar 16:45 2013

Re: AM335x - SD card detection code

Thanks for the help guys. I also posted on TI forum, and they were able to help me.

I needed to edit those two functions in this file /drivers/mmc/host/omap_hsmmc.c

omap_hsmmc_card_detect()

omap_hsmmc_get_cover_state()

Best regards,

Jin


On Friday, March 1, 2013 12:23:03 AM UTC-5, Hiremath, Vaibhav wrote:

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:beagl... <at> googlegroups.com] On Behalf Of Jin
Sent: Friday, March 01, 2013 1:29 AM
To: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard... <at> googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Yiling Cao | 4 Mar 09:17 2013
Picon

Re: AM335x - SD card detection code

Many possibilities, does uboot take SD card?

On Fri, Mar 1, 2013 at 11:45 PM, Jin <jinsuk.seo <at> morgansolar.com> wrote:
Thanks for the help guys. I also posted on TI forum, and they were able to help me.

I needed to edit those two functions in this file /drivers/mmc/host/omap_hsmmc.c

omap_hsmmc_card_detect()

omap_hsmmc_get_cover_state()

Best regards,

Jin


On Friday, March 1, 2013 12:23:03 AM UTC-5, Hiremath, Vaibhav wrote:

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagl... <at> googlegroups.com [mailto:beagl... <at> googlegroups.com] On Behalf Of Jin


Sent: Friday, March 01, 2013 1:29 AM
To: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org

Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard... <at> googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Hiremath, Vaibhav | 4 Mar 09:19 2013
Picon

RE: AM335x - SD card detection code

What do you mean by “take”?

 

Thanks,

Vaibhav

From: Yiling Cao [mailto:yiling.cao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
Sent: Monday, March 04, 2013 1:48 PM
To: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Hiremath, Vaibhav
Subject: Re: [beagleboard] AM335x - SD card detection code

 

Many possibilities, does uboot take SD card?

On Fri, Mar 1, 2013 at 11:45 PM, Jin <jinsuk.seo <at> morgansolar.com> wrote:

Thanks for the help guys. I also posted on TI forum, and they were able to help me.

 

I needed to edit those two functions in this file /drivers/mmc/host/omap_hsmmc.c

omap_hsmmc_card_detect()

omap_hsmmc_get_cover_state()

Best regards,

Jin


On Friday, March 1, 2013 12:23:03 AM UTC-5, Hiremath, Vaibhav wrote:

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:beagl... <at> googlegroups.com] On Behalf Of Jin


Sent: Friday, March 01, 2013 1:29 AM

To: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org


Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard... <at> googlegroups.com.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Yiling Cao | 4 Mar 10:21 2013
Picon

Re: AM335x - SD card detection code

Can uboot read any SD card? can you boot uboot from SD card?


On Mon, Mar 4, 2013 at 4:19 PM, Hiremath, Vaibhav <hvaibhav-l0cyMroinI0@public.gmane.org> wrote:

What do you mean by “take”?

 

Thanks,

Vaibhav

From: Yiling Cao [mailto:yiling.cao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
Sent: Monday, March 04, 2013 1:48 PM
To: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Hiremath, Vaibhav
Subject: Re: [beagleboard] AM335x - SD card detection code

 

Many possibilities, does uboot take SD card?

On Fri, Mar 1, 2013 at 11:45 PM, Jin <jinsuk.seo <at> morgansolar.com> wrote:

Thanks for the help guys. I also posted on TI forum, and they were able to help me.

 

I needed to edit those two functions in this file /drivers/mmc/host/omap_hsmmc.c

omap_hsmmc_card_detect()

omap_hsmmc_get_cover_state()

Best regards,

Jin


On Friday, March 1, 2013 12:23:03 AM UTC-5, Hiremath, Vaibhav wrote:

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagl... <at> googlegroups.com [mailto:beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Jin


Sent: Friday, March 01, 2013 1:29 AM

To: beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org


Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

 


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Hiremath, Vaibhav | 4 Mar 10:23 2013
Picon

RE: AM335x - SD card detection code

Yes, certainly. That’s the basic feature.

 

The boot sequence would be, ROM è MLO è u-boot.img è uImage

 

Thanks,

Vaibhav

From: Yiling Cao [mailto:yiling.cao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
Sent: Monday, March 04, 2013 2:51 PM
To: Hiremath, Vaibhav
Cc: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [beagleboard] AM335x - SD card detection code

 

Can uboot read any SD card? can you boot uboot from SD card?

 

On Mon, Mar 4, 2013 at 4:19 PM, Hiremath, Vaibhav <hvaibhav-l0cyMroinI0@public.gmane.org> wrote:

What do you mean by “take”?

 

Thanks,

Vaibhav

From: Yiling Cao [mailto:yiling.cao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
Sent: Monday, March 04, 2013 1:48 PM
To: beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Hiremath, Vaibhav
Subject: Re: [beagleboard] AM335x - SD card detection code

 

Many possibilities, does uboot take SD card?

On Fri, Mar 1, 2013 at 11:45 PM, Jin <jinsuk.seo-atnLiRU0LnxloyL29VTzIw@public.gmane.org> wrote:

Thanks for the help guys. I also posted on TI forum, and they were able to help me.

 

I needed to edit those two functions in this file /drivers/mmc/host/omap_hsmmc.c

omap_hsmmc_card_detect()

omap_hsmmc_get_cover_state()

Best regards,

Jin


On Friday, March 1, 2013 12:23:03 AM UTC-5, Hiremath, Vaibhav wrote:

The configuration is present in board-am335xevm.c only,

 

Go inside function “mmc0_init()”, you will find function calls to “setup_pin_mux()”,

For common mmc pins along with write-protect and card-detect mmc pins. You need to

Change AM33XX_PIN_INPUT_PULLUP => AM33XX_PIN_INPUT_PULLDOWN

 

Thanks,

Vaibhav

From: beagl... <at> googlegroups.com [mailto:beagl...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Jin


Sent: Friday, March 01, 2013 1:29 AM

To: beagl... <at> googlegroups.com


Subject: [beagleboard] AM335x - SD card detection code

 

 

Hi all,

I have a custom board that is a modified copy of beaglebone. I am running 3.2.33 kernel. 

My problem is that the kernel doesn't detect the SD Card when its booting. I realized the problem is caused by difference in SD card reader. Beaglebone uses card reader that a card detection switch. The switch is opened (pull-up; hence high) when it is empty, and switch is closed (shorted to ground; low) when card is inserted. In my board, the logic is reversed. I imagined this to be simple modification in the kernel, but cannot find where that card detection config / set-up is. I have looked in board-am335xevm.c file, and still looking around. No luck yet. 

Could someone point me to which file to modify? or Is there a flowchart of kernel file chain that would show me which file/function linux kernel calls?

Best regards,

Jinsuk

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.


For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

 

 

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
 
 


Gmane