aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/fsl_upm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/fsl_upm.c')
-rw-r--r--drivers/mtd/nand/fsl_upm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 4eff8b25e5af..efdcca94ce55 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -186,7 +186,7 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
186 if (!flash_np) 186 if (!flash_np)
187 return -ENODEV; 187 return -ENODEV;
188 188
189 fun->mtd.name = kasprintf(GFP_KERNEL, "%x.%s", io_res->start, 189 fun->mtd.name = kasprintf(GFP_KERNEL, "0x%llx.%s", (u64)io_res->start,
190 flash_np->name); 190 flash_np->name);
191 if (!fun->mtd.name) { 191 if (!fun->mtd.name) {
192 ret = -ENOMEM; 192 ret = -ENOMEM;
@@ -222,7 +222,7 @@ static int __devinit fun_probe(struct platform_device *ofdev,
222{ 222{
223 struct fsl_upm_nand *fun; 223 struct fsl_upm_nand *fun;
224 struct resource io_res; 224 struct resource io_res;
225 const uint32_t *prop; 225 const __be32 *prop;
226 int rnb_gpio; 226 int rnb_gpio;
227 int ret; 227 int ret;
228 int size; 228 int size;
@@ -270,7 +270,7 @@ static int __devinit fun_probe(struct platform_device *ofdev,
270 goto err1; 270 goto err1;
271 } 271 }
272 for (i = 0; i < fun->mchip_count; i++) 272 for (i = 0; i < fun->mchip_count; i++)
273 fun->mchip_offsets[i] = prop[i]; 273 fun->mchip_offsets[i] = be32_to_cpu(prop[i]);
274 } else { 274 } else {
275 fun->mchip_count = 1; 275 fun->mchip_count = 1;
276 } 276 }
@@ -295,13 +295,13 @@ static int __devinit fun_probe(struct platform_device *ofdev,
295 295
296 prop = of_get_property(ofdev->dev.of_node, "chip-delay", NULL); 296 prop = of_get_property(ofdev->dev.of_node, "chip-delay", NULL);
297 if (prop) 297 if (prop)
298 fun->chip_delay = *prop; 298 fun->chip_delay = be32_to_cpup(prop);
299 else 299 else
300 fun->chip_delay = 50; 300 fun->chip_delay = 50;
301 301
302 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-wait-flags", &size); 302 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-wait-flags", &size);
303 if (prop && size == sizeof(uint32_t)) 303 if (prop && size == sizeof(uint32_t))
304 fun->wait_flags = *prop; 304 fun->wait_flags = be32_to_cpup(prop);
305 else 305 else
306 fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN | 306 fun->wait_flags = FSL_UPM_WAIT_RUN_PATTERN |
307 FSL_UPM_WAIT_WRITE_BYTE; 307 FSL_UPM_WAIT_WRITE_BYTE;