Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit df66e716 authored by Stefan Roese's avatar Stefan Roese Committed by David Woodhouse
Browse files

[MTD] physmap.c: Add support for multiple resources



This patch extends the physmap mapping driver to support multiple
resources for non-identical NOR chips that will be concatenated together
when selected.

This is needed for example for Intel 48F4400 512MBit chips, since they
consist of 2 single different NOR chips with different geometries. The
first (lower) one has botton boot sectors and the 2nd (upper) has top
boot sectors. This currently isn't handled correctly by calling the
physmap driver once with only one resource covering both chips in one
memory region. The same geometrie is used for both chips.

With this patch the following resource structure can be used to
describe the 48F4400 chip correctly:

static struct resource board_nor_resource[] = {
	[0] = {
		.start = 0xf8000000,
		.end = 0xfbffffff,
		.flags = IORESOURCE_MEM,
	},
	[1] = {
		.start = 0xfc000000,
		.end = 0xffffffff,
		.flags = IORESOURCE_MEM,
	}
};

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 1c45f604
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment