Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmc: add TS7800 FPGA based MMC controller driver #9

Open
wants to merge 1 commit into
base: linux-5.10.y
Choose a base branch
from

Conversation

feraralashkar
Copy link

add standard mmc/host controller driver for TS-7800v1

@feraralashkar feraralashkar force-pushed the ts7800v1_sdmmc branch 2 times, most recently from d87a5ac to 48df5ec Compare September 28, 2022 19:26
@feraralashkar feraralashkar force-pushed the ts7800v1_sdmmc branch 2 times, most recently from 9bc0ffe to 004db3a Compare September 28, 2022 20:59
add standard mmc/host controller driver for TS-7800v1

---
$ uname -a
Linux ts-7800 5.10.107 #68 PREEMPT Wed Sep 28 12:18:16 EDT 2022 armv5tel GNU/Linux
$

$ insmod /tmp/ts7800v1_sdmmc.ko
ts7800v1_sdmmc ts7800v1_sdmmc: Detected SDCoreV2
ts7800v1_sdmmc ts7800v1_sdmmc: TS-7800v1 FPGA based SD/MMC Controller initialized
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SS32G 29.7 GiB
 mmcblk0: p1 p2 p3

$ fdisk -lu
Disk /dev/mmcblk0: 30 GB, 31914983424 bytes, 62333952 sectors
973968 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1    0,0,2       8,40,33              1     131072     131072 64.0M da Unknown
/dev/mmcblk0p2    8,40,34     8,137,9         131073     137159       6087 3043K da Unknown
/dev/mmcblk0p3    8,137,10    73,206,13       137160    1185735    1048576  512M 83 Linux
$

$ mkfs.ext4 -L misc /dev/mmcblk0p3
mke2fs 1.46.5 (30-Dec-2021)
/dev/mmcblk0p3 contains a ext4 file system labelled 'misc'
	last mounted on Wed Sep 28 20:41:59 2022
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 131072 4k blocks and 32768 inodes
Filesystem UUID: b5d4dd82-1ec1-4b91-8a22-e80ffbc061a1
Superblock backups stored on blocks:
	32768, 98304

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

$ mount /dev/mmcblk0p3 /mnt/
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
$

$ ls -lsrt /mnt/
total 16
    16 drwx------    2 root     root         16384 Sep 28 20:46 lost+found
$ cp /lib/libm.so.6 /mnt/
$ sync

$ md5sum /mnt/libm.so.6 /lib/libm.so.6
b11e580b6be20fdcd224e366dc897068  /mnt/libm.so.6
b11e580b6be20fdcd224e366dc897068  /lib/libm.so.6

$ sync
$ umount /mnt/
$
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant