Commit d0669b55 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by David Woodhouse

MTD updates for __iomem

Signed-Off-By: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-Off-By: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 8331cf0a
/*
* $Id: arctic-mtd.c,v 1.11 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: arctic-mtd.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $
*
* drivers/mtd/maps/arctic-mtd.c MTD mappings and partition tables for
* IBM 405LP Arctic boards.
......@@ -98,7 +98,7 @@ init_arctic_mtd(void)
{
printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
arctic_mtd_map.virt = (unsigned long) ioremap(PADDR, SIZE);
arctic_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE);
if (!arctic_mtd_map.virt) {
printk("%s: failed to ioremap 0x%x\n", NAME, PADDR);
......
......@@ -2,7 +2,7 @@
* NV-RAM memory access on autcpu12
* (C) 2002 Thomas Gleixner (gleixner@autronix.de)
*
* $Id: autcpu12-nvram.c,v 1.6 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: autcpu12-nvram.c,v 1.7 2004/09/16 23:27:12 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -47,7 +47,7 @@ static int __init init_autcpu12_sram (void)
{
int err, save0, save1;
autcpu12_sram_map.virt = (unsigned long)ioremap(0x12000000, SZ_128K);
autcpu12_sram_map.virt = (void __iomem *)ioremap(0x12000000, SZ_128K);
if (!autcpu12_sram_map.virt) {
printk("Failed to ioremap autcpu12 NV-RAM space\n");
err = -EIO;
......@@ -76,7 +76,7 @@ static int __init init_autcpu12_sram (void)
/* We have a 128K found, restore 0x10000 and set size
* to 128K
*/
ma[_write32(&autcpu12_sram_map,save1,0x10000);
map_write32(&autcpu12_sram_map,save1,0x10000);
autcpu12_sram_map.size = SZ_128K;
map:
......
/*
* $Id: beech-mtd.c,v 1.8 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: beech-mtd.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $
*
* drivers/mtd/maps/beech-mtd.c MTD mappings and partition tables for
* IBM 405LP Beech boards.
......@@ -74,7 +74,7 @@ init_beech_mtd(void)
{
printk("%s: 0x%08x at 0x%08x\n", NAME, SIZE, PADDR);
beech_mtd_map.virt = (unsigned long) ioremap(PADDR, SIZE);
beech_mtd_map.virt = (void __iomem *) ioremap(PADDR, SIZE);
if (!beech_mtd_map.virt) {
printk("%s: failed to ioremap 0x%x\n", NAME, PADDR);
......
/*
* Flash on Cirrus CDB89712
*
* $Id: cdb89712.c,v 1.8 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: cdb89712.c,v 1.9 2004/09/16 23:27:12 gleixner Exp $
*/
#include <linux/module.h>
......@@ -44,7 +44,7 @@ static int __init init_cdb89712_flash (void)
goto out;
}
cdb89712_flash_map.virt = (unsigned long)ioremap(FLASH_START, FLASH_SIZE);
cdb89712_flash_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE);
if (!cdb89712_flash_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 FLASH space\n");
err = -EIO;
......@@ -114,7 +114,7 @@ static int __init init_cdb89712_sram (void)
goto out;
}
cdb89712_sram_map.virt = (unsigned long)ioremap(SRAM_START, SRAM_SIZE);
cdb89712_sram_map.virt = (void __iomem *)ioremap(SRAM_START, SRAM_SIZE);
if (!cdb89712_sram_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 SRAM space\n");
err = -EIO;
......@@ -182,7 +182,7 @@ static int __init init_cdb89712_bootrom (void)
goto out;
}
cdb89712_bootrom_map.virt = (unsigned long)ioremap(BOOTROM_START, BOOTROM_SIZE);
cdb89712_bootrom_map.virt = (void __iomem *)ioremap(BOOTROM_START, BOOTROM_SIZE);
if (!cdb89712_bootrom_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Cdb89712 BootROM space\n");
err = -EIO;
......
......@@ -11,7 +11,7 @@
*
* (C) 2000 Nicolas Pitre <nico@cam.org>
*
* $Id: ceiva.c,v 1.10 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $
*/
#include <linux/config.h>
......@@ -103,7 +103,7 @@ struct clps_info {
unsigned long base;
unsigned long size;
int width;
void __iomem *vbase;
void *vbase;
struct map_info *map;
struct mtd_info *mtd;
struct resource *res;
......@@ -150,7 +150,7 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info
break;
}
clps[i].map->virt = clps[i].vbase;
clps[i].map->virt = (void __iomem *)clps[i].vbase;
clps[i].map->bankwidth = clps[i].width;
clps[i].map->size = clps[i].size;
......
/*
* Copyright 2001 Flaga hf. Medical Devices, Kri Davsson <kd@flaga.is>
*
* $Id: cfi_flagadm.c,v 1.12 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: cfi_flagadm.c,v 1.13 2004/09/16 23:27:12 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
......@@ -96,7 +96,7 @@ int __init init_flagadm(void)
FLASH_SIZE, FLASH_PHYS_ADDR);
flagadm_map.phys = FLASH_PHYS_ADDR;
flagadm_map.virt = (unsigned long)ioremap(FLASH_PHYS_ADDR,
flagadm_map.virt = (void __iomem *s)ioremap(FLASH_PHYS_ADDR,
FLASH_SIZE);
if (!flagadm_map.virt) {
......
/*
* $Id: cstm_mips_ixx.c,v 1.10 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: cstm_mips_ixx.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $
*
* Mapping of a custom board with both AMD CFI and JEDEC flash in partitions.
* Config with both CFI and JEDEC device support.
......@@ -170,7 +170,7 @@ int __init init_cstm_mips_ixx(void)
cstm_mips_ixx_map[i].phys = cstm_mips_ixx_board_desc[i].window_addr;
cstm_mips_ixx_map[i].virt = (unsigned long)ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size);
cstm_mips_ixx_map[i].virt = (void __iomem *)ioremap(cstm_mips_ixx_board_desc[i].window_addr, cstm_mips_ixx_board_desc[i].window_size);
if (!cstm_mips_ixx_map[i].virt) {
printk(KERN_WARNING "Failed to ioremap\n");
return -EIO;
......
/*
* $Id: dbox2-flash.c,v 1.11 2004/07/12 21:59:43 dwmw2 Exp $
* $Id: dbox2-flash.c,v 1.12 2004/09/16 23:27:12 gleixner Exp $
*
* D-Box 2 flash driver
*/
......@@ -75,7 +75,7 @@ struct map_info dbox2_flash_map = {
int __init init_dbox2_flash(void)
{
printk(KERN_NOTICE "D-Box 2 flash driver (size->0x%X mem->0x%X)\n", WINDOW_SIZE, WINDOW_ADDR);
dbox2_flash_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
dbox2_flash_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!dbox2_flash_map.virt) {
printk("Failed to ioremap\n");
......
......@@ -5,7 +5,7 @@
*
* This code is GPL
*
* $Id: dc21285.c,v 1.20 2004/07/12 22:38:29 dwmw2 Exp $
* $Id: dc21285.c,v 1.21 2004/09/16 23:27:13 gleixner Exp $
*/
#include <linux/config.h>
#include <linux/module.h>
......@@ -175,7 +175,7 @@ static int __init init_dc21285(void)
dc21285_map.bankwidth*8);
/* Let's map the flash area */
dc21285_map.map_priv_1 = (unsigned long)ioremap(DC21285_FLASH, 16*1024*1024);
dc21285_map.map_priv_1 = (void __iomem *)ioremap(DC21285_FLASH, 16*1024*1024);
if (!dc21285_map.map_priv_1) {
printk("Failed to ioremap\n");
return -EIO;
......
......@@ -14,7 +14,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* $Id: dilnetpc.c,v 1.13 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: dilnetpc.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $
*
* The DIL/Net PC is a tiny embedded PC board made by SSV Embedded Systems
* featuring the AMD Elan SC410 processor. There are two variants of this
......@@ -403,7 +403,7 @@ static int __init init_dnpc(void)
printk(KERN_NOTICE "DIL/Net %s flash: 0x%lx at 0x%lx\n",
is_dnp ? "DNPC" : "ADNP", dnpc_map.size, dnpc_map.phys);
dnpc_map.virt = (unsigned long)ioremap_nocache(dnpc_map.phys, dnpc_map.size);
dnpc_map.virt = (void __iomem *)ioremap_nocache(dnpc_map.phys, dnpc_map.size);
dnpc_map_flash(dnpc_map.phys, dnpc_map.size);
......
......@@ -4,7 +4,7 @@
*
* Flash map driver for the Dy4 SVME182 board
*
* $Id: dmv182.c,v 1.3 2004/07/14 17:45:40 dwmw2 Exp $
* $Id: dmv182.c,v 1.4 2004/09/16 23:27:13 gleixner Exp $
*
* Copyright 2003-2004, TimeSys Corporation
*
......@@ -104,7 +104,7 @@ static int __init init_svme182(void)
partitions = svme182_partitions;
svme182_map.virt =
(unsigned long)ioremap(FLASH_BASE_ADDR, svme182_map.size);
(void __iomem *)ioremap(FLASH_BASE_ADDR, svme182_map.size);
if (svme182_map.virt == 0) {
printk("Failed to ioremap FLASH memory area.\n");
......
/*
* $Id: edb7312.c,v 1.11 2004/07/14 09:52:55 dwmw2 Exp $
* $Id: edb7312.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $
*
* Handle mapping of the NOR flash on Cogent EDB7312 boards
*
......@@ -71,19 +71,19 @@ static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
#endif
static int mtd_parts_nb;
static struct mtd_partition *mtd_parts;
static int mtd_parts_nb = 0;
static struct mtd_partition *mtd_parts = 0;
int __init init_edb7312nor(void)
{
static const char *rom_probe_types[] = PROBETYPES;
const char **type;
const char *part_type = NULL;
const char *part_type = 0;
printk(KERN_NOTICE MSG_PREFIX "0x%08x at 0x%08x\n",
WINDOW_SIZE, WINDOW_ADDR);
edb7312nor_map.virt = (unsigned long)
ioremap(WINDOW_ADDR, WINDOW_SIZE);
edb7312nor_map.virt = (void __iomem *)
ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!edb7312nor_map.virt) {
printk(MSG_PREFIX "failed to ioremap\n");
......@@ -92,7 +92,7 @@ int __init init_edb7312nor(void)
simple_map_init(&edb7312nor_map);
mymtd = NULL;
mymtd = 0;
type = rom_probe_types;
for(; !mymtd && *type; type++) {
mymtd = do_map_probe(*type, &edb7312nor_map);
......
......@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
$Id: elan-104nc.c,v 1.21 2004/07/12 22:38:29 dwmw2 Exp $
$Id: elan-104nc.c,v 1.22 2004/09/16 23:27:13 gleixner Exp $
The ELAN-104NC has up to 8 Mibyte of Intel StrataFlash (28F320/28F640) in x16
mode. This drivers uses the CFI probe and Intel Extended Command Set drivers.
......@@ -53,7 +53,7 @@ always fail. So we don't do it. I just hope it doesn't break anything.
#define PAGE_IO_SIZE 2
static volatile int page_in_window = -1; // Current page in window.
static unsigned long iomapadr;
static void __iomem *iomapadr;
static spinlock_t elan_104nc_spin = SPIN_LOCK_UNLOCKED;
/* partition_info gives details on the logical partitions that the split the
......@@ -190,7 +190,7 @@ int __init init_elan_104nc(void)
/* Urg! We use I/O port 0x22 without request_region()ing it,
because it's already allocated to the PIC. */
iomapadr = (unsigned long)ioremap(WINDOW_START, WINDOW_LENGTH);
iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) {
printk( KERN_ERR"%s: failed to ioremap memory region\n",
elan_104nc_map.name );
......
......@@ -5,7 +5,7 @@
* Copyright (C) 2001 Altera Corporation
* Copyright (C) 2001 Red Hat, Inc.
*
* $Id: epxa10db-flash.c,v 1.11 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: epxa10db-flash.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -62,7 +62,7 @@ static int __init epxa_mtd_init(void)
printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START);
epxa_map.virt = (unsigned long)ioremap(FLASH_START, FLASH_SIZE);
epxa_map.virt = (void __iomem *)ioremap(FLASH_START, FLASH_SIZE);
if (!epxa_map.virt) {
printk("Failed to ioremap %s flash\n",BOARD_NAME);
return -EIO;
......
/* fortunet.c memory map
*
* $Id: fortunet.c,v 1.7 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: fortunet.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $
*/
#include <linux/module.h>
......@@ -210,7 +210,7 @@ int __init init_fortunet(void)
map_regions[ix].map_info.phys = map_regions[ix].window_addr_physical,
map_regions[ix].map_info.virt =
(int)ioremap_nocache(
(void __iomem *)ioremap_nocache(
map_regions[ix].window_addr_physical,
map_regions[ix].map_info.size);
if(!map_regions[ix].map_info.virt)
......
......@@ -2,7 +2,7 @@
* Flash memory access on Hynix GMS30C7201/HMS30C7202 based
* evaluation boards
*
* $Id: h720x-flash.c,v 1.9 2004/07/14 17:45:40 dwmw2 Exp $
* $Id: h720x-flash.c,v 1.10 2004/09/16 23:27:13 gleixner Exp $
*
* (C) 2002 Jungjun Kim <jungjun.kim@hynix.com>
* 2003 Thomas Gleixner <tglx@linutronix.de>
......@@ -73,7 +73,7 @@ int __init h720x_mtd_init(void)
char *part_type = NULL;
h720x_map.virt = (unsigned long)ioremap(FLASH_PHYS, FLASH_SIZE);
h720x_map.virt = (void __iomem *)ioremap(FLASH_PHYS, FLASH_SIZE);
if (!h720x_map.virt) {
printk(KERN_ERR "H720x-MTD: ioremap failed\n");
......
/*
* $Id: impa7.c,v 1.11 2004/07/14 09:52:55 dwmw2 Exp $
* $Id: impa7.c,v 1.12 2004/09/16 23:27:13 gleixner Exp $
*
* Handle mapping of the NOR flash on implementa A7 boards
*
......@@ -77,7 +77,7 @@ int __init init_impa7(void)
{
static const char *rom_probe_types[] = PROBETYPES;
const char **type;
const char *part_type = NULL;
const char *part_type = 0;
int i;
static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = {
{ WINDOW_ADDR0, WINDOW_SIZE0 },
......@@ -91,7 +91,7 @@ int __init init_impa7(void)
pt[i].size, pt[i].addr);
impa7_map[i].phys = pt[i].addr;
impa7_map[i].virt = (unsigned long)
impa7_map[i].virt = (void __iomem *)
ioremap(pt[i].addr, pt[i].size);
if (!impa7_map[i].virt) {
printk(MSG_PREFIX "failed to ioremap\n");
......@@ -99,7 +99,7 @@ int __init init_impa7(void)
}
simple_map_init(&impa7_map[i]);
impa7_mtd[i] = NULL;
impa7_mtd[i] = 0;
type = rom_probe_types;
for(; !impa7_mtd[i] && *type; type++) {
impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]);
......
......@@ -22,7 +22,7 @@
This is access code for flashes using ARM's flash partitioning
standards.
$Id: integrator-flash.c,v 1.16 2004/07/12 21:59:44 dwmw2 Exp $
$Id: integrator-flash.c,v 1.17 2004/09/16 23:27:13 gleixner Exp $
======================================================================*/
......@@ -110,7 +110,7 @@ static int armflash_probe(struct device *_dev)
info->map.size = size;
info->map.bankwidth = plat->width;
info->map.phys = res->start;
info->map.virt = (unsigned long) base;
info->map.virt = (void __iomem *) base;
info->map.name = dev->dev.bus_id;
info->map.set_vpp = armflash_set_vpp;
......
/*
* $Id: iq80310.c,v 1.18 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: iq80310.c,v 1.19 2004/09/16 23:27:13 gleixner Exp $
*
* Mapping for the Intel XScale IQ80310 evaluation board
*
......@@ -68,7 +68,7 @@ static int __init init_iq80310(void)
int parsed_nr_parts = 0;
int ret;
iq80310_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
iq80310_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!iq80310_map.virt) {
printk("Failed to ioremap\n");
return -EIO;
......
/*
* $Id: ixp2000.c,v 1.1 2004/09/02 00:13:41 dsaxena Exp $
* $Id: ixp2000.c,v 1.3 2004/09/16 23:27:13 gleixner Exp $
*
* drivers/mtd/maps/ixp2000.c
*
......@@ -14,7 +14,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*
*/
#include <linux/module.h>
......@@ -44,8 +44,8 @@ struct ixp2000_flash_info {
};
static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long ofs)
{
unsigned long (*set_bank)(unsigned long) =
{
unsigned long (*set_bank)(unsigned long) =
(unsigned long(*)(unsigned long))map->map_priv_2;
return (set_bank ? set_bank(ofs) : ofs);
......@@ -53,15 +53,15 @@ static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long
#ifdef __ARMEB__
/*
* Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which
* causes the lower address bits to be XORed with 0x11 on 8 bit accesses
* and XORed with 0x10 on 16 bit accesses. See the spec update, erratta 44.
* Rev A0 and A1 of IXP2400 silicon have a broken addressing unit which
* causes the lower address bits to be XORed with 0x11 on 8 bit accesses
* and XORed with 0x10 on 16 bit accesses. See the spec update, erratum 44.
*/
static int errata44_workaround = 0;
static int erratum44_workaround = 0;
static inline unsigned long address_fix8_write(unsigned long addr)
{
if (errata44_workaround) {
if (erratum44_workaround) {
return (addr ^ 3);
}
return addr;
......@@ -88,7 +88,7 @@ static void ixp2000_flash_copy_from(struct map_info *map, void *to,
unsigned long from, ssize_t len)
{
from = flash_bank_setup(map, from);
while(len--)
while(len--)
*(__u8 *) to++ = *(__u8 *)(map->map_priv_1 + from++);
}
......@@ -127,8 +127,8 @@ static int ixp2000_flash_remove(struct device *_dev)
if (info->map.map_priv_1)
iounmap((void *) info->map.map_priv_1);
if (info->partitions)
kfree(info->partitions);
if (info->partitions) {
kfree(info->partitions); }
if (info->res) {
release_resource(info->res);
......@@ -147,11 +147,11 @@ static int ixp2000_flash_probe(struct device *_dev)
static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
struct platform_device *dev = to_platform_device(_dev);
struct ixp2000_flash_data *ixp_data = dev->dev.platform_data;
struct flash_platform_data *plat;
struct flash_platform_data *plat;
struct ixp2000_flash_info *info;
unsigned long window_size;
int err = -1;
if (!ixp_data)
return -ENODEV;
......@@ -160,7 +160,7 @@ static int ixp2000_flash_probe(struct device *_dev)
return -ENODEV;
window_size = dev->resource->end - dev->resource->start + 1;
dev_info(_dev, "Probe of IXP2000 flash(%d banks x %dM)\n",
dev_info(_dev, "Probe of IXP2000 flash(%d banks x %dMiB)\n",
ixp_data->nr_banks, ((u32)window_size >> 20));
if (plat->width != 1) {
......@@ -173,7 +173,7 @@ static int ixp2000_flash_probe(struct device *_dev)
if(!info) {
err = -ENOMEM;
goto Error;
}
}
memzero(info, sizeof(struct ixp2000_flash_info));
dev_set_drvdata(&dev->dev, info);
......@@ -183,7 +183,7 @@ static int ixp2000_flash_probe(struct device *_dev)
* not attempt to do a direct access on us.
*/
info->map.phys = NO_XIP;
info->nr_banks = ixp_data->nr_banks;
info->map.size = ixp_data->nr_banks * window_size;
info->map.bankwidth = 1;
......@@ -191,7 +191,7 @@ static int ixp2000_flash_probe(struct device *_dev)
/*
* map_priv_2 is used to store a ptr to to the bank_setup routine
*/
info->map.map_priv_2 = (u32) ixp_data->bank_setup;
info->map.map_priv_2 = (void __iomem *) ixp_data->bank_setup;
info->map.name = dev->dev.bus_id;
info->map.read = ixp2000_flash_read8;
......@@ -199,8 +199,8 @@ static int ixp2000_flash_probe(struct device *_dev)
info->map.copy_from = ixp2000_flash_copy_from;
info->map.copy_to = ixp2000_flash_copy_to;
info->res = request_mem_region(dev->resource->start,
dev->resource->end - dev->resource->start + 1,
info->res = request_mem_region(dev->resource->start,
dev->resource->end - dev->resource->start + 1,
dev->dev.bus_id);
if (!info->res) {
dev_err(_dev, "Could not reserve memory region\n");
......@@ -209,7 +209,7 @@ static int ixp2000_flash_probe(struct device *_dev)
}
info->map.map_priv_1 =
(unsigned long) ioremap(dev->resource->start,
(void __iomem *) ioremap(dev->resource->start,
dev->resource->end - dev->resource->start + 1);
if (!info->map.map_priv_1) {
dev_err(_dev, "Failed to ioremap flash region\n");
......@@ -224,12 +224,12 @@ static int ixp2000_flash_probe(struct device *_dev)
#if defined(__ARMEB__)
/*
* Enable errata 44 workaround for NPUs with broken slowport
* Enable erratum 44 workaround for NPUs with broken slowport
*/
errata44_workaround = ixp2000_has_broken_slowport();
dev_info(_dev, "Errata 44 workaround %s\n",
errata44_workaround ? "enabled" : "disabled");
dev_info(_dev, "Erratum 44 workaround %s\n",
erratum44_workaround ? "enabled" : "disabled");
#endif
info->mtd = do_map_probe(plat->map_name, &info->map);
......
......@@ -69,7 +69,7 @@ static void ixp4xx_copy_from(struct map_info *map, void *to,
dest[len - 1] = BYTE0(src[i]);
}
/*
/*
* Unaligned writes are ignored, causing the 8-bit
* probe to fail and proceed to the 16-bit probe (which succeeds).
*/
......@@ -79,7 +79,7 @@ static void ixp4xx_probe_write16(struct map_info *map, map_word d, unsigned long
*(__u16 *) (map->map_priv_1 + adr) = d.x[0];
}
/*
/*
* Fast write16 function without the probing check above
*/
static void ixp4xx_write16(struct map_info *map, map_word d, unsigned long adr)
......@@ -197,7 +197,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
}
info->map.map_priv_1 =
(void __iomem *) ioremap(dev->resource->start,
(void __iomem *) ioremap(dev->resource->start,
dev->resource->end - dev->resource->start + 1);
if (!info->map.map_priv_1) {
printk(KERN_ERR "IXP4XXFlash: Failed to ioremap region\n");
......@@ -212,7 +212,7 @@ static int ixp4xx_flash_probe(struct device *_dev)
goto Error;
}
info->mtd->owner = THIS_MODULE;
/* Use the fast version */
info->map.write = ixp4xx_write16,
......
/*
* $Id: l440gx.c,v 1.13 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: l440gx.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $
*
* BIOS Flash chip on Intel 440GX board.
*
......@@ -73,7 +73,7 @@ static int __init init_l440gx(void)
return -ENODEV;
}
l440gx_map.virt = (unsigned long)ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
l440gx_map.virt = (void __iomem *)ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
if (!l440gx_map.virt) {
printk(KERN_WARNING "Failed to ioremap L440GX flash region\n");
......
......@@ -7,7 +7,7 @@
* modify it under the terms of the GNU General Public License version
* 2 as published by the Free Software Foundation.
*
* $Id: lasat.c,v 1.7 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: lasat.c,v 1.8 2004/09/16 23:27:13 gleixner Exp $
*
*/
......@@ -50,7 +50,7 @@ static int __init init_lasat(void)
ENABLE_VPP((&lasat_map));
lasat_map.phys = lasat_flash_partition_start(LASAT_MTD_BOOTLOADER);
lasat_map.virt = (unsigned long)ioremap_nocache(
lasat_map.virt = (void __iomem *)ioremap_nocache(
lasat_map.phys, lasat_board_info.li_flash_size);
lasat_map.size = lasat_board_info.li_flash_size;
......
/*
* $Id: mbx860.c,v 1.6 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: mbx860.c,v 1.7 2004/09/16 23:27:13 gleixner Exp $
*
* Handle mapping of the flash on MBX860 boards
*
......@@ -60,7 +60,7 @@ struct map_info mbx_map = {
int __init init_mbx(void)
{
printk(KERN_NOTICE "Motorola MBX flash device: 0x%x at 0x%x\n", WINDOW_SIZE*4, WINDOW_ADDR);
mbx_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
mbx_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
if (!mbx_map.virt) {
printk("Failed to ioremap\n");
......
/*
* Flash on MPC-1211
*
* $Id: mpc1211.c,v 1.3 2004/07/14 17:45:40 dwmw2 Exp $
* $Id: mpc1211.c,v 1.4 2004/09/16 23:27:13 gleixner Exp $
*
* (C) 2002 Interface, Saito.K & Jeanne
*
......@@ -44,7 +44,7 @@ static int __init init_mpc1211_maps(void)
int nr_parts;
mpc1211_flash_map.phys = 0;
mpc1211_flash_map.virt = P2SEGADDR(0);
mpc1211_flash_map.virt = (void __iomem *)P2SEGADDR(0);
simple_map_init(&mpc1211_flash_map);
......
......@@ -3,7 +3,7 @@
* Copyright (C) 2001 Mark Langsdorf (mark.langsdorf@amd.com)
* based on sc520cdp.c by Sysgo Real-Time Solutions GmbH
*
* $Id: netsc520.c,v 1.10 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: netsc520.c,v 1.11 2004/09/16 23:27:13 gleixner Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -95,7 +95,7 @@ static struct mtd_info *mymtd;
static int __init init_netsc520(void)
{
printk(KERN_NOTICE "NetSc520 flash device: 0x%lx at 0x%lx\n", netsc520_map.size, netsc520_map.phys);
netsc520_map.virt = (unsigned long)ioremap_nocache(netsc520_map.phys, netsc520_map.size);
netsc520_map.virt = (void __iomem *)ioremap_nocache(netsc520_map.phys, netsc520_map.size);
if (!netsc520_map.virt) {
printk("Failed to ioremap_nocache\n");
......
......@@ -6,7 +6,7 @@
* (C) Copyright 2000-2001, Greg Ungerer (gerg@snapgear.com)
* (C) Copyright 2001-2002, SnapGear (www.snapgear.com)
*
* $Id: nettel.c,v 1.5 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: nettel.c,v 1.7 2004/10/20 22:17:30 dwmw2 Exp $
*/
/****************************************************************************/
......@@ -273,8 +273,7 @@ int __init nettel_init(void)
__asm__ ("wbinvd");
nettel_amd_map.phys = amdaddr;
nettel_amd_map.virt = (unsigned long)
ioremap_nocache(amdaddr, maxsize);
nettel_amd_map.virt = (void __iomem *) ioremap_nocache(amdaddr, maxsize);
if (!nettel_amd_map.virt) {
printk("SNAPGEAR: failed to ioremap() BOOTCS\n");
return(-EIO);
......
/*
* $Id: ocelot.c,v 1.13 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: ocelot.c,v 1.14 2004/09/16 23:27:13 gleixner Exp $
*
* Flash on Momenco Ocelot
*/
......@@ -81,7 +81,7 @@ static int __init init_ocelot_maps(void)
iounmap(pld);
/* Now ioremap the NVRAM space */
ocelot_nvram_map.virt = (unsigned long)ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE);
ocelot_nvram_map.virt = (void __iomem *)ioremap_nocache(NVRAM_WINDOW_ADDR, NVRAM_WINDOW_SIZE);
if (!ocelot_nvram_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Ocelot NVRAM space\n");
return -EIO;
......@@ -101,7 +101,7 @@ static int __init init_ocelot_maps(void)
nvram_mtd->write = ocelot_ram_write;
/* Now map the flash space */
ocelot_flash_map.virt = (unsigned long)ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE);
ocelot_flash_map.virt = (void __iomem *)ioremap_nocache(FLASH_WINDOW_ADDR, FLASH_WINDOW_SIZE);
if (!ocelot_flash_map.virt) {
printk(KERN_NOTICE "Failed to ioremap Ocelot flash space\n");
goto fail_2;
......
......@@ -5,7 +5,7 @@
*
* (C) 2002 MontVista Software, Inc.
*
* $Id: omap-toto-flash.c,v 1.2 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: omap-toto-flash.c,v 1.3 2004/09/16 23:27:13 gleixner Exp $
*/
#include <linux/config.h>
......@@ -35,7 +35,7 @@
static struct map_info omap_toto_map_flash = {
.name = "OMAP Toto flash",
.bankwidth = 2,
.virt = OMAP_TOTO_FLASH_BASE,
.virt = (void __iomem *)OMAP_TOTO_FLASH_BASE,
};
......
/*
* Flash memory access on Alchemy Pb1550 board
*
* $Id: pb1550-flash.c,v 1.4 2004/07/14 17:45:40 dwmw2 Exp $
* $Id: pb1550-flash.c,v 1.5 2004/09/16 23:27:13 gleixner Exp $
*
* (C) 2004 Embedded Edge, LLC, based on pb1550-flash.c:
* (C) 2003 Pete Popov <ppopov@pacbell.net>
......@@ -179,7 +179,7 @@ int __init pb1550_mtd_init(void)
printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n",
pb1550_map.bankwidth*8);
pb1550_map.virt =
(unsigned long)ioremap(window_addr, window_size);
(void __iomem *)ioremap(window_addr, window_size);
mymtd = do_map_probe("cfi_probe", &pb1550_map);
if (!mymtd) return -ENXIO;
mymtd->owner = THIS_MODULE;
......
......@@ -3,7 +3,7 @@
*
* (C) 2001 Pete Popov <ppopov@mvista.com>
*
* $Id: pb1xxx-flash.c,v 1.11 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: pb1xxx-flash.c,v 1.13 2004/09/26 07:33:01 ppopov Exp $
*/
#include <linux/config.h>
......@@ -17,7 +17,6 @@
#include <linux/mtd/partitions.h>
#include <asm/io.h>
#include <asm/au1000.h>
#ifdef DEBUG_RW
#define DBG(x...) printk(x)
......@@ -150,7 +149,7 @@ int __init pb1xxx_mtd_init(void)
*/
printk(KERN_NOTICE "Pb1xxx flash: probing %d-bit flash bus\n",
BUSWIDTH*8);
pb1xxx_mtd_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
pb1xxx_mtd_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE);
simple_map_init(&pb1xxx_mtd_map);
......
/*
* $Id: physmap.c,v 1.34 2004/07/21 00:16:14 jwboyer Exp $
* $Id: physmap.c,v 1.35 2004/09/16 23:27:13 gleixner Exp $
*
* Normal mappings of chips in physical memory
*
......@@ -51,7 +51,7 @@ static int __init init_physmap(void)
const char **type;
printk(KERN_NOTICE "physmap flash device: %lx at %lx\n", physmap_map.size, physmap_map.phys);
physmap_map.virt = (unsigned long)ioremap(physmap_map.phys, physmap_map.size);
physmap_map.virt = (void __iomem *)ioremap(physmap_map.phys, physmap_map.size);
if (!physmap_map.virt) {
printk("Failed to ioremap\n");
......
......@@ -5,7 +5,7 @@
*
* This code is GPL
*
* $Id: pnc2000.c,v 1.15 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: pnc2000.c,v 1.16 2004/09/16 23:27:13 gleixner Exp $
*/
#include <linux/module.h>
......@@ -31,7 +31,7 @@ struct map_info pnc_map = {
.size = WINDOW_SIZE,
.bankwidth = 4,
.phys = 0xFFFFFFFF,
.virt = WINDOW_ADDR,
.virt = (void __iomem *)WINDOW_ADDR,
};
......
/*
* $Id: redwood.c,v 1.8 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: redwood.c,v 1.9 2004/09/16 23:27:13 gleixner Exp $
*
* drivers/mtd/maps/redwood.c
*
......@@ -132,7 +132,7 @@ int __init init_redwood_flash(void)
WINDOW_SIZE, WINDOW_ADDR);
redwood_flash_map.virt =
(unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
(void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE);
if (!redwood_flash_map.virt) {
printk("init_redwood_flash: failed to ioremap\n");
......
/*
* $Id: rpxlite.c,v 1.20 2004/07/12 21:59:44 dwmw2 Exp $
* $Id: rpxlite.c,v 1.21 2004/09/16 23:27:13 gleixner Exp $
*
* Handle mapping of the flash on the RPX Lite and CLLF boards
*/
......@@ -28,7 +28,7 @@ static struct map_info rpxlite_map = {
int __init init_rpxlite(void)
{
printk(KERN_NOTICE "RPX Lite or CLLF flash device: %x at %x\n", WINDOW_SIZE*4, WINDOW_ADDR);
rpxlite_map.virt = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
rpxlite_map.virt = (void __iomem *)ioremap(WINDOW_ADDR, WINDOW_SIZE * 4);
if (!rpxlite_map.virt) {
printk("Failed to ioremap\n");
......
......@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
$Id: sbc_gxx.c,v 1.29 2004/07/12 22:38:29 dwmw2 Exp $
$Id: sbc_gxx.c,v 1.30 2004/09/16 23:27:14 gleixner Exp $
The SBC-MediaGX / SBC-GXx has up to 16 MiB of
Intel StrataFlash (28F320/28F640) in x8 mode.
......@@ -84,7 +84,7 @@ separate MTD devices.
// Globals
static volatile int page_in_window = -1; // Current page in window.
static unsigned long iomapadr;
static void __iomem *iomapadr;
static spinlock_t sbc_gxx_spin = SPIN_LOCK_UNLOCKED;
/* partition_info gives details on the logical partitions that the split the
......@@ -195,7 +195,7 @@ static void cleanup_sbc_gxx(void)
int __init init_sbc_gxx(void)
{
iomapadr = (unsigned long)ioremap(WINDOW_START, WINDOW_LENGTH);
iomapadr = (void __iomem *)ioremap(WINDOW_START, WINDOW_LENGTH);
if (!iomapadr) {
printk( KERN_ERR"%s: failed to ioremap memory region\n",
sbc_gxx_map.name );
......
......@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
* $Id: sc520cdp.c,v 1.16 2004/07/12 21:59:45 dwmw2 Exp $
* $Id: sc520cdp.c,v 1.17 2004/09/16 23:27:14 gleixner Exp $
*
*
* The SC520CDP is an evaluation board for the Elan SC520 processor available
......@@ -241,7 +241,7 @@ static int __init init_sc520cdp(void)
printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n",
sc520cdp_map[i].size, sc520cdp_map[i].phys);
sc520cdp_map[i].virt = (unsigned long)ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size);
sc520cdp_map[i].virt = (void __iomem *)ioremap_nocache(sc520cdp_map[i].phys, sc520cdp_map[i].size);
if (!sc520cdp_map[i].virt) {
printk("Failed to ioremap_nocache\n");
......
/*
* MTD map driver for BIOS Flash on Intel SCB2 boards
* $Id: scb2_flash.c,v 1.8 2004/07/12 21:59:45 dwmw2 Exp $
* $Id: scb2_flash.c,v 1.9 2004/09/16 23:27:14 gleixner Exp $
* Copyright (C) 2002 Sun Microsystems, Inc.
* Tim Hockin <thockin@sun.com>
*
......@@ -163,7 +163,7 @@ scb2_flash_probe(struct pci_dev *dev, const struct pci_device_id *ent)
}
scb2_map.phys = SCB2_ADDR;
scb2_map.virt = (unsigned long)scb2_ioaddr;
scb2_map.virt = (void __iomem *)scb2_ioaddr;
scb2_map.size = SCB2_WINDOW;
simple_map_init(&scb2_map);
......
......@@ -2,7 +2,7 @@
Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com>
$Id: scx200_docflash.c,v 1.6 2004/07/12 21:59:45 dwmw2 Exp $
$Id: scx200_docflash.c,v 1.7 2004/09/16 23:27:14 gleixner Exp $
National Semiconductor SCx200 flash mapped with DOCCS
*/
......@@ -180,7 +180,7 @@ int __init init_scx200_docflash(void)
simple_map_init(&scx200_docflash_map);
scx200_docflash_map.phys = docmem.start;
scx200_docflash_map.virt = (unsigned long)ioremap(docmem.start, scx200_docflash_map.size);
scx200_docflash_map.virt = (void __iomem *)ioremap(docmem.start, scx200_docflash_map.size);
if (!scx200_docflash_map.virt) {
printk(KERN_ERR NAME ": failed to ioremap the flash\n");
release_resource(&docmem);
......
/*
* $Id: solutionengine.c,v 1.13 2004/07/12 21:59:45 dwmw2 Exp $
* $Id: solutionengine.c,v 1.14 2004/09/16 23:27:14 gleixner Exp $
*
* Flash and EPROM on Hitachi Solution Engine and similar boards.
*
......@@ -62,9 +62,9 @@ static int __init init_soleng_maps(void)
/* First probe at offset 0 */
soleng_flash_map.phys = 0;
soleng_flash_map.virt = P2SEGADDR(0);
soleng_flash_map.virt = (void __iomem *)P2SEGADDR(0);
soleng_eprom_map.phys = 0x01000000;
soleng_eprom_map.virt = P1SEGADDR(0x01000000);
soleng_eprom_map.virt = (void __iomem *)P1SEGADDR(0x01000000);
simple_map_init(&soleng_eprom_map);
simple_map_init(&soleng_flash_map);
......
/* $Id: sun_uflash.c,v 1.9 2004/07/12 21:59:45 dwmw2 Exp $
/* $Id: sun_uflash.c,v 1.10 2004/09/16 23:27:14 gleixner Exp $
*
* sun_uflash - Driver implementation for user-programmable flash
* present on many Sun Microsystems SME boardsets.
......@@ -97,7 +97,7 @@ int uflash_devinit(struct linux_ebus_device* edev)
}
pdev->map.phys = edev->resource[0].start;
pdev->map.virt =
(unsigned long)ioremap_nocache(edev->resource[0].start, pdev->map.size);
(void __iomem *)ioremap_nocache(edev->resource[0].start, pdev->map.size);
if(0 == pdev->map.virt) {
printk("%s: failed to map device\n", __FUNCTION__);
kfree(pdev->name);
......
......@@ -5,7 +5,7 @@
*
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
*
* $Id: uclinux.c,v 1.7 2004/07/12 21:59:45 dwmw2 Exp $
* $Id: uclinux.c,v 1.8 2004/09/16 23:27:14 gleixner Exp $
*/
/****************************************************************************/
......@@ -69,9 +69,10 @@ int __init uclinux_mtd_init(void)
printk("uclinux[mtd]: RAM probe address=0x%x size=0x%x\n",
(int) mapp->map_priv_2, (int) mapp->size);
mapp->virt = ioremap_nocache(mapp->phys, mapp->size);
mapp->virt = (void __iomem *)
ioremap_nocache(mapp->phys, mapp->size);
if (!mapp->virt) {
if (mapp->virt == 0) {
printk("uclinux[mtd]: ioremap_nocache() failed\n");
return(-EIO);
}
......@@ -81,7 +82,7 @@ int __init uclinux_mtd_init(void)
mtd = do_map_probe("map_ram", mapp);
if (!mtd) {
printk("uclinux[mtd]: failed to find a mapping?\n");
iounmap(mapp->virt);
iounmap((void *) mapp->virt);
return(-ENXIO);
}
......
/*
* $Id: wr_sbc82xx_flash.c,v 1.5 2004/07/15 14:52:02 dwmw2 Exp $
* $Id: wr_sbc82xx_flash.c,v 1.6 2004/09/16 23:27:14 gleixner Exp $
*
* Map for flash chips on Wind River PowerQUICC II SBC82xx board.
*
......@@ -116,7 +116,7 @@ int __init init_sbc82xx_flash(void)
}
printk(" at %08lx)\n", sbc82xx_flash_map[i].phys);
sbc82xx_flash_map[i].virt = (unsigned long)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size);
sbc82xx_flash_map[i].virt = (void __iomem *)ioremap(sbc82xx_flash_map[i].phys, sbc82xx_flash_map[i].size);
if (!sbc82xx_flash_map[i].virt) {
printk("Failed to ioremap\n");
......
......@@ -6,7 +6,7 @@
* Copyright (C) 2002-2003 Greg Ungerer <gerg@snapgear.com>
* Copyright (C) 2002-2003 SnapGear Inc
*
* $Id: doc2000.h,v 1.22 2003/11/05 10:51:36 dwmw2 Exp $
* $Id: doc2000.h,v 1.23 2004/09/16 23:26:08 gleixner Exp $
*
* Released under GPL
*/
......@@ -89,8 +89,8 @@
#define WriteDOC_(d, adr, reg) do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0)
#define DOC_IOREMAP_LEN 0x4000
#else
#define ReadDOC_(adr, reg) readb(((unsigned long)adr) + (reg))
#define WriteDOC_(d, adr, reg) writeb(d, ((unsigned long)adr) + (reg))
#define ReadDOC_(adr, reg) readb((void __iomem *)(((unsigned long)adr) + (reg)))
#define WriteDOC_(d, adr, reg) writeb(d, (void __iomem *)(((unsigned long)adr) + (reg)))
#define DOC_IOREMAP_LEN 0x2000
#endif
......@@ -168,7 +168,7 @@ struct Nand {
struct DiskOnChip {
unsigned long physadr;
unsigned long virtadr;
void __iomem *virtadr;
unsigned long totlen;
unsigned char ChipID; /* Type of DiskOnChip */
int ioreg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment