X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/265e43f20de7a9d8efb05092b4f037a12c3f1b6d..9ee3790b2ad1c280570dd7beaeb112c7fce7b314:/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch?ds=sidebyside diff --git a/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch b/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch index 512219235..66ebcfe3f 100644 --- a/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch +++ b/target/linux/rdc/patches-2.6.32/100-rdc_boards.patch @@ -1,3 +1,15 @@ +--- a/arch/x86/Makefile ++++ b/arch/x86/Makefile +@@ -125,6 +125,9 @@ libs-y += arch/x86/lib/ + # See arch/x86/Kbuild for content of core part of the kernel + core-y += arch/x86/ + ++# RDC R-321X support ++core-$(CONFIG_X86_RDC321X) += arch/x86/mach-rdc321x/ ++ + # drivers-y are linked after core-y + drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/ + drivers-$(CONFIG_PCI) += arch/x86/pci/ --- /dev/null +++ b/arch/x86/mach-rdc321x/Makefile @@ -0,0 +1,5 @@ @@ -340,7 +352,7 @@ + + rdc_flash_parts[0].name = "firmware"; + rdc_flash_parts[0].offset = 0x0; -+ rdc_flash_parts[0].size = 0x3E0000 - 0x8000; ++ rdc_flash_parts[0].size = 0x3E0000; + rdc_flash_parts[1].name = "rootfs"; + rdc_flash_parts[1].offset = header.kernelsz + sizeof(header); + rdc_flash_parts[1].size = rdc_flash_parts[0].size - rdc_flash_parts[1].offset; @@ -372,7 +384,7 @@ +arch_initcall(ar525w_setup); --- /dev/null +++ b/arch/x86/mach-rdc321x/boards/bifferboard.c -@@ -0,0 +1,81 @@ +@@ -0,0 +1,69 @@ +/* + * Bifferboard RDC321x platform devices + * @@ -409,38 +421,26 @@ + u32 kernel_len; + u16 tmp; + -+ if (master->size == 0x100000) -+ kernel_len = master->size - 0x10000; -+ else { -+ res = master->read(master, 0x4000 + 1036, 2, &len, (char *) &tmp); -+ if (res) -+ return res; -+ kernel_len = tmp * master->erasesize; -+ } ++ res = master->read(master, 0x4000 + 1036, 2, &len, (char *) &tmp); ++ if (res) ++ return res; ++ kernel_len = tmp * master->erasesize; + -+ rdc_flash_parts = kzalloc(sizeof(struct mtd_partition) * 4, GFP_KERNEL); ++ rdc_flash_parts = kzalloc(sizeof(struct mtd_partition) * 3, GFP_KERNEL); + + *pparts = rdc_flash_parts; + -+ rdc_flash_parts[0].name = "biffboot"; -+ rdc_flash_parts[0].offset = master->size - 0x10000; -+ rdc_flash_parts[0].size = 0x10000; -+ rdc_flash_parts[0].mask_flags = MTD_WRITEABLE; -+ rdc_flash_parts[1].name = "firmware"; -+ rdc_flash_parts[1].offset = 0; -+ rdc_flash_parts[1].size = rdc_flash_parts[0].offset; -+ rdc_flash_parts[2].name = "kernel"; -+ rdc_flash_parts[2].offset = 0x00000000; -+ rdc_flash_parts[2].size = kernel_len; -+ -+ if (master->size == 0x100000) -+ return 2; -+ -+ rdc_flash_parts[3].name = "rootfs"; -+ rdc_flash_parts[3].offset = MTDPART_OFS_APPEND; -+ rdc_flash_parts[3].size = rdc_flash_parts[1].size - rdc_flash_parts[2].size; ++ rdc_flash_parts[0].name = "kernel"; ++ rdc_flash_parts[0].offset = 0; ++ rdc_flash_parts[0].size = kernel_len; ++ rdc_flash_parts[1].name = "rootfs"; ++ rdc_flash_parts[1].offset = kernel_len; ++ rdc_flash_parts[1].size = master->size - kernel_len - 0x10000; ++ rdc_flash_parts[2].name = "biffboot"; ++ rdc_flash_parts[2].offset = master->size - 0x10000; ++ rdc_flash_parts[2].size = 0x10000; + -+ return 4; ++ return 3; +} + +struct mtd_part_parser __initdata bifferboard_parser = { @@ -600,7 +600,7 @@ + + rdc_flash_parts[0].name = "firmware"; + rdc_flash_parts[0].offset = 0x8000; -+ rdc_flash_parts[0].size = 0x3F0000; ++ rdc_flash_parts[0].size = 0x3F0000 - 0x8000; + rdc_flash_parts[1].name = "config"; + rdc_flash_parts[1].offset = 0; + rdc_flash_parts[1].size = 0x8000;