Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af2c80e9 authored by ?'s avatar ? Committed by Thomas Gleixner
Browse files

[MTD] ms02-nv: Fix 64bit operation



Replace KSEG1ADDR() with CKSEG1ADDR() as the former does not work for
64-bit configurations anymore.

Signed-off-by: default avatarMaciej W. Rozycki <macro@infradead.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent a4f957f1
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -6,7 +6,7 @@
 *	as published by the Free Software Foundation; either version
 *	as published by the Free Software Foundation; either version
 *	2 of the License, or (at your option) any later version.
 *	2 of the License, or (at your option) any later version.
 *
 *
 *	$Id: ms02-nv.c,v 1.8 2005/01/05 18:05:12 dwmw2 Exp $
 *	$Id: ms02-nv.c,v 1.10 2005/06/20 12:24:41 macro Exp $
 */
 */


#include <linux/init.h>
#include <linux/init.h>
@@ -99,8 +99,8 @@ static inline uint ms02nv_probe_one(ulong addr)
	 * The firmware writes MS02NV_ID at MS02NV_MAGIC and also
	 * The firmware writes MS02NV_ID at MS02NV_MAGIC and also
	 * a diagnostic status at MS02NV_DIAG.
	 * a diagnostic status at MS02NV_DIAG.
	 */
	 */
	ms02nv_diagp = (ms02nv_uint *)(KSEG1ADDR(addr + MS02NV_DIAG));
	ms02nv_diagp = (ms02nv_uint *)(CKSEG1ADDR(addr + MS02NV_DIAG));
	ms02nv_magicp = (ms02nv_uint *)(KSEG1ADDR(addr + MS02NV_MAGIC));
	ms02nv_magicp = (ms02nv_uint *)(CKSEG1ADDR(addr + MS02NV_MAGIC));
	err = get_dbe(ms02nv_magic, ms02nv_magicp);
	err = get_dbe(ms02nv_magic, ms02nv_magicp);
	if (err)
	if (err)
		return 0;
		return 0;
@@ -233,7 +233,7 @@ static int __init ms02nv_init_one(ulong addr)
		goto err_out_csr_res;
		goto err_out_csr_res;
	}
	}


	printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %uMiB.\n",
	printk(KERN_INFO "mtd%d: %s at 0x%08lx, size %zuMiB.\n",
		mtd->index, ms02nv_name, addr, size >> 20);
		mtd->index, ms02nv_name, addr, size >> 20);


	mp->next = root_ms02nv_mtd;
	mp->next = root_ms02nv_mtd;