powerpc: fix linkstation and storcenter compilation breakage

Defining flash partition table in platform code is deprecated, and due to
recent changes linkstation and storcenter do not compile any more with
their default configurations because of undefined references to
physmap_set_partitions(). Instead of fixing them by using the correct
kernel configuration macro in preprocessor conditional, remove partition
table definitions altogether. Instead add support for partition definition
on the command-line and in device tree to the default configurations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by Guennadi Liakhovetski and committed by Kumar Gala ed75d863 368a1211

+44 -97
+22 -14
arch/powerpc/configs/linkstation_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.29-rc2 4 - # Mon Jan 26 15:35:29 2009 3 + # Linux kernel version: 2.6.29-rc6 4 + # Fri Mar 6 00:07:38 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 71 71 # CONFIG_BSD_PROCESS_ACCT is not set 72 72 # CONFIG_TASKSTATS is not set 73 73 # CONFIG_AUDIT is not set 74 + 75 + # 76 + # RCU Subsystem 77 + # 78 + CONFIG_CLASSIC_RCU=y 79 + # CONFIG_TREE_RCU is not set 80 + # CONFIG_PREEMPT_RCU is not set 81 + # CONFIG_TREE_RCU_TRACE is not set 82 + # CONFIG_PREEMPT_RCU_TRACE is not set 74 83 CONFIG_IKCONFIG=y 75 84 CONFIG_IKCONFIG_PROC=y 76 85 CONFIG_LOG_BUF_SHIFT=14 ··· 97 88 # CONFIG_IPC_NS is not set 98 89 # CONFIG_USER_NS is not set 99 90 # CONFIG_PID_NS is not set 91 + # CONFIG_NET_NS is not set 100 92 CONFIG_BLK_DEV_INITRD=y 101 93 CONFIG_INITRAMFS_SOURCE="" 102 94 CONFIG_CC_OPTIMIZE_FOR_SIZE=y ··· 163 153 # CONFIG_DEFAULT_CFQ is not set 164 154 # CONFIG_DEFAULT_NOOP is not set 165 155 CONFIG_DEFAULT_IOSCHED="anticipatory" 166 - CONFIG_CLASSIC_RCU=y 167 - # CONFIG_TREE_RCU is not set 168 - # CONFIG_PREEMPT_RCU is not set 169 - # CONFIG_TREE_RCU_TRACE is not set 170 - # CONFIG_PREEMPT_RCU_TRACE is not set 171 156 # CONFIG_FREEZER is not set 172 157 173 158 # ··· 299 294 # 300 295 # Networking options 301 296 # 302 - # CONFIG_NET_NS is not set 303 297 CONFIG_COMPAT_NET_DEV_OPS=y 304 298 CONFIG_PACKET=y 305 299 CONFIG_PACKET_MMAP=y ··· 512 508 CONFIG_MTD_PARTITIONS=y 513 509 # CONFIG_MTD_TESTS is not set 514 510 # CONFIG_MTD_REDBOOT_PARTS is not set 515 - # CONFIG_MTD_CMDLINE_PARTS is not set 516 - # CONFIG_MTD_OF_PARTS is not set 511 + CONFIG_MTD_CMDLINE_PARTS=y 512 + CONFIG_MTD_OF_PARTS=y 517 513 # CONFIG_MTD_AR7_PARTS is not set 518 514 519 515 # ··· 591 587 # LPDDR flash memory drivers 592 588 # 593 589 # CONFIG_MTD_LPDDR is not set 594 - # CONFIG_MTD_QINFO_PROBE is not set 595 590 596 591 # 597 592 # UBI - Unsorted block images ··· 620 617 # CONFIG_BLK_DEV_HD is not set 621 618 CONFIG_MISC_DEVICES=y 622 619 # CONFIG_PHANTOM is not set 623 - # CONFIG_EEPROM_93CX6 is not set 624 620 # CONFIG_SGI_IOC4 is not set 625 621 # CONFIG_TIFM_CORE is not set 626 622 # CONFIG_ICS932S401 is not set 627 623 # CONFIG_ENCLOSURE_SERVICES is not set 628 624 # CONFIG_HP_ILO is not set 629 625 # CONFIG_C2PORT is not set 626 + 627 + # 628 + # EEPROM support 629 + # 630 + # CONFIG_EEPROM_AT24 is not set 631 + CONFIG_EEPROM_LEGACY=m 632 + # CONFIG_EEPROM_93CX6 is not set 630 633 CONFIG_HAVE_IDE=y 631 634 # CONFIG_IDE is not set 632 635 ··· 848 839 # CONFIG_QLA3XXX is not set 849 840 # CONFIG_ATL1 is not set 850 841 # CONFIG_ATL1E is not set 842 + # CONFIG_ATL1C is not set 851 843 # CONFIG_JME is not set 852 844 CONFIG_NETDEV_10000=y 853 845 # CONFIG_CHELSIO_T1 is not set ··· 1047 1037 # Miscellaneous I2C Chip support 1048 1038 # 1049 1039 # CONFIG_DS1682 is not set 1050 - # CONFIG_EEPROM_AT24 is not set 1051 - CONFIG_EEPROM_LEGACY=m 1052 1040 # CONFIG_SENSORS_PCF8574 is not set 1053 1041 # CONFIG_PCF8575 is not set 1054 1042 # CONFIG_SENSORS_PCA9539 is not set
+22 -13
arch/powerpc/configs/storcenter_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.29-rc2 4 - # Mon Jan 26 15:35:46 2009 3 + # Linux kernel version: 2.6.29-rc6 4 + # Fri Mar 6 00:09:08 2009 5 5 # 6 6 # CONFIG_PPC64 is not set 7 7 ··· 71 71 # CONFIG_BSD_PROCESS_ACCT is not set 72 72 # CONFIG_TASKSTATS is not set 73 73 # CONFIG_AUDIT is not set 74 + 75 + # 76 + # RCU Subsystem 77 + # 78 + CONFIG_CLASSIC_RCU=y 79 + # CONFIG_TREE_RCU is not set 80 + # CONFIG_PREEMPT_RCU is not set 81 + # CONFIG_TREE_RCU_TRACE is not set 82 + # CONFIG_PREEMPT_RCU_TRACE is not set 74 83 # CONFIG_IKCONFIG is not set 75 84 CONFIG_LOG_BUF_SHIFT=14 76 85 CONFIG_GROUP_SCHED=y ··· 153 144 CONFIG_DEFAULT_CFQ=y 154 145 # CONFIG_DEFAULT_NOOP is not set 155 146 CONFIG_DEFAULT_IOSCHED="cfq" 156 - CONFIG_CLASSIC_RCU=y 157 - # CONFIG_TREE_RCU is not set 158 - # CONFIG_PREEMPT_RCU is not set 159 - # CONFIG_TREE_RCU_TRACE is not set 160 - # CONFIG_PREEMPT_RCU_TRACE is not set 161 147 # CONFIG_FREEZER is not set 162 148 163 149 # ··· 381 377 CONFIG_MTD_PARTITIONS=y 382 378 # CONFIG_MTD_TESTS is not set 383 379 # CONFIG_MTD_REDBOOT_PARTS is not set 384 - # CONFIG_MTD_CMDLINE_PARTS is not set 385 - # CONFIG_MTD_OF_PARTS is not set 380 + CONFIG_MTD_CMDLINE_PARTS=y 381 + CONFIG_MTD_OF_PARTS=y 386 382 # CONFIG_MTD_AR7_PARTS is not set 387 383 388 384 # ··· 456 452 # LPDDR flash memory drivers 457 453 # 458 454 # CONFIG_MTD_LPDDR is not set 459 - # CONFIG_MTD_QINFO_PROBE is not set 460 455 461 456 # 462 457 # UBI - Unsorted block images ··· 481 478 # CONFIG_BLK_DEV_HD is not set 482 479 CONFIG_MISC_DEVICES=y 483 480 # CONFIG_PHANTOM is not set 484 - # CONFIG_EEPROM_93CX6 is not set 485 481 # CONFIG_SGI_IOC4 is not set 486 482 # CONFIG_TIFM_CORE is not set 487 483 # CONFIG_ICS932S401 is not set 488 484 # CONFIG_ENCLOSURE_SERVICES is not set 489 485 # CONFIG_HP_ILO is not set 490 486 # CONFIG_C2PORT is not set 487 + 488 + # 489 + # EEPROM support 490 + # 491 + # CONFIG_EEPROM_AT24 is not set 492 + # CONFIG_EEPROM_LEGACY is not set 493 + # CONFIG_EEPROM_93CX6 is not set 491 494 CONFIG_HAVE_IDE=y 492 495 CONFIG_IDE=y 493 496 ··· 686 677 # CONFIG_QLA3XXX is not set 687 678 # CONFIG_ATL1 is not set 688 679 # CONFIG_ATL1E is not set 680 + # CONFIG_ATL1C is not set 689 681 # CONFIG_JME is not set 690 682 # CONFIG_NETDEV_10000 is not set 691 683 # CONFIG_TR is not set ··· 828 818 # Miscellaneous I2C Chip support 829 819 # 830 820 # CONFIG_DS1682 is not set 831 - # CONFIG_EEPROM_AT24 is not set 832 - # CONFIG_EEPROM_LEGACY is not set 833 821 # CONFIG_SENSORS_PCF8574 is not set 834 822 # CONFIG_PCF8575 is not set 835 823 # CONFIG_SENSORS_PCA9539 is not set ··· 1167 1159 # CONFIG_SYSV_FS is not set 1168 1160 # CONFIG_UFS_FS is not set 1169 1161 # CONFIG_NETWORK_FILESYSTEMS is not set 1162 + CONFIG_EXPORTFS=m 1170 1163 1171 1164 # 1172 1165 # Partition Types
-38
arch/powerpc/platforms/embedded6xx/linkstation.c
··· 12 12 13 13 #include <linux/kernel.h> 14 14 #include <linux/initrd.h> 15 - #include <linux/mtd/physmap.h> 16 15 #include <linux/of_platform.h> 17 16 18 17 #include <asm/time.h> ··· 20 21 #include <asm/pci-bridge.h> 21 22 22 23 #include "mpc10x.h" 23 - 24 - static struct mtd_partition linkstation_physmap_partitions[] = { 25 - { 26 - .name = "mtd_firmimg", 27 - .offset = 0x000000, 28 - .size = 0x300000, 29 - }, 30 - { 31 - .name = "mtd_bootcode", 32 - .offset = 0x300000, 33 - .size = 0x070000, 34 - }, 35 - { 36 - .name = "mtd_status", 37 - .offset = 0x370000, 38 - .size = 0x010000, 39 - }, 40 - { 41 - .name = "mtd_conf", 42 - .offset = 0x380000, 43 - .size = 0x080000, 44 - }, 45 - { 46 - .name = "mtd_allflash", 47 - .offset = 0x000000, 48 - .size = 0x400000, 49 - }, 50 - { 51 - .name = "mtd_data", 52 - .offset = 0x310000, 53 - .size = 0x0f0000, 54 - }, 55 - }; 56 24 57 25 static __initdata struct of_device_id of_bus_ids[] = { 58 26 { .type = "soc", }, ··· 65 99 static void __init linkstation_setup_arch(void) 66 100 { 67 101 struct device_node *np; 68 - #ifdef CONFIG_MTD_PHYSMAP 69 - physmap_set_partitions(linkstation_physmap_partitions, 70 - ARRAY_SIZE(linkstation_physmap_partitions)); 71 - #endif 72 102 73 103 /* Lookup PCI host bridges */ 74 104 for_each_compatible_node(np, "pci", "mpc10x-pci")
-32
arch/powerpc/platforms/embedded6xx/storcenter.c
··· 14 14 #include <linux/kernel.h> 15 15 #include <linux/pci.h> 16 16 #include <linux/initrd.h> 17 - #include <linux/mtd/physmap.h> 18 17 #include <linux/of_platform.h> 19 18 20 19 #include <asm/system.h> ··· 23 24 #include <asm/pci-bridge.h> 24 25 25 26 #include "mpc10x.h" 26 - 27 - 28 - #ifdef CONFIG_MTD_PHYSMAP 29 - static struct mtd_partition storcenter_physmap_partitions[] = { 30 - { 31 - .name = "kernel", 32 - .offset = 0x000000, 33 - .size = 0x170000, 34 - }, 35 - { 36 - .name = "rootfs", 37 - .offset = 0x170000, 38 - .size = 0x590000, 39 - }, 40 - { 41 - .name = "uboot", 42 - .offset = 0x700000, 43 - .size = 0x040000, 44 - }, 45 - { 46 - .name = "config", 47 - .offset = 0x740000, 48 - .size = 0x0c0000, 49 - }, 50 - }; 51 - #endif 52 27 53 28 54 29 static __initdata struct of_device_id storcenter_of_bus[] = { ··· 68 95 static void __init storcenter_setup_arch(void) 69 96 { 70 97 struct device_node *np; 71 - 72 - #ifdef CONFIG_MTD_PHYSMAP 73 - physmap_set_partitions(storcenter_physmap_partitions, 74 - ARRAY_SIZE(storcenter_physmap_partitions)); 75 - #endif 76 98 77 99 /* Lookup PCI host bridges */ 78 100 for_each_compatible_node(np, "pci", "mpc10x-pci")