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

Commit 6469c92e authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

Merge commit 'jwb/jwb-merge' into merge

Manual merge of:
	arch/powerpc/configs/44x/warp_defconfig
parents 0411648e 0b21bcd5
Loading
Loading
Loading
Loading
+0 −43
Original line number Original line Diff line number Diff line
@@ -18,57 +18,14 @@


static bd_t bd;
static bd_t bd;


static void warp_fixup_one_nor(u32 from, u32 to)
{
	void *devp;
	char name[50];
	u32 v[2];

	sprintf(name, "/plb/opb/ebc/nor_flash@0,0/partition@%x", from);

	devp = finddevice(name);
	if (!devp)
		return;

	if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) {
		v[0] = to;
		setprop(devp, "reg", v, sizeof(v));

		printf("NOR 64M fixup %x -> %x\r\n", from, to);
	}
}


static void warp_fixups(void)
static void warp_fixups(void)
{
{
	ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
	ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
	ibm4xx_sdram_fixup_memsize();
	ibm4xx_sdram_fixup_memsize();
	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
	dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
	dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);

	/* Fixup for 64M flash on Rev A boards. */
	if (bd.bi_flashsize == 0x4000000) {
		void *devp;
		u32 v[3];

		devp = finddevice("/plb/opb/ebc/nor_flash@0,0");
		if (!devp)
			return;

		/* Fixup the size */
		if (getprop(devp, "reg", v, sizeof(v)) == sizeof(v)) {
			v[2] = bd.bi_flashsize;
			setprop(devp, "reg", v, sizeof(v));
}
}


		/* Fixup parition offsets */
		warp_fixup_one_nor(0x300000, 0x3f00000);
		warp_fixup_one_nor(0x340000, 0x3f40000);
		warp_fixup_one_nor(0x380000, 0x3f80000);
	}
}


void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
		   unsigned long r6, unsigned long r7)
		   unsigned long r6, unsigned long r7)
{
{
+4 −1
Original line number Original line Diff line number Diff line
@@ -89,8 +89,11 @@
		clock-frequency = <0>; /* Filled in by U-Boot */
		clock-frequency = <0>; /* Filled in by U-Boot */


		SDRAM0: memory-controller {
		SDRAM0: memory-controller {
			compatible = "ibm,sdram-405exr";
			compatible = "ibm,sdram-405exr", "ibm,sdram-4xx-ddr2";
			dcr-reg = <0x010 0x002>;
			dcr-reg = <0x010 0x002>;
			interrupt-parent = <&UIC2>;
			interrupts = <0x5 0x4	/* ECC DED Error */ 
				      0x6 0x4>;	/* ECC SEC Error */ 
		};
		};


		MAL0: mcmal {
		MAL0: mcmal {
+4 −1
Original line number Original line Diff line number Diff line
@@ -90,8 +90,11 @@
		clock-frequency = <0>; /* Filled in by U-Boot */
		clock-frequency = <0>; /* Filled in by U-Boot */


		SDRAM0: memory-controller {
		SDRAM0: memory-controller {
			compatible = "ibm,sdram-405ex";
			compatible = "ibm,sdram-405ex", "ibm,sdram-4xx-ddr2";
			dcr-reg = <0x010 0x002>;
			dcr-reg = <0x010 0x002>;
			interrupt-parent = <&UIC2>;
			interrupts = <0x5 0x4	/* ECC DED Error */ 
				      0x6 0x4>;	/* ECC SEC Error */ 
		};
		};


		MAL0: mcmal {
		MAL0: mcmal {
+4 −1
Original line number Original line Diff line number Diff line
@@ -90,8 +90,11 @@
		clock-frequency = <0>; /* Filled in by U-Boot */
		clock-frequency = <0>; /* Filled in by U-Boot */


		SDRAM0: memory-controller {
		SDRAM0: memory-controller {
			compatible = "ibm,sdram-405ex";
			compatible = "ibm,sdram-405ex", "ibm,sdram-4xx-ddr2";
			dcr-reg = <0x010 0x002>;
			dcr-reg = <0x010 0x002>;
			interrupt-parent = <&UIC2>;
			interrupts = <0x5 0x4 /* ECC DED Error */
			              0x6 0x4 /* ECC SEC Error */ >;
		};
		};


		MAL0: mcmal {
		MAL0: mcmal {
+41 −1
Original line number Original line Diff line number Diff line
@@ -149,12 +149,17 @@
					reg = <0x00000002 0x00004000 0x00000A00>;
					reg = <0x00000002 0x00004000 0x00000A00>;
				};
				};


				nor_flash@0,0 {
				nor@0,0 {
					compatible = "amd,s29gl032a", "cfi-flash";
					compatible = "amd,s29gl032a", "cfi-flash";
					bank-width = <2>;
					bank-width = <2>;
					reg = <0x00000000 0x00000000 0x00400000>;
					reg = <0x00000000 0x00000000 0x00400000>;
					#address-cells = <1>;
					#address-cells = <1>;
					#size-cells = <1>;
					#size-cells = <1>;

					partition@0 {
						label = "splash";
						reg = <0x00000000 0x00020000>;
					};
					partition@300000 {
					partition@300000 {
						label = "fpga";
						label = "fpga";
						reg = <0x0300000 0x00040000>;
						reg = <0x0300000 0x00040000>;
@@ -168,6 +173,41 @@
						reg = <0x0380000 0x00080000>;
						reg = <0x0380000 0x00080000>;
					};
					};
				};
				};

				ndfc@1,0 {
					compatible = "ibm,ndfc";
					reg = <0x00000001 0x00000000 0x00002000>;
					ccr = <0x00001000>;
					bank-settings = <0x80002222>;
					#address-cells = <1>;
					#size-cells = <1>;

					nand {
						#address-cells = <1>;
						#size-cells = <1>;

						partition@0 {
							label = "kernel";
							reg = <0x00000000 0x00200000>;
						};
						partition@200000 {
							label = "root";
							reg = <0x00200000 0x03E00000>;
						};
						partition@40000000 {
							label = "persistent";
							reg = <0x04000000 0x04000000>;
						};
						partition@80000000 {
							label = "persistent1";
							reg = <0x08000000 0x04000000>;
						};
						partition@C0000000 {
							label = "persistent2";
							reg = <0x0C000000 0x04000000>;
						};
					};
				};
			};
			};


			UART0: serial@ef600300 {
			UART0: serial@ef600300 {
Loading