ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* Re: [PATCH] RISC-V: Define pgprot_dmacoherent() for non-coherent devices
       [not found] <20250820152316.1012757-1-apatel@ventanamicro.com>
@ 2026-05-09 11:56 ` Vadim Akimov
  0 siblings, 0 replies; only message in thread
From: Vadim Akimov @ 2026-05-09 11:56 UTC (permalink / raw)
  To: Anup Patel
  Cc: Rafael J . Wysocki, Sunil V L, Palmer Dabbelt, Paul Walmsley,
	Alexandre Ghiti, Atish Patra, Andrew Jones, Anup Patel,
	linux-riscv, linux-kernel, linux-sunxi

Hi,

On Wed, Aug 20, 2025 at 08:53:16PM +0530, Anup Patel wrote:

> The pgprot_dmacoherent() is used when allocating memory for
> non-coherent devices and by default pgprot_dmacoherent() is
> same as pgprot_noncached() unless architecture overrides it.
 
> diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
> index 91697fbf1f90..00d8bdaf1e8d 100644
> --- a/arch/riscv/include/asm/pgtable.h
> +++ b/arch/riscv/include/asm/pgtable.h

> +#define pgprot_dmacoherent pgprot_writecombine

This single-line patch, as implemented in commit 00b58d2c25d10fecffbebaa0c369fc9d0a6de397 for 6.6.y,
breaks allwinner D1 SDcard handling:

[    0.000000] Linux version 6.6.115 (surfin@nedoserver) (riscv64-unknown-linux-gnu-gcc () 11.3.0, GNU ld (GNU Binutils) 2.38) #1 Tue May  5 10:25:47 MSK 2026

[    4.886823] sunxi-mmc 4020000.mmc: Got CD GPIO
[    4.893625] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[    4.941711] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    4.958033] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    4.990692] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[    5.009712] mmc1: new high speed SDIO card at address 0001

then following never happens with that patch, i.e. no SD card is found.

#[    5.109896] mmc0: new high speed SDHC card at address 0001
#[    5.116546] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
#[    5.128887]  mmcblk0: p1 p2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-09 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250820152316.1012757-1-apatel@ventanamicro.com>
2026-05-09 11:56 ` [PATCH] RISC-V: Define pgprot_dmacoherent() for non-coherent devices Vadim Akimov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox