Lines Matching +full:cfi +full:- +full:flash
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* sbc_gxx.c -- MTD map driver for Arcom Control Systems SBC-MediaGX,
3 SBC-GXm and SBC-GX1 series boards.
8 The SBC-MediaGX / SBC-GXx has up to 16 MiB of
11 This driver uses the CFI probe and Intel Extended Command Set drivers.
13 The flash is accessed as follows:
15 16 KiB memory window at 0xdc000-0xdffff
20 bit 0-7: address bit 14-21
22 bit 0-1: address bit 22-23
23 bit 7: 0 - reset/powered down
24 1 - device enabled
26 The single flash device is divided into 3 partition which appear as
30 (to support bzImages up to 638KiB-ish)
46 // - Hardware specific
55 #define WINDOW_MASK (WINDOW_LENGTH-1)
62 // - Flash / Partition sizing
71 static volatile int page_in_window = -1; // Current page in window.
76 * single flash device into. If the size if zero we use up to the end of the
79 { .name = "SBC-GXx flash boot partition",
82 { .name = "SBC-GXx flash data partition",
85 { .name = "SBC-GXx flash application partition",
116 if (len > (WINDOW_LENGTH - (from & WINDOW_MASK))) in sbc_gxx_copy_from()
117 thislen = WINDOW_LENGTH-(from & WINDOW_MASK); in sbc_gxx_copy_from()
125 len -= thislen; in sbc_gxx_copy_from()
141 if (len > (WINDOW_LENGTH - (to & WINDOW_MASK))) in sbc_gxx_copy_to()
142 thislen = WINDOW_LENGTH-(to & WINDOW_MASK); in sbc_gxx_copy_to()
150 len -= thislen; in sbc_gxx_copy_to()
155 .name = "SBC-GXx flash",
158 of flash so the cfi probe routines find all
167 /* MTD device for all of the flash. */
187 return -EIO; in init_sbc_gxx()
190 if (!request_region( PAGE_IO, PAGE_IO_SIZE, "SBC-GXx flash")) { in init_sbc_gxx()
191 printk( KERN_ERR"%s: IO ports 0x%x-0x%x in use\n", in init_sbc_gxx()
193 PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1 ); in init_sbc_gxx()
195 return -EAGAIN; in init_sbc_gxx()
199 printk( KERN_INFO"%s: IO:0x%x-0x%x MEM:0x%x-0x%x\n", in init_sbc_gxx()
201 PAGE_IO, PAGE_IO+PAGE_IO_SIZE-1, in init_sbc_gxx()
202 WINDOW_START, WINDOW_START+WINDOW_LENGTH-1 ); in init_sbc_gxx()
208 return -ENXIO; in init_sbc_gxx()
211 all_mtd->owner = THIS_MODULE; in init_sbc_gxx()
224 MODULE_DESCRIPTION("MTD map driver for SBC-GXm and SBC-GX1 series boards");