remove config for non supported kernel version
[openwrt.git] / target / linux / adm5120 / files / drivers / mtd / maps / adm5120-flash.c
index 20f67d6..c637c4f 100644 (file)
  *     Copyright (C) 2003 MontaVista Software Inc.
  *     Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
  *
- *  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 Free Software Foundation; either version 2
- *  of the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the
- *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA  02110-1301, USA.
+ *  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.
  *
  */
 
@@ -220,14 +209,15 @@ static int adm5120_flash_initres(struct adm5120_flash_info *info)
        struct map_info *map = &info->amap.map;
        int err = 0;
 
-       info->res = request_mem_region(map->phys, map->size, map->name);
+       info->res = request_mem_region(map->phys, info->amap.window_size,
+                       map->name);
        if (info->res == NULL) {
                MAP_ERR(map, "could not reserve memory region\n");
                err = -ENOMEM;
                goto out;
        }
 
-       map->virt = ioremap_nocache(map->phys, map->size);
+       map->virt = ioremap_nocache(map->phys, info->amap.window_size);
        if (map->virt == NULL) {
                MAP_ERR(map, "failed to ioremap flash region\n");
                err = -ENOMEM;
@@ -260,7 +250,7 @@ static int adm5120_flash_initinfo(struct adm5120_flash_info *info,
 
        if (info->amap.window_size == 0) {
                /* get memory window size */
-               t = SW_READ_REG(MEMCTRL) >> fdesc->srs_shift;
+               t = SW_READ_REG(SWITCH_REG_MEMCTRL) >> fdesc->srs_shift;
                t &= MEMCTRL_SRS_MASK;
                info->amap.window_size = flash_sizes[t];
        }
@@ -576,6 +566,6 @@ static void __exit adm5120_flash_exit(void)
 module_init(adm5120_flash_init);
 module_exit(adm5120_flash_exit);
 
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
 MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>");
 MODULE_DESCRIPTION(DRV_DESC);
This page took 0.022623 seconds and 4 git commands to generate.