nand_generic.c (258200) | nand_generic.c (285006) |
---|---|
1/*- 2 * Copyright (C) 2009-2012 Semihalf 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27/* Generic NAND driver */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2009-2012 Semihalf 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27/* Generic NAND driver */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/nand/nand_generic.c 258200 2013-11-15 23:41:32Z ian $"); | 30__FBSDID("$FreeBSD: head/sys/dev/nand/nand_generic.c 285006 2015-07-01 14:54:13Z brueffer $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/proc.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/endian.h> 38#include <sys/kernel.h> --- 348 unchanged lines hidden (view full) --- 387 } 388 if (!found) 389 return (ENXIO); 390 391 chip_params->luns = params.luns; 392 chip_params->blocks_per_lun = le32dec(¶ms.blocks_per_lun); 393 chip_params->pages_per_block = le32dec(¶ms.pages_per_block); 394 chip_params->bytes_per_page = le32dec(¶ms.bytes_per_page); | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/proc.h> 35#include <sys/bus.h> 36#include <sys/conf.h> 37#include <sys/endian.h> 38#include <sys/kernel.h> --- 348 unchanged lines hidden (view full) --- 387 } 388 if (!found) 389 return (ENXIO); 390 391 chip_params->luns = params.luns; 392 chip_params->blocks_per_lun = le32dec(¶ms.blocks_per_lun); 393 chip_params->pages_per_block = le32dec(¶ms.pages_per_block); 394 chip_params->bytes_per_page = le32dec(¶ms.bytes_per_page); |
395 chip_params->spare_bytes_per_page = le32dec(¶ms.spare_bytes_per_page); | 395 chip_params->spare_bytes_per_page = le16dec(¶ms.spare_bytes_per_page); |
396 chip_params->t_bers = le16dec(¶ms.t_bers); 397 chip_params->t_prog = le16dec(¶ms.t_prog); 398 chip_params->t_r = le16dec(¶ms.t_r); 399 chip_params->t_ccs = le16dec(¶ms.t_ccs); 400 chip_params->features = le16dec(¶ms.features); 401 chip_params->address_cycles = params.address_cycles; 402 403 return (0); --- 971 unchanged lines hidden --- | 396 chip_params->t_bers = le16dec(¶ms.t_bers); 397 chip_params->t_prog = le16dec(¶ms.t_prog); 398 chip_params->t_r = le16dec(¶ms.t_r); 399 chip_params->t_ccs = le16dec(¶ms.t_ccs); 400 chip_params->features = le16dec(¶ms.features); 401 chip_params->address_cycles = params.address_cycles; 402 403 return (0); --- 971 unchanged lines hidden --- |