Lines Matching +full:physmap +full:- +full:flash
1 // SPDX-License-Identifier: GPL-2.0
3 * Intel IXP4xx OF physmap add-on
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
17 #include "physmap-ixp4xx.h"
20 * Read/write a 16 bit word from flash address 'addr'.
22 * When the cpu is in little-endian mode it swizzles the address lines
24 * and the like end up on the correct flash address.
27 * handles 32 bit reads, the byte stream ABCD is stored on the flash as:
29 * +---+---+
31 * +---+---+
33 * +---+---+
36 * data and other flash commands which are always in D7-D0.
73 val.x[0] = flash_read16(map->virt + ofs); in ixp4xx_read16()
78 * The IXP4xx expansion bus only allows 16-bit wide acceses
79 * when attached to a 16-bit wide device (such as the 28F128J3A),
86 void __iomem *src = map->virt + from; in ixp4xx_copy_from()
92 *dest++ = BYTE1(flash_read16(src-1)); in ixp4xx_copy_from()
94 --len; in ixp4xx_copy_from()
102 len -= 2; in ixp4xx_copy_from()
111 flash_write16(d.x[0], map->virt + adr); in ixp4xx_write16()
118 struct device *dev = &pdev->dev; in of_flash_probe_ixp4xx()
121 if (!of_device_is_compatible(np, "intel,ixp4xx-flash")) in of_flash_probe_ixp4xx()
124 map->read = ixp4xx_read16; in of_flash_probe_ixp4xx()
125 map->write = ixp4xx_write16; in of_flash_probe_ixp4xx()
126 map->copy_from = ixp4xx_copy_from; in of_flash_probe_ixp4xx()
127 map->copy_to = NULL; in of_flash_probe_ixp4xx()
129 dev_info(dev, "initialized Intel IXP4xx-specific physmap control\n"); in of_flash_probe_ixp4xx()