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