/*
- * $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.
{
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);
* 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
{
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;
/* 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.
{
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>
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;
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;
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;
*
* (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>
unsigned long base;
unsigned long size;
int width;
- void __iomem *vbase;
+ void *vbase;
struct map_info *map;
struct mtd_info *mtd;
struct resource *res;
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, Kári Davíðsson <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
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.
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
*/
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");
*
* 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>
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;
* 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
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);
*
* 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
*
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
*
#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");
simple_map_init(&edb7312nor_map);
- mymtd = NULL;
+ mymtd = 0;
type = rom_probe_types;
for(; !mymtd && *type; type++) {
mymtd = do_map_probe(*type, &edb7312nor_map);
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.
#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
/* 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 );
* 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
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>
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)
* 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>
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
*
{
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 },
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");
}
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]);
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 $
======================================================================*/
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
*
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
*
* 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>
};
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);
#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;
unsigned long from, ssize_t len)
{
from = flash_bank_setup(map, from);
- while(len--)
+ while(len--)
*(__u8 *) to++ = *(__u8 *)(map->map_priv_1 + from++);
}
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);
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;
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) {
if(!info) {
err = -ENOMEM;
goto Error;
- }
+ }
memzero(info, sizeof(struct ixp2000_flash_info));
dev_set_drvdata(&dev->dev, info);
* 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;
/*
* 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;
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");
}
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");
#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);
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).
*/
*(__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)
}
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");
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.
*
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");
* 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 $
*
*/
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
*
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
*
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);
* 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
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");
* (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 $
*/
/****************************************************************************/
__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
*/
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;
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;
*
* (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>
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>
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;
*
* (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>
#include <linux/mtd/partitions.h>
#include <asm/io.h>
-#include <asm/au1000.h>
#ifdef DEBUG_RW
#define DBG(x...) printk(x)
*/
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
*
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");
*
* 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>
.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
*
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
*/
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");
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.
// 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
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 );
* 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
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>
*
}
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);
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
*/
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.
*
/* 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.
}
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);
*
* (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 $
*/
/****************************************************************************/
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);
}
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.
*
}
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");
* 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
*/
#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
struct DiskOnChip {
unsigned long physadr;
- unsigned long virtadr;
+ void __iomem *virtadr;
unsigned long totlen;
unsigned char ChipID; /* Type of DiskOnChip */
int ioreg;