sc520cdp.c (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) | sc520cdp.c (69f34c98c1416eb74c55e38a21dbf3e294966514) |
---|---|
1/* sc520cdp.c -- MTD map driver for AMD SC520 Customer Development Platform 2 * 3 * Copyright (C) 2001 Sysgo Real-Time Solutions GmbH 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 18 * | 1/* sc520cdp.c -- MTD map driver for AMD SC520 Customer Development Platform 2 * 3 * Copyright (C) 2001 Sysgo Real-Time Solutions GmbH 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 18 * |
19 * $Id: sc520cdp.c,v 1.21 2004/12/13 10:27:08 dedekind Exp $ | 19 * $Id: sc520cdp.c,v 1.22 2005/11/07 11:14:28 gleixner Exp $ |
20 * 21 * 22 * The SC520CDP is an evaluation board for the Elan SC520 processor available 23 * from AMD. It has two banks of 32-bit Flash ROM, each 8 Megabytes in size, 24 * and up to 512 KiB of 8-bit DIL Flash ROM. 25 * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html 26 */ 27 --- 198 unchanged lines hidden (view full) --- 226 iounmap(mmcr); 227} 228#endif 229 230 231static int __init init_sc520cdp(void) 232{ 233 int i, devices_found = 0; | 20 * 21 * 22 * The SC520CDP is an evaluation board for the Elan SC520 processor available 23 * from AMD. It has two banks of 32-bit Flash ROM, each 8 Megabytes in size, 24 * and up to 512 KiB of 8-bit DIL Flash ROM. 25 * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html 26 */ 27 --- 198 unchanged lines hidden (view full) --- 226 iounmap(mmcr); 227} 228#endif 229 230 231static int __init init_sc520cdp(void) 232{ 233 int i, devices_found = 0; |
234 | 234 |
235#ifdef REPROGRAM_PAR 236 /* reprogram PAR registers so flash appears at the desired addresses */ 237 sc520cdp_setup_par(); 238#endif 239 240 for (i = 0; i < NUM_FLASH_BANKS; i++) { 241 printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n", 242 sc520cdp_map[i].size, sc520cdp_map[i].phys); --- 30 unchanged lines hidden (view full) --- 273 if(devices_found == 3) /* register the third (DIL-Flash) device */ 274 add_mtd_device(mymtd[2]); 275 return(devices_found ? 0 : -ENXIO); 276} 277 278static void __exit cleanup_sc520cdp(void) 279{ 280 int i; | 235#ifdef REPROGRAM_PAR 236 /* reprogram PAR registers so flash appears at the desired addresses */ 237 sc520cdp_setup_par(); 238#endif 239 240 for (i = 0; i < NUM_FLASH_BANKS; i++) { 241 printk(KERN_NOTICE "SC520 CDP flash device: 0x%lx at 0x%lx\n", 242 sc520cdp_map[i].size, sc520cdp_map[i].phys); --- 30 unchanged lines hidden (view full) --- 273 if(devices_found == 3) /* register the third (DIL-Flash) device */ 274 add_mtd_device(mymtd[2]); 275 return(devices_found ? 0 : -ENXIO); 276} 277 278static void __exit cleanup_sc520cdp(void) 279{ 280 int i; |
281 | 281 |
282 if (merged_mtd) { 283 del_mtd_device(merged_mtd); 284 mtd_concat_destroy(merged_mtd); 285 } 286 if (mymtd[2]) 287 del_mtd_device(mymtd[2]); 288 289 for (i = 0; i < NUM_FLASH_BANKS; i++) { --- 15 unchanged lines hidden --- | 282 if (merged_mtd) { 283 del_mtd_device(merged_mtd); 284 mtd_concat_destroy(merged_mtd); 285 } 286 if (mymtd[2]) 287 del_mtd_device(mymtd[2]); 288 289 for (i = 0; i < NUM_FLASH_BANKS; i++) { --- 15 unchanged lines hidden --- |