[PATCH] powerpc: fix the defaults for the linkstation MTD device(was: Re: Linux 2.6.29-rc6 bombs while compiling a kernel for alinkstation/kurobox)

From: RogÃrio Brito
Date: Tue Mar 03 2009 - 03:35:19 EST


Hi, Tony and other people.

On Mar 03 2009, Tony Breeds wrote:
> On Mon, Mar 02, 2009 at 06:43:03AM -0300, RogÃrio Brito wrote:
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > arch/powerpc/platforms/built-in.o: In function `linkstation_setup_arch':
> > linkstation.c:(.init.text+0x218): undefined reference to `physmap_set_partitions'
> > drivers/built-in.o:(__ksymtab+0x9f8): undefined reference to `physmap_set_partitions'
> > make: *** [.tmp_vmlinux1] Error 1
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> Looks to me like you need to define CONFIG_MTD_PHYSMAP_COMPAT in your
> .config.

Right. This was the fix. The attached diff to update the defconfig is
included below.

Please, note that it wasn't sufficient to only to define
CONFIG_MTD_PHYSMAP_COMPAT.

The default values for CONFIG_MTD_PHYSMAP_{START,LEN,BANKWIDTH} weren't
correct (and, as a result, no MTD was detected on my kurobox and this
was a regression regarding 2.6.28).

This patch makes the compilation succeed and the MTD device work again.
Already tested and in production.


Signed-off-by: RogÃrio Brito <rbrito@xxxxxxxxxx>


---

--- linux/arch/powerpc/configs/linkstation_defconfig.old 2009-03-03 05:11:38.000000000 -0300
+++ linux/arch/powerpc/configs/linkstation_defconfig 2009-03-03 05:11:54.000000000 -0300
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc2
-# Mon Jan 26 15:35:29 2009
+# Linux kernel version: 2.6.29-rc6
+# Tue Mar 3 05:10:59 2009
#
# CONFIG_PPC64 is not set

@@ -71,6 +71,15 @@
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
+
+#
+# RCU Subsystem
+#
+CONFIG_CLASSIC_RCU=y
+# CONFIG_TREE_RCU is not set
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_TREE_RCU_TRACE is not set
+# CONFIG_PREEMPT_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
@@ -88,6 +97,7 @@
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
+# CONFIG_NET_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -153,11 +163,6 @@
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
-CONFIG_CLASSIC_RCU=y
-# CONFIG_TREE_RCU is not set
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_TREE_RCU_TRACE is not set
-# CONFIG_PREEMPT_RCU_TRACE is not set
# CONFIG_FREEZER is not set

#
@@ -294,7 +299,6 @@
#
# Networking options
#
-# CONFIG_NET_NS is not set
CONFIG_COMPAT_NET_DEV_OPS=y
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
@@ -560,7 +564,10 @@
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
CONFIG_MTD_PHYSMAP=y
-# CONFIG_MTD_PHYSMAP_COMPAT is not set
+CONFIG_MTD_PHYSMAP_COMPAT=y
+CONFIG_MTD_PHYSMAP_START=0xffc00000
+CONFIG_MTD_PHYSMAP_LEN=0x400000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=1
# CONFIG_MTD_PHYSMAP_OF is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_PLATRAM is not set
@@ -617,13 +624,19 @@
# CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y
# CONFIG_PHANTOM is not set
-# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_C2PORT is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+CONFIG_EEPROM_LEGACY=m
+# CONFIG_EEPROM_93CX6 is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set

@@ -1037,8 +1050,6 @@
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
-# CONFIG_EEPROM_AT24 is not set
-CONFIG_EEPROM_LEGACY=m
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCA9539 is not set


--
RogÃrio Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/