diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/Kconfig linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/Kconfig
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/Kconfig	2006-04-01 12:38:52.000000000 +0100
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/Kconfig	2006-04-01 14:23:29.000000000 +0100
@@ -50,9 +50,15 @@ config MACH_N30
 
 	  <http://zoo.weinigel.se/n30>.
 
+config MACH_SMDK
+	bool
+	help
+	  Common machine code for SMDK2410 and SMDK2440
+
 config ARCH_SMDK2410
 	bool "SMDK2410/A9M2410"
 	select CPU_S3C2410
+	select MACH_SMDK
 	help
 	   Say Y here if you are using the SMDK2410 or the derived module A9M2410
            <http://www.fsforth.de>
@@ -60,6 +66,7 @@ config ARCH_SMDK2410
 config ARCH_S3C2440
 	bool "SMDK2440"
 	select CPU_S3C2440
+	select MACH_SMDK
 	help
 	  Say Y here if you are using the SMDK2440.
 
diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/Makefile linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/Makefile
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/Makefile	2006-04-01 12:38:52.000000000 +0100
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/Makefile	2006-04-01 14:20:21.000000000 +0100
@@ -48,3 +48,5 @@ obj-$(CONFIG_MACH_VR1000)	+= mach-vr1000
 obj-$(CONFIG_MACH_RX3715)	+= mach-rx3715.o
 obj-$(CONFIG_MACH_OTOM)		+= mach-otom.o
 obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
+
+obj-$(CONFIG_MACH_SMDK)		+= common-smdk.o
\ No newline at end of file
diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/common-smdk.c linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/common-smdk.c
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/common-smdk.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/common-smdk.c	2006-04-01 14:25:20.000000000 +0100
@@ -0,0 +1,51 @@
+/* linux/arch/arm/mach-s3c2410/common-smdk.c
+ *
+ * Copyright (c) 2006 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
+ *
+ * Common code for SMDK2410 and SMDK2440 boards
+ *
+ * http://www.fluff.org/ben/smdk2440/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/regs-gpio.h>
+
+#include "pm.h"
+
+void __init smdk_machine_init(void)
+{
+	/* Configure the LEDs (even if we have no LED support)*/
+
+	s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
+	s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
+	s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
+	s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
+
+	s3c2410_gpio_setpin(S3C2410_GPF4, 0);
+	s3c2410_gpio_setpin(S3C2410_GPF5, 0);
+	s3c2410_gpio_setpin(S3C2410_GPF6, 0);
+	s3c2410_gpio_setpin(S3C2410_GPF7, 0);
+
+	s3c2410_pm_init();
+}
diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/common-smdk.h linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/common-smdk.h
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/common-smdk.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/common-smdk.h	2006-04-01 14:29:51.000000000 +0100
@@ -0,0 +1,15 @@
+/* linux/arch/arm/mach-s3c2410/common-smdk.h
+ *
+ * Copyright (c) 2006 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
+ *
+ * Common code for SMDK2410 and SMDK2440 boards
+ *
+ * http://www.fluff.org/ben/smdk2440/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+extern void smdk_machine_init(void);
diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/mach-smdk2410.c linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/mach-smdk2410.c
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/mach-smdk2410.c	2006-03-20 05:53:29.000000000 +0000
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/mach-smdk2410.c	2006-04-01 14:29:36.000000000 +0100
@@ -28,7 +28,8 @@
  * Ben Dooks <ben@simtec.co.uk>
  *
  * 10-Mar-2005 LCVR  Changed S3C2410_VA to S3C24XX_VA
- * 20-Sep-2005 BJD  Added static to non-exported items
+ * 20-Sep-2005 BJD   Added static to non-exported items
+ * 01-Apr-2006 BJD   Moved init code to common smdk
  *
  ***********************************************************************/
 
@@ -54,6 +55,8 @@
 #include "devs.h"
 #include "cpu.h"
 
+#include "common-smdk.h"
+
 static struct map_desc smdk2410_iodesc[] __initdata = {
   /* nothing here yet */
 };
@@ -107,11 +110,6 @@ static void __init smdk2410_map_io(void)
 	s3c24xx_set_board(&smdk2410_board);
 }
 
-static void __init smdk2410_init_irq(void)
-{
-	s3c24xx_init_irq();
-}
-
 MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
 				    * to SMDK2410 */
 	/* Maintainer: Jonas Dietsche */
@@ -119,7 +117,8 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @
 	.io_pg_offst	= (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
 	.boot_params	= S3C2410_SDRAM_PA + 0x100,
 	.map_io		= smdk2410_map_io,
-	.init_irq	= smdk2410_init_irq,
+	.init_irq	= s3c24xx_init_irq,
+	.init_machine	= smdk_machine_init,
 	.timer		= &s3c24xx_timer,
 MACHINE_END
 
diff -urpN -X ../dontdiff linux-2.6.16-git20/arch/arm/mach-s3c2410/mach-smdk2440.c linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/mach-smdk2440.c
--- linux-2.6.16-git20/arch/arm/mach-s3c2410/mach-smdk2440.c	2006-03-20 05:53:29.000000000 +0000
+++ linux-2.6.16-git20-bjd1/arch/arm/mach-s3c2410/mach-smdk2440.c	2006-04-01 14:25:23.000000000 +0100
@@ -53,7 +53,8 @@
 #include "clock.h"
 #include "devs.h"
 #include "cpu.h"
-#include "pm.h"
+
+#include "common-smdk.h"
 
 static struct map_desc smdk2440_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
@@ -197,21 +198,9 @@ static void __init smdk2440_map_io(void)
 
 static void __init smdk2440_machine_init(void)
 {
-	/* Configure the LEDs (even if we have no LED support)*/
-
-	s3c2410_gpio_cfgpin(S3C2410_GPF4, S3C2410_GPF4_OUTP);
-	s3c2410_gpio_cfgpin(S3C2410_GPF5, S3C2410_GPF5_OUTP);
-	s3c2410_gpio_cfgpin(S3C2410_GPF6, S3C2410_GPF6_OUTP);
-	s3c2410_gpio_cfgpin(S3C2410_GPF7, S3C2410_GPF7_OUTP);
-
-	s3c2410_gpio_setpin(S3C2410_GPF4, 0);
-	s3c2410_gpio_setpin(S3C2410_GPF5, 0);
-	s3c2410_gpio_setpin(S3C2410_GPF6, 0);
-	s3c2410_gpio_setpin(S3C2410_GPF7, 0);
-
 	s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg);
 
-	s3c2410_pm_init();
+	smdk_machine_init();
 }
 
 MACHINE_START(S3C2440, "SMDK2440")

