Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

nfc_hal Struct Reference

List of all members.


Detailed Description

struct nfc_hal - i.MX NFC HAL

This structure embodies an abstract interface to the underlying NFC hardware.

: The major version number of the NFC to which this structure applies. : The minor version number of the NFC to which this structure applies. : The maximum number of chips the NFC can possibly support. This may *not* be the actual number of chips currently connected. This value is constant for NFC's of a given version. : The number of main/spare buffers available in the NFC's memory. This value is constant for NFC's of a given version. : The stride, in bytes, from the beginning of one spare buffer to the beginning of the next one. This value is constant for NFC's of a given version. : Indicates if the NFC has a secondary register set that must be mapped in. : Indicates if the NFC supports a "symmetric" clock. When the clock is "symmetric," the hardware waits one NFC clock for every read/write cycle. When the clock is "asymmetric," the hardware waits two NFC clocks for every read/write cycle. : Initializes the NFC and any version-specific data structures. This function will be called after everything has been set up for communication with the NFC itself, but before the platform has set up off-chip communication. Thus, this function must not attempt to communicate with the NAND Flash hardware. A non-zero return value indicates failure. : Based on the physical geometry, this function selects an NFC geometry structure and configures the NFC hardware to match. A non-zero return value indicates failure. : Shuts down the NFC and cleans up version-specific data structures. This function will be called after the platform has shut down off-chip communication but while communication with the NFC still works. : Configures the hardware to make the NAND Flash bus cycle period as close as possible to the given cycle period. This function is called during boot up and may assume that, at the time it's called, the parent clock is running at the highest rate it will ever run. Thus, this function need never worry that the NAND Flash bus will run faster and potentially make it impossible to communicate with the NAND Flash device -- it will only run slower. : Masks the NFC's interrupt. : Unmasks the NFC's interrupt. : Clears the NFC's interrupt. : Returns true if the NFC is interrupting. : Returns true if all the chips in the medium are ready. This member may be set to NULL, which indicates that the underlying NFC hardware doesn't expose ready/busy signals. : If passed true, forces the hardware chip enable signal for the current chip to be asserted always. If passed false, causes the chip enable signal to be asserted only during I/O. : Sets ECC on or off. : Examines the hardware ECC status and returns: == 0 => No errors. > 0 => The number of corrected errors. < 0 => There were uncorrectable errors. : Gets the current symmetric clock setting. For versions that don't support symmetric clocks, this function always returns false. : For versions that support symmetric clocks, sets whether or not the clock is symmetric. : Selects the current chip. : Sends a command code and then returns immediately *without* waiting for the NFC to finish. : Applies a single write cycle to the current chip, sending the given byte, and waiting for the NFC to finish. : Applies a single read cycle to the current chip and returns the result, necessarily waiting for the NFC to finish. The width of the result is the same as the width of the Flash bus. : Applies read cycles to the current chip to read an entire page into the NFC. Note that ECC is enabled or disabled with the set_ecc function pointer (see above). This function waits for the NFC to finish before returning. : Applies write cycles to send an entire page from the NFC to the current chip. Note that ECC is enabled or disabled with the set_ecc function pointer (see above). This function waits for the NFC to finish before returning. : Starts an automatic read operation. A NULL pointer indicates automatic read operations aren't available with this NFC version. : Blocks until an automatic read operation is ready for the CPU to copy a page out of the NFC. : Resumes an automatic read operation after the CPU has copied a page out. : Starts an automatic write operation. A NULL pointer indicates automatic write operations aren't available with this NFC version. : Blocks until an automatic write operation is ready for the CPU to copy a page into the NFC. : Starts an automatic erase operation. A NULL pointer indicates automatic erase operations aren't available with this NFC version.

Definition at line 810 of file imx_nfc.c.


Public Attributes

const int can_be_symmetric
void(* clear_interrupt )(struct imx_nfc_data *)
void(* command_cycle )(struct imx_nfc_data *, unsigned cmd)
void(* exit )(struct imx_nfc_data *)
int(* get_ecc_status )(struct imx_nfc_data *)
int(* get_symmetric )(struct imx_nfc_data *)
const int has_secondary_regs
int(* init )(struct imx_nfc_data *)
int(* is_interrupting )(struct imx_nfc_data *)
int(* is_ready )(struct imx_nfc_data *)
const unsigned int major_version
void(* mask_interrupt )(struct imx_nfc_data *)
const unsigned int max_buffer_count
const unsigned int max_chip_count
const unsigned int minor_version
unsigned(* read_cycle )(struct imx_nfc_data *)
void(* read_page )(struct imx_nfc_data *)
int(* resume_auto_read )(struct imx_nfc_data *)
void(* select_chip )(struct imx_nfc_data *, int chip)
void(* send_page )(struct imx_nfc_data *)
int(* set_closest_cycle )(struct imx_nfc_data *, unsigned ns)
void(* set_ecc )(struct imx_nfc_data *, int on)
void(* set_force_ce )(struct imx_nfc_data *, int on)
int(* set_geometry )(struct imx_nfc_data *)
void(* set_symmetric )(struct imx_nfc_data *, int on)
const unsigned int spare_buf_stride
int(* start_auto_erase )(struct imx_nfc_data *, unsigned start, unsigned count, unsigned page)
int(* start_auto_read )(struct imx_nfc_data *, unsigned start, unsigned count, unsigned column, unsigned page)
int(* start_auto_write )(struct imx_nfc_data *, unsigned start, unsigned count, unsigned column, unsigned page)
void(* unmask_interrupt )(struct imx_nfc_data *)
int(* wait_for_auto_read )(struct imx_nfc_data *)
int(* wait_for_auto_write )(struct imx_nfc_data *)
void(* write_cycle )(struct imx_nfc_data *, unsigned byte)

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index