ams-delta.c (93db446a424cee9387b532995e6b516667079555) | ams-delta.c (63fa37f0c512481bd942e84b596ad58e1d4c84e2) |
---|---|
1/* 2 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li> 3 * 4 * Derived from drivers/mtd/nand/toto.c (removed in v2.6.28) 5 * Copyright (c) 2003 Texas Instruments 6 * Copyright (c) 2002 Thomas Gleixner <tgxl@linutronix.de> 7 * 8 * Converted to platform driver by Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> --- 172 unchanged lines hidden (view full) --- 181 int err = 0; 182 183 if (!res) 184 return -ENXIO; 185 186 /* Allocate memory for MTD device structure and private data */ 187 this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL); 188 if (!this) { | 1/* 2 * Copyright (C) 2006 Jonathan McDowell <noodles@earth.li> 3 * 4 * Derived from drivers/mtd/nand/toto.c (removed in v2.6.28) 5 * Copyright (c) 2003 Texas Instruments 6 * Copyright (c) 2002 Thomas Gleixner <tgxl@linutronix.de> 7 * 8 * Converted to platform driver by Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> --- 172 unchanged lines hidden (view full) --- 181 int err = 0; 182 183 if (!res) 184 return -ENXIO; 185 186 /* Allocate memory for MTD device structure and private data */ 187 this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL); 188 if (!this) { |
189 printk (KERN_WARNING "Unable to allocate E3 NAND MTD device structure.\n"); | 189 pr_warn("Unable to allocate E3 NAND MTD device structure.\n"); |
190 err = -ENOMEM; 191 goto out; 192 } 193 194 ams_delta_mtd = nand_to_mtd(this); 195 ams_delta_mtd->owner = THIS_MODULE; 196 197 /* --- 17 unchanged lines hidden (view full) --- 215 this->read_byte = ams_delta_read_byte; 216 this->write_buf = ams_delta_write_buf; 217 this->read_buf = ams_delta_read_buf; 218 this->cmd_ctrl = ams_delta_hwcontrol; 219 if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, "nand_rdy") == 0) { 220 this->dev_ready = ams_delta_nand_ready; 221 } else { 222 this->dev_ready = NULL; | 190 err = -ENOMEM; 191 goto out; 192 } 193 194 ams_delta_mtd = nand_to_mtd(this); 195 ams_delta_mtd->owner = THIS_MODULE; 196 197 /* --- 17 unchanged lines hidden (view full) --- 215 this->read_byte = ams_delta_read_byte; 216 this->write_buf = ams_delta_write_buf; 217 this->read_buf = ams_delta_read_buf; 218 this->cmd_ctrl = ams_delta_hwcontrol; 219 if (gpio_request(AMS_DELTA_GPIO_PIN_NAND_RB, "nand_rdy") == 0) { 220 this->dev_ready = ams_delta_nand_ready; 221 } else { 222 this->dev_ready = NULL; |
223 printk(KERN_NOTICE "Couldn't request gpio for Delta NAND ready.\n"); | 223 pr_notice("Couldn't request gpio for Delta NAND ready.\n"); |
224 } 225 /* 25 us command delay time */ 226 this->chip_delay = 30; 227 this->ecc.mode = NAND_ECC_SOFT; 228 this->ecc.algo = NAND_ECC_HAMMING; 229 230 platform_set_drvdata(pdev, io_base); 231 --- 60 unchanged lines hidden --- | 224 } 225 /* 25 us command delay time */ 226 this->chip_delay = 30; 227 this->ecc.mode = NAND_ECC_SOFT; 228 this->ecc.algo = NAND_ECC_HAMMING; 229 230 platform_set_drvdata(pdev, io_base); 231 --- 60 unchanged lines hidden --- |