Lines Matching +full:cs +full:- +full:3

2  * board-flash.c
3 * Modified from mach-omap2/board-3430sdp-flash.c
26 #include "board-flash.h"
30 #define MAX_SUPPORTED_GPMC_CONFIG 3
47 .name = "physmap-flash",
57 __init board_nor_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) in board_nor_init() argument
66 err = gpmc_cs_request(cs, FLASH_SIZE_SDPV2 - 1, in board_nor_init()
69 + FLASH_SIZE_SDPV2 - 1; in board_nor_init()
71 err = gpmc_cs_request(cs, FLASH_SIZE_SDPV1 - 1, in board_nor_init()
74 + FLASH_SIZE_SDPV1 - 1; in board_nor_init()
77 pr_err("NOR: Can't request GPMC CS\n"); in board_nor_init()
87 .dma_channel = -1, /* disable DMA in OMAP OneNAND driver */
92 u8 nr_parts, u8 cs) in board_onenand_init() argument
94 board_onenand_data.cs = cs; in board_onenand_init()
102 __init board_onenand_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) in board_onenand_init() argument
140 u8 nr_parts, u8 cs, int nand_type) in board_nand_init() argument
142 board_nand_data.cs = cs; in board_nand_init()
148 board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs; in board_nand_init()
154 * get_gpmc0_type - Reads the FPGA DIP_SWITCH_INPUT_REGISTER2 to get
155 * the various cs values.
159 u8 cs = 0; in get_gpmc0_type() local
164 return -ENOMEM; in get_gpmc0_type()
171 /* S8-DIP-OFF = 1, S8-DIP-ON = 0 */ in get_gpmc0_type()
172 cs = __raw_readw(fpga_map_addr + REG_FPGA_DIP_SWITCH_INPUT2) & 0xf; in get_gpmc0_type()
174 /* ES2.0 SDP's onwards 4 dip switches are provided for CS */ in get_gpmc0_type()
176 /* change (S8-1:4=DS-2:0) to (S8-4:1=DS-2:0) */ in get_gpmc0_type()
177 cs = ((cs & 8) >> 3) | ((cs & 4) >> 1) | in get_gpmc0_type()
178 ((cs & 2) << 1) | ((cs & 1) << 3); in get_gpmc0_type()
180 /* change (S8-1:3=DS-2:0) to (S8-3:1=DS-2:0) */ in get_gpmc0_type()
181 cs = ((cs & 4) >> 2) | (cs & 2) | ((cs & 1) << 2); in get_gpmc0_type()
184 return cs; in get_gpmc0_type()
188 * board_flash_init - Identify devices connected to GPMC and register.
190 * @return - void.
195 u8 cs = 0; in board_flash_init() local
203 * for which cs configuration matches for 2430 SDP? in board_flash_init()
207 pr_err("%s: Invalid chip select: %d\n", __func__, cs); in board_flash_init()
212 while (cs < GPMC_CS_NUM) { in board_flash_init()
213 switch (config_sel[cs]) { in board_flash_init()
216 norcs = cs; in board_flash_init()
220 nandcs = cs; in board_flash_init()
224 onenandcs = cs; in board_flash_init()
227 cs++; in board_flash_init()