18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* Freescale Local Bus Controller 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright © 2006-2007, 2010 Freescale Semiconductor 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Authors: Nick Spence <nick.spence@freescale.com>, 78c2ecf20Sopenharmony_ci * Scott Wood <scottwood@freescale.com> 88c2ecf20Sopenharmony_ci * Jack Lan <jack.lan@freescale.com> 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef __ASM_FSL_LBC_H 128c2ecf20Sopenharmony_ci#define __ASM_FSL_LBC_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <linux/compiler.h> 158c2ecf20Sopenharmony_ci#include <linux/types.h> 168c2ecf20Sopenharmony_ci#include <linux/io.h> 178c2ecf20Sopenharmony_ci#include <linux/device.h> 188c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_cistruct fsl_lbc_bank { 218c2ecf20Sopenharmony_ci __be32 br; /**< Base Register */ 228c2ecf20Sopenharmony_ci#define BR_BA 0xFFFF8000 238c2ecf20Sopenharmony_ci#define BR_BA_SHIFT 15 248c2ecf20Sopenharmony_ci#define BR_PS 0x00001800 258c2ecf20Sopenharmony_ci#define BR_PS_SHIFT 11 268c2ecf20Sopenharmony_ci#define BR_PS_8 0x00000800 /* Port Size 8 bit */ 278c2ecf20Sopenharmony_ci#define BR_PS_16 0x00001000 /* Port Size 16 bit */ 288c2ecf20Sopenharmony_ci#define BR_PS_32 0x00001800 /* Port Size 32 bit */ 298c2ecf20Sopenharmony_ci#define BR_DECC 0x00000600 308c2ecf20Sopenharmony_ci#define BR_DECC_SHIFT 9 318c2ecf20Sopenharmony_ci#define BR_DECC_OFF 0x00000000 /* HW ECC checking and generation off */ 328c2ecf20Sopenharmony_ci#define BR_DECC_CHK 0x00000200 /* HW ECC checking on, generation off */ 338c2ecf20Sopenharmony_ci#define BR_DECC_CHK_GEN 0x00000400 /* HW ECC checking and generation on */ 348c2ecf20Sopenharmony_ci#define BR_WP 0x00000100 358c2ecf20Sopenharmony_ci#define BR_WP_SHIFT 8 368c2ecf20Sopenharmony_ci#define BR_MSEL 0x000000E0 378c2ecf20Sopenharmony_ci#define BR_MSEL_SHIFT 5 388c2ecf20Sopenharmony_ci#define BR_MS_GPCM 0x00000000 /* GPCM */ 398c2ecf20Sopenharmony_ci#define BR_MS_FCM 0x00000020 /* FCM */ 408c2ecf20Sopenharmony_ci#define BR_MS_SDRAM 0x00000060 /* SDRAM */ 418c2ecf20Sopenharmony_ci#define BR_MS_UPMA 0x00000080 /* UPMA */ 428c2ecf20Sopenharmony_ci#define BR_MS_UPMB 0x000000A0 /* UPMB */ 438c2ecf20Sopenharmony_ci#define BR_MS_UPMC 0x000000C0 /* UPMC */ 448c2ecf20Sopenharmony_ci#define BR_V 0x00000001 458c2ecf20Sopenharmony_ci#define BR_V_SHIFT 0 468c2ecf20Sopenharmony_ci#define BR_RES ~(BR_BA|BR_PS|BR_DECC|BR_WP|BR_MSEL|BR_V) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci __be32 or; /**< Base Register */ 498c2ecf20Sopenharmony_ci#define OR0 0x5004 508c2ecf20Sopenharmony_ci#define OR1 0x500C 518c2ecf20Sopenharmony_ci#define OR2 0x5014 528c2ecf20Sopenharmony_ci#define OR3 0x501C 538c2ecf20Sopenharmony_ci#define OR4 0x5024 548c2ecf20Sopenharmony_ci#define OR5 0x502C 558c2ecf20Sopenharmony_ci#define OR6 0x5034 568c2ecf20Sopenharmony_ci#define OR7 0x503C 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define OR_FCM_AM 0xFFFF8000 598c2ecf20Sopenharmony_ci#define OR_FCM_AM_SHIFT 15 608c2ecf20Sopenharmony_ci#define OR_FCM_BCTLD 0x00001000 618c2ecf20Sopenharmony_ci#define OR_FCM_BCTLD_SHIFT 12 628c2ecf20Sopenharmony_ci#define OR_FCM_PGS 0x00000400 638c2ecf20Sopenharmony_ci#define OR_FCM_PGS_SHIFT 10 648c2ecf20Sopenharmony_ci#define OR_FCM_CSCT 0x00000200 658c2ecf20Sopenharmony_ci#define OR_FCM_CSCT_SHIFT 9 668c2ecf20Sopenharmony_ci#define OR_FCM_CST 0x00000100 678c2ecf20Sopenharmony_ci#define OR_FCM_CST_SHIFT 8 688c2ecf20Sopenharmony_ci#define OR_FCM_CHT 0x00000080 698c2ecf20Sopenharmony_ci#define OR_FCM_CHT_SHIFT 7 708c2ecf20Sopenharmony_ci#define OR_FCM_SCY 0x00000070 718c2ecf20Sopenharmony_ci#define OR_FCM_SCY_SHIFT 4 728c2ecf20Sopenharmony_ci#define OR_FCM_SCY_1 0x00000010 738c2ecf20Sopenharmony_ci#define OR_FCM_SCY_2 0x00000020 748c2ecf20Sopenharmony_ci#define OR_FCM_SCY_3 0x00000030 758c2ecf20Sopenharmony_ci#define OR_FCM_SCY_4 0x00000040 768c2ecf20Sopenharmony_ci#define OR_FCM_SCY_5 0x00000050 778c2ecf20Sopenharmony_ci#define OR_FCM_SCY_6 0x00000060 788c2ecf20Sopenharmony_ci#define OR_FCM_SCY_7 0x00000070 798c2ecf20Sopenharmony_ci#define OR_FCM_RST 0x00000008 808c2ecf20Sopenharmony_ci#define OR_FCM_RST_SHIFT 3 818c2ecf20Sopenharmony_ci#define OR_FCM_TRLX 0x00000004 828c2ecf20Sopenharmony_ci#define OR_FCM_TRLX_SHIFT 2 838c2ecf20Sopenharmony_ci#define OR_FCM_EHTR 0x00000002 848c2ecf20Sopenharmony_ci#define OR_FCM_EHTR_SHIFT 1 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci#define OR_GPCM_AM 0xFFFF8000 878c2ecf20Sopenharmony_ci#define OR_GPCM_AM_SHIFT 15 888c2ecf20Sopenharmony_ci}; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_cistruct fsl_lbc_regs { 918c2ecf20Sopenharmony_ci struct fsl_lbc_bank bank[12]; 928c2ecf20Sopenharmony_ci u8 res0[0x8]; 938c2ecf20Sopenharmony_ci __be32 mar; /**< UPM Address Register */ 948c2ecf20Sopenharmony_ci u8 res1[0x4]; 958c2ecf20Sopenharmony_ci __be32 mamr; /**< UPMA Mode Register */ 968c2ecf20Sopenharmony_ci#define MxMR_OP_NO (0 << 28) /**< normal operation */ 978c2ecf20Sopenharmony_ci#define MxMR_OP_WA (1 << 28) /**< write array */ 988c2ecf20Sopenharmony_ci#define MxMR_OP_RA (2 << 28) /**< read array */ 998c2ecf20Sopenharmony_ci#define MxMR_OP_RP (3 << 28) /**< run pattern */ 1008c2ecf20Sopenharmony_ci#define MxMR_MAD 0x3f /**< machine address */ 1018c2ecf20Sopenharmony_ci __be32 mbmr; /**< UPMB Mode Register */ 1028c2ecf20Sopenharmony_ci __be32 mcmr; /**< UPMC Mode Register */ 1038c2ecf20Sopenharmony_ci u8 res2[0x8]; 1048c2ecf20Sopenharmony_ci __be32 mrtpr; /**< Memory Refresh Timer Prescaler Register */ 1058c2ecf20Sopenharmony_ci __be32 mdr; /**< UPM Data Register */ 1068c2ecf20Sopenharmony_ci u8 res3[0x4]; 1078c2ecf20Sopenharmony_ci __be32 lsor; /**< Special Operation Initiation Register */ 1088c2ecf20Sopenharmony_ci __be32 lsdmr; /**< SDRAM Mode Register */ 1098c2ecf20Sopenharmony_ci u8 res4[0x8]; 1108c2ecf20Sopenharmony_ci __be32 lurt; /**< UPM Refresh Timer */ 1118c2ecf20Sopenharmony_ci __be32 lsrt; /**< SDRAM Refresh Timer */ 1128c2ecf20Sopenharmony_ci u8 res5[0x8]; 1138c2ecf20Sopenharmony_ci __be32 ltesr; /**< Transfer Error Status Register */ 1148c2ecf20Sopenharmony_ci#define LTESR_BM 0x80000000 1158c2ecf20Sopenharmony_ci#define LTESR_FCT 0x40000000 1168c2ecf20Sopenharmony_ci#define LTESR_PAR 0x20000000 1178c2ecf20Sopenharmony_ci#define LTESR_WP 0x04000000 1188c2ecf20Sopenharmony_ci#define LTESR_ATMW 0x00800000 1198c2ecf20Sopenharmony_ci#define LTESR_ATMR 0x00400000 1208c2ecf20Sopenharmony_ci#define LTESR_CS 0x00080000 1218c2ecf20Sopenharmony_ci#define LTESR_UPM 0x00000002 1228c2ecf20Sopenharmony_ci#define LTESR_CC 0x00000001 1238c2ecf20Sopenharmony_ci#define LTESR_NAND_MASK (LTESR_FCT | LTESR_PAR | LTESR_CC) 1248c2ecf20Sopenharmony_ci#define LTESR_MASK (LTESR_BM | LTESR_FCT | LTESR_PAR | LTESR_WP \ 1258c2ecf20Sopenharmony_ci | LTESR_ATMW | LTESR_ATMR | LTESR_CS | LTESR_UPM \ 1268c2ecf20Sopenharmony_ci | LTESR_CC) 1278c2ecf20Sopenharmony_ci#define LTESR_CLEAR 0xFFFFFFFF 1288c2ecf20Sopenharmony_ci#define LTECCR_CLEAR 0xFFFFFFFF 1298c2ecf20Sopenharmony_ci#define LTESR_STATUS LTESR_MASK 1308c2ecf20Sopenharmony_ci#define LTEIR_ENABLE LTESR_MASK 1318c2ecf20Sopenharmony_ci#define LTEDR_ENABLE 0x00000000 1328c2ecf20Sopenharmony_ci __be32 ltedr; /**< Transfer Error Disable Register */ 1338c2ecf20Sopenharmony_ci __be32 lteir; /**< Transfer Error Interrupt Register */ 1348c2ecf20Sopenharmony_ci __be32 lteatr; /**< Transfer Error Attributes Register */ 1358c2ecf20Sopenharmony_ci __be32 ltear; /**< Transfer Error Address Register */ 1368c2ecf20Sopenharmony_ci __be32 lteccr; /**< Transfer Error ECC Register */ 1378c2ecf20Sopenharmony_ci u8 res6[0x8]; 1388c2ecf20Sopenharmony_ci __be32 lbcr; /**< Configuration Register */ 1398c2ecf20Sopenharmony_ci#define LBCR_LDIS 0x80000000 1408c2ecf20Sopenharmony_ci#define LBCR_LDIS_SHIFT 31 1418c2ecf20Sopenharmony_ci#define LBCR_BCTLC 0x00C00000 1428c2ecf20Sopenharmony_ci#define LBCR_BCTLC_SHIFT 22 1438c2ecf20Sopenharmony_ci#define LBCR_AHD 0x00200000 1448c2ecf20Sopenharmony_ci#define LBCR_LPBSE 0x00020000 1458c2ecf20Sopenharmony_ci#define LBCR_LPBSE_SHIFT 17 1468c2ecf20Sopenharmony_ci#define LBCR_EPAR 0x00010000 1478c2ecf20Sopenharmony_ci#define LBCR_EPAR_SHIFT 16 1488c2ecf20Sopenharmony_ci#define LBCR_BMT 0x0000FF00 1498c2ecf20Sopenharmony_ci#define LBCR_BMT_SHIFT 8 1508c2ecf20Sopenharmony_ci#define LBCR_BMTPS 0x0000000F 1518c2ecf20Sopenharmony_ci#define LBCR_BMTPS_SHIFT 0 1528c2ecf20Sopenharmony_ci#define LBCR_INIT 0x00040000 1538c2ecf20Sopenharmony_ci __be32 lcrr; /**< Clock Ratio Register */ 1548c2ecf20Sopenharmony_ci#define LCRR_DBYP 0x80000000 1558c2ecf20Sopenharmony_ci#define LCRR_DBYP_SHIFT 31 1568c2ecf20Sopenharmony_ci#define LCRR_BUFCMDC 0x30000000 1578c2ecf20Sopenharmony_ci#define LCRR_BUFCMDC_SHIFT 28 1588c2ecf20Sopenharmony_ci#define LCRR_ECL 0x03000000 1598c2ecf20Sopenharmony_ci#define LCRR_ECL_SHIFT 24 1608c2ecf20Sopenharmony_ci#define LCRR_EADC 0x00030000 1618c2ecf20Sopenharmony_ci#define LCRR_EADC_SHIFT 16 1628c2ecf20Sopenharmony_ci#define LCRR_CLKDIV 0x0000000F 1638c2ecf20Sopenharmony_ci#define LCRR_CLKDIV_SHIFT 0 1648c2ecf20Sopenharmony_ci u8 res7[0x8]; 1658c2ecf20Sopenharmony_ci __be32 fmr; /**< Flash Mode Register */ 1668c2ecf20Sopenharmony_ci#define FMR_CWTO 0x0000F000 1678c2ecf20Sopenharmony_ci#define FMR_CWTO_SHIFT 12 1688c2ecf20Sopenharmony_ci#define FMR_BOOT 0x00000800 1698c2ecf20Sopenharmony_ci#define FMR_ECCM 0x00000100 1708c2ecf20Sopenharmony_ci#define FMR_AL 0x00000030 1718c2ecf20Sopenharmony_ci#define FMR_AL_SHIFT 4 1728c2ecf20Sopenharmony_ci#define FMR_OP 0x00000003 1738c2ecf20Sopenharmony_ci#define FMR_OP_SHIFT 0 1748c2ecf20Sopenharmony_ci __be32 fir; /**< Flash Instruction Register */ 1758c2ecf20Sopenharmony_ci#define FIR_OP0 0xF0000000 1768c2ecf20Sopenharmony_ci#define FIR_OP0_SHIFT 28 1778c2ecf20Sopenharmony_ci#define FIR_OP1 0x0F000000 1788c2ecf20Sopenharmony_ci#define FIR_OP1_SHIFT 24 1798c2ecf20Sopenharmony_ci#define FIR_OP2 0x00F00000 1808c2ecf20Sopenharmony_ci#define FIR_OP2_SHIFT 20 1818c2ecf20Sopenharmony_ci#define FIR_OP3 0x000F0000 1828c2ecf20Sopenharmony_ci#define FIR_OP3_SHIFT 16 1838c2ecf20Sopenharmony_ci#define FIR_OP4 0x0000F000 1848c2ecf20Sopenharmony_ci#define FIR_OP4_SHIFT 12 1858c2ecf20Sopenharmony_ci#define FIR_OP5 0x00000F00 1868c2ecf20Sopenharmony_ci#define FIR_OP5_SHIFT 8 1878c2ecf20Sopenharmony_ci#define FIR_OP6 0x000000F0 1888c2ecf20Sopenharmony_ci#define FIR_OP6_SHIFT 4 1898c2ecf20Sopenharmony_ci#define FIR_OP7 0x0000000F 1908c2ecf20Sopenharmony_ci#define FIR_OP7_SHIFT 0 1918c2ecf20Sopenharmony_ci#define FIR_OP_NOP 0x0 /* No operation and end of sequence */ 1928c2ecf20Sopenharmony_ci#define FIR_OP_CA 0x1 /* Issue current column address */ 1938c2ecf20Sopenharmony_ci#define FIR_OP_PA 0x2 /* Issue current block+page address */ 1948c2ecf20Sopenharmony_ci#define FIR_OP_UA 0x3 /* Issue user defined address */ 1958c2ecf20Sopenharmony_ci#define FIR_OP_CM0 0x4 /* Issue command from FCR[CMD0] */ 1968c2ecf20Sopenharmony_ci#define FIR_OP_CM1 0x5 /* Issue command from FCR[CMD1] */ 1978c2ecf20Sopenharmony_ci#define FIR_OP_CM2 0x6 /* Issue command from FCR[CMD2] */ 1988c2ecf20Sopenharmony_ci#define FIR_OP_CM3 0x7 /* Issue command from FCR[CMD3] */ 1998c2ecf20Sopenharmony_ci#define FIR_OP_WB 0x8 /* Write FBCR bytes from FCM buffer */ 2008c2ecf20Sopenharmony_ci#define FIR_OP_WS 0x9 /* Write 1 or 2 bytes from MDR[AS] */ 2018c2ecf20Sopenharmony_ci#define FIR_OP_RB 0xA /* Read FBCR bytes to FCM buffer */ 2028c2ecf20Sopenharmony_ci#define FIR_OP_RS 0xB /* Read 1 or 2 bytes to MDR[AS] */ 2038c2ecf20Sopenharmony_ci#define FIR_OP_CW0 0xC /* Wait then issue FCR[CMD0] */ 2048c2ecf20Sopenharmony_ci#define FIR_OP_CW1 0xD /* Wait then issue FCR[CMD1] */ 2058c2ecf20Sopenharmony_ci#define FIR_OP_RBW 0xE /* Wait then read FBCR bytes */ 2068c2ecf20Sopenharmony_ci#define FIR_OP_RSW 0xE /* Wait then read 1 or 2 bytes */ 2078c2ecf20Sopenharmony_ci __be32 fcr; /**< Flash Command Register */ 2088c2ecf20Sopenharmony_ci#define FCR_CMD0 0xFF000000 2098c2ecf20Sopenharmony_ci#define FCR_CMD0_SHIFT 24 2108c2ecf20Sopenharmony_ci#define FCR_CMD1 0x00FF0000 2118c2ecf20Sopenharmony_ci#define FCR_CMD1_SHIFT 16 2128c2ecf20Sopenharmony_ci#define FCR_CMD2 0x0000FF00 2138c2ecf20Sopenharmony_ci#define FCR_CMD2_SHIFT 8 2148c2ecf20Sopenharmony_ci#define FCR_CMD3 0x000000FF 2158c2ecf20Sopenharmony_ci#define FCR_CMD3_SHIFT 0 2168c2ecf20Sopenharmony_ci __be32 fbar; /**< Flash Block Address Register */ 2178c2ecf20Sopenharmony_ci#define FBAR_BLK 0x00FFFFFF 2188c2ecf20Sopenharmony_ci __be32 fpar; /**< Flash Page Address Register */ 2198c2ecf20Sopenharmony_ci#define FPAR_SP_PI 0x00007C00 2208c2ecf20Sopenharmony_ci#define FPAR_SP_PI_SHIFT 10 2218c2ecf20Sopenharmony_ci#define FPAR_SP_MS 0x00000200 2228c2ecf20Sopenharmony_ci#define FPAR_SP_CI 0x000001FF 2238c2ecf20Sopenharmony_ci#define FPAR_SP_CI_SHIFT 0 2248c2ecf20Sopenharmony_ci#define FPAR_LP_PI 0x0003F000 2258c2ecf20Sopenharmony_ci#define FPAR_LP_PI_SHIFT 12 2268c2ecf20Sopenharmony_ci#define FPAR_LP_MS 0x00000800 2278c2ecf20Sopenharmony_ci#define FPAR_LP_CI 0x000007FF 2288c2ecf20Sopenharmony_ci#define FPAR_LP_CI_SHIFT 0 2298c2ecf20Sopenharmony_ci __be32 fbcr; /**< Flash Byte Count Register */ 2308c2ecf20Sopenharmony_ci#define FBCR_BC 0x00000FFF 2318c2ecf20Sopenharmony_ci}; 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci/* 2348c2ecf20Sopenharmony_ci * FSL UPM routines 2358c2ecf20Sopenharmony_ci */ 2368c2ecf20Sopenharmony_cistruct fsl_upm { 2378c2ecf20Sopenharmony_ci __be32 __iomem *mxmr; 2388c2ecf20Sopenharmony_ci int width; 2398c2ecf20Sopenharmony_ci}; 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ciextern u32 fsl_lbc_addr(phys_addr_t addr_base); 2428c2ecf20Sopenharmony_ciextern int fsl_lbc_find(phys_addr_t addr_base); 2438c2ecf20Sopenharmony_ciextern int fsl_upm_find(phys_addr_t addr_base, struct fsl_upm *upm); 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci/** 2468c2ecf20Sopenharmony_ci * fsl_upm_start_pattern - start UPM patterns execution 2478c2ecf20Sopenharmony_ci * @upm: pointer to the fsl_upm structure obtained via fsl_upm_find 2488c2ecf20Sopenharmony_ci * @pat_offset: UPM pattern offset for the command to be executed 2498c2ecf20Sopenharmony_ci * 2508c2ecf20Sopenharmony_ci * This routine programmes UPM so the next memory access that hits an UPM 2518c2ecf20Sopenharmony_ci * will trigger pattern execution, starting at pat_offset. 2528c2ecf20Sopenharmony_ci */ 2538c2ecf20Sopenharmony_cistatic inline void fsl_upm_start_pattern(struct fsl_upm *upm, u8 pat_offset) 2548c2ecf20Sopenharmony_ci{ 2558c2ecf20Sopenharmony_ci clrsetbits_be32(upm->mxmr, MxMR_MAD, MxMR_OP_RP | pat_offset); 2568c2ecf20Sopenharmony_ci} 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci/** 2598c2ecf20Sopenharmony_ci * fsl_upm_end_pattern - end UPM patterns execution 2608c2ecf20Sopenharmony_ci * @upm: pointer to the fsl_upm structure obtained via fsl_upm_find 2618c2ecf20Sopenharmony_ci * 2628c2ecf20Sopenharmony_ci * This routine reverts UPM to normal operation mode. 2638c2ecf20Sopenharmony_ci */ 2648c2ecf20Sopenharmony_cistatic inline void fsl_upm_end_pattern(struct fsl_upm *upm) 2658c2ecf20Sopenharmony_ci{ 2668c2ecf20Sopenharmony_ci clrbits32(upm->mxmr, MxMR_OP_RP); 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci while (in_be32(upm->mxmr) & MxMR_OP_RP) 2698c2ecf20Sopenharmony_ci cpu_relax(); 2708c2ecf20Sopenharmony_ci} 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci/* overview of the fsl lbc controller */ 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_cistruct fsl_lbc_ctrl { 2758c2ecf20Sopenharmony_ci /* device info */ 2768c2ecf20Sopenharmony_ci struct device *dev; 2778c2ecf20Sopenharmony_ci struct fsl_lbc_regs __iomem *regs; 2788c2ecf20Sopenharmony_ci int irq[2]; 2798c2ecf20Sopenharmony_ci wait_queue_head_t irq_wait; 2808c2ecf20Sopenharmony_ci spinlock_t lock; 2818c2ecf20Sopenharmony_ci void *nand; 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci /* status read from LTESR by irq handler */ 2848c2ecf20Sopenharmony_ci unsigned int irq_status; 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci#ifdef CONFIG_SUSPEND 2878c2ecf20Sopenharmony_ci /* save regs when system go to deep-sleep */ 2888c2ecf20Sopenharmony_ci struct fsl_lbc_regs *saved_regs; 2898c2ecf20Sopenharmony_ci#endif 2908c2ecf20Sopenharmony_ci}; 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ciextern int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, 2938c2ecf20Sopenharmony_ci u32 mar); 2948c2ecf20Sopenharmony_ciextern struct fsl_lbc_ctrl *fsl_lbc_ctrl_dev; 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci#endif /* __ASM_FSL_LBC_H */ 297