Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Octeon MMC driver



On 19/03/2026 11:35, Kevin Bowling wrote:
> Hi,
> I have ported OpenBSD's Octeon MMC driver to NetBSD here:
> https://people.freebsd.org/~kbowling/oct_mmc.patch

Cool. Thanks for working on this.

> It seems stable with light testing and is now self booting on my ER4:
> Octeon ubnt_e100# set bootcmd 'fatload mmc 0 $loadaddr
> netbsd;bootoctlinux $loadaddr coremask=0x3 root=wedge:octeon-root'
> Octeon ubnt_e100# saveenv
> I would be curious if it works for others and if the code can be
> improved as I am not deeply familiar with Net or Open internals.
> There is a lag when attaching, which I suspect is caused by an SDIO
> check that could be improved.

Some comments…

The cache lock workaround is “interesting”


Don’t use splsdmmc, but instead use your sc_intr_mtx mutex or remove the splsdmmc calls.

Something like the attached.

I guess you’re getting your DTB from a vendor distribution?


~/netbsd/nbcvs/src % grep -r  "cavium,octeon-[0-9]*-mmc" sys/external/gpl2/dts/dist
~/netbsd/nbcvs/src %

You should provide patches to

    sys/arch/mips/dts

See sys/arch/arm/dts for example how a board’s dts is changed compared
to the Linux mainline upstream

Nick

Attachment: octeon_mmc.c.diff
Description: Binary data






Home | Main Index | Thread Index | Old Index