9
0
Fork 0
barebox/drivers
Sascha Hauer 10e6930323 mtd: partition: Fix OF partition fixup
To get the number of address cells and size cells we have to use
the newly created partition node, not the parent device node. The
parent device node returns the address/size cells of the controller
node, not the partition node.

On an am335x machine this fixes the device tree passed to Linux.
The situation there is:
	...
	gpmc@50000000 {
		...
		#address-cells = <0x2>;
		#size-cells = <0x1>;
		ranges = <0x0 0x0 0x8000000 0x10000000>;
		...
		nand@0,0 {
			reg = <0x0 0x0 0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			...
			partition@7 {
				label = "system";
				reg = <0x220000 0x7de0000>;
			};
		};
	};

and without this patch barebox passes three bytes for
partition@7's reg property instead of only two which naturally
confuses Linux and yields to the system partition to start at 0
with a size of 0x220000.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2015-04-28 09:09:46 +02:00
..
amba resource: Let request_iomem_region return an error pointer 2014-09-16 08:32:09 +02:00
ata AHCI: convert to streaming DMA ops 2015-03-06 07:52:02 +01:00
base driver: Call bus->remove instead of driver->remove 2015-03-17 07:24:55 +01:00
bus sizes.h: move include/sizes.h to include/linux/sizes.h 2015-01-08 14:00:26 +01:00
clk clk: fractional-divider: fix build with CONFIG_MODULES 2015-03-26 07:47:48 +01:00
clocksource clock: incorporate dummy clocksource into core clock code 2014-12-17 12:15:11 +01:00
dma ARM: move DMA alloc functions to dma.h 2015-03-06 07:52:02 +01:00
eeprom fix format specifiers 2014-06-05 09:35:31 +02:00
firmware firmware: altera: Make nSTAT GPIO optional 2015-02-19 20:50:19 +01:00
gpio ARM: MXS: Make gpio a driver 2015-01-28 08:18:43 +01:00
i2c driver: Call remove function only when available 2015-03-17 07:24:50 +01:00
input input: Let input support depend on !CONSOLE_NONE 2014-10-08 08:11:02 +02:00
led led: gpio: add support for default-state dt-property 2015-03-04 11:35:50 +01:00
mci mci: core: Check return value of dev_add_param_bool 2015-03-19 07:52:24 +01:00
mfd resource: Let dev_get_resource return an error pointer 2014-09-16 08:32:09 +02:00
misc state: add framework for persistent state handling 2015-03-12 08:28:31 +01:00
mtd mtd: partition: Fix OF partition fixup 2015-04-28 09:09:46 +02:00
net Merge branch 'for-next/pxa' 2015-04-13 12:57:13 +02:00
of Merge branch 'for-next/tegra' 2015-03-09 08:32:26 +01:00
pci Merge branch 'for-next/pci' 2015-04-13 12:57:13 +02:00
phy add generic PHY framework 2014-11-04 09:50:44 +01:00
pinctrl Merge branch 'for-next/mxs' 2015-02-04 19:09:15 +01:00
pwm PWM: i.MX: register successfully without alias 2015-03-09 06:34:20 +01:00
regulator regulator: add bcm2835 driver 2015-02-04 15:49:59 +01:00
reset reset: add reset controller framework 2014-05-15 14:17:11 +02:00
rtc rtc: select GREGORIAN_CALENDER 2014-11-27 17:12:39 +01:00
serial Merge branch 'for-next/raspberry-pi' 2015-02-04 19:09:15 +01:00
spi driver: Call remove function only when available 2015-03-17 07:24:50 +01:00
usb USB: xHCI: Sync non-coherent DMA buffers 2015-04-15 14:05:42 +02:00
video ARM: move DMA alloc functions to dma.h 2015-03-06 07:52:02 +01:00
w1 driver: Call remove function only when available 2015-03-17 07:24:50 +01:00
watchdog wdog: imx-wd: Disable watchdog powerdown counter 2015-04-13 08:35:54 +02:00
Kconfig add generic PHY framework 2014-11-04 09:50:44 +01:00
Makefile add generic PHY framework 2014-11-04 09:50:44 +01:00