Raspberry Pi: mmcblk

mmcblk

SD/MMC card 는 MMC 서브시스템을 /dev/mmcblk{id} 형식으로 블럭 장치로 사용한다.

dmesg 로 부트 메시지를 보면 SDHCI 인터페이스에 장착한 장치를 확인할 수 있다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[    0.789621] sdhci: Secure Digital Host Controller Interface driver
[ 0.789628] sdhci: Copyright(c) Pierre Ossman
[ 0.789999] sdhost-bcm2835 3f202000.sdhost: could not get clk, deferring probe
[ 0.790252] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.791051] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.791232] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.791461] usbcore: registered new interface driver usbhid
[ 0.791467] usbhid: USB HID core driver
[ 0.792448] vchiq: vchiq_init_state: slot_zero = 0xb6980000, is_master = 0
[ 0.794533] Initializing XFRM netlink socket
[ 0.794566] NET: Registered protocol family 17
[ 0.794724] Key type dns_resolver registered
[ 0.795223] Registering SWP/SWPB emulation handler
[ 0.796192] registered taskstats version 1
[ 0.796681] vc-sm: Videocore shared memory driver
[ 0.796694] [vc_sm_connected_init]: start
[ 0.802967] [vc_sm_connected_init]: end - returning 0
[ 0.809343] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 0.809410] console [ttyAMA0] enabled
[ 0.811406] sdhost: log_buf @ b6913000 (f6913000)
[ 0.889149] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 0.889333] of_cfs_init
[ 0.889478] of_cfs_init: OK
[ 0.890211] Waiting for root device /dev/mmcblk0p2...
[ 0.956566] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.958563] mmc0: new high speed SDHC card at address 59b4
[ 0.959555] mmcblk0: mmc0:59b4 00000 14.9 GiB
[ 0.961428] mmcblk0: p1 p2

메시지에서 보듯 mmc0 장치에 카드가 삽입되기 전에 인터럽트가 없다.

1
2
$ cat /proc/interrupts |grep mmc
86: 393 0 0 0 ARMCTRL-level 88 Edge mmc0

https://developer.toradex.com/knowledge-base/sd-mmc-card-(linux)