[SUB] mach-neo1973

Ben Dooks ben-linux at fluff.org
Sat Feb 17 13:29:30 CET 2007


This is the mach-gta01.c changed to mach-neo1973.c
and the configuration and variables changed to be
the same. If people think this is a worthwhile change
I will try and see if RMK will change the machine
database entry for it.

To: patches at arm.linux.org.uk
Original patch from: Harald Welte <laforge at openmoko.org>

Machine support for the FIC GTA01 (Neo1973)                                        

Signed-off-by: Harald Welte <laforge at openmoko.org>
Signed-off-by: Ben Dooks <ben-linux at fluff.org>

diff -urpN -X linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/Documentation/dontdiff linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/include/asm-arm/arch/neo1973.h linux-2.6.20-rmk-16feb2007-moko2-neover/include/asm-arm/arch/neo1973.h
--- linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/include/asm-arm/arch/neo1973.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.20-rmk-16feb2007-moko2-neover/include/asm-arm/arch/neo1973.h	2007-02-17 12:26:14.000000000 +0000
@@ -0,0 +1,85 @@
+/* linux/include/asm-arm/arch-s3c2410/neo1973.h
+ *
+ * S3C2410 Machine Support for the FIC NEO1973 (GTA01)
+ *
+ * Copyright (C) 2006-2007 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef _NEO1973_H
+#define _NEO1973_H
+
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/irqs.h>
+
+/* Different hardware revisions, passed in ATAG_REVISION by u-boot */
+#define NEO1973v3_SYSTEM_REV	0x00000130
+#define NEO1973v4_SYSTEM_REV	0x00000140
+#define NEO1973Bv2_SYSTEM_REV	0x00000220
+#define NEO1973Bv3_SYSTEM_REV	0x00000230
+#define NEO1973Bv4_SYSTEM_REV	0x00000240
+
+/* Backlight */
+struct neo1973bl_machinfo {
+	unsigned int default_intensity;
+	unsigned int max_intensity;
+	unsigned int limit_mask;
+};
+
+/* Definitions common to all revisions */
+#define NEO1973_GPIO_BACKLIGHT		S3C2410_GPB0
+#define NEO1973_GPIO_GPS_PWRON		S3C2410_GPB1
+#define NEO1973_GPIO_MODEM_RST		S3C2410_GPB6
+#define NEO1973_GPIO_MODEM_ON		S3C2410_GPB7
+#define NEO1973_GPIO_LCD_RESET		S3C2410_GPC6
+#define NEO1973_GPIO_JACK_INSERT	S3C2410_GPF4
+#define NEO1973_GPIO_nSD_DETECT		S3C2410_GPF5
+#define NEO1973_GPIO_911_KEY		S3C2410_GPF6
+#define NEO1973_GPIO_HOLD_KEY		S3C2410_GPF7
+#define NEO1973_GPIO_VIBRATOR_ON	S3C2410_GPG11
+
+#define NEO1973_IRQ_JACK_INSERT		IRQ_EINT4
+#define NEO1973_IRQ_nSD_DETECT		IRQ_EINT5
+#define NEO1973_IRQ_911_KEY		IRQ_EINT6
+#define NEO1973_IRQ_PCF50606		IRQ_EINT16
+
+/* NEO1973v3 */
+#define NEO1973v3_GPIO_nGSM_EN		S3C2410_GPG9
+
+/* NEO1973v4 */
+#define NEO1973_GPIO_MODEM_DNLOAD	S3C2410_GPG0
+
+/* NEO1973Bv2 */
+#define NEO1973Bv2_GPIO_nGSM_EN		S3C2410_GPF2
+
+/* NEO1973Bv3 */
+#define NEO1973_GPIO_GPS_EN_3V3		S3C2410_GPG9
+
+#define NEO1973_GPIO_SDMMC_ON		S3C2410_GPB2
+#define NEO1973_GPIO_BT_EN		S3C2410_GPB5
+#define NEO1973_GPIO_AB_DETECT		S3C2410_GPB8
+#define NEO1973_GPIO_USB_PULLUP		S3C2410_GPB9
+#define NEO1973_GPIO_USB_ATTACH		S3C2410_GPB10
+
+#define NEO1973_GPIO_GPS_EN_2V8		S3C2410_GPG9
+#define NEO1973_GPIO_GPS_EN_3V		S3C2410_GPG10
+#define NEO1973_GPIO_GPS_RESET		S3C2410_GPC0
+
+#endif /* _NEO1973_H */
diff -urpN -X linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/Documentation/dontdiff linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/include/asm-arm/arch-s3c2410/neo1973.h linux-2.6.20-rmk-16feb2007-moko2-neover/include/asm-arm/arch-s3c2410/neo1973.h
--- linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/include/asm-arm/arch-s3c2410/neo1973.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.20-rmk-16feb2007-moko2-neover/include/asm-arm/arch-s3c2410/neo1973.h	2007-02-17 12:26:14.000000000 +0000
@@ -0,0 +1,85 @@
+/* linux/include/asm-arm/arch-s3c2410/neo1973.h
+ *
+ * S3C2410 Machine Support for the FIC NEO1973 (GTA01)
+ *
+ * Copyright (C) 2006-2007 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef _NEO1973_H
+#define _NEO1973_H
+
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/irqs.h>
+
+/* Different hardware revisions, passed in ATAG_REVISION by u-boot */
+#define NEO1973v3_SYSTEM_REV	0x00000130
+#define NEO1973v4_SYSTEM_REV	0x00000140
+#define NEO1973Bv2_SYSTEM_REV	0x00000220
+#define NEO1973Bv3_SYSTEM_REV	0x00000230
+#define NEO1973Bv4_SYSTEM_REV	0x00000240
+
+/* Backlight */
+struct neo1973bl_machinfo {
+	unsigned int default_intensity;
+	unsigned int max_intensity;
+	unsigned int limit_mask;
+};
+
+/* Definitions common to all revisions */
+#define NEO1973_GPIO_BACKLIGHT		S3C2410_GPB0
+#define NEO1973_GPIO_GPS_PWRON		S3C2410_GPB1
+#define NEO1973_GPIO_MODEM_RST		S3C2410_GPB6
+#define NEO1973_GPIO_MODEM_ON		S3C2410_GPB7
+#define NEO1973_GPIO_LCD_RESET		S3C2410_GPC6
+#define NEO1973_GPIO_JACK_INSERT	S3C2410_GPF4
+#define NEO1973_GPIO_nSD_DETECT		S3C2410_GPF5
+#define NEO1973_GPIO_911_KEY		S3C2410_GPF6
+#define NEO1973_GPIO_HOLD_KEY		S3C2410_GPF7
+#define NEO1973_GPIO_VIBRATOR_ON	S3C2410_GPG11
+
+#define NEO1973_IRQ_JACK_INSERT		IRQ_EINT4
+#define NEO1973_IRQ_nSD_DETECT		IRQ_EINT5
+#define NEO1973_IRQ_911_KEY		IRQ_EINT6
+#define NEO1973_IRQ_PCF50606		IRQ_EINT16
+
+/* NEO1973v3 */
+#define NEO1973v3_GPIO_nGSM_EN		S3C2410_GPG9
+
+/* NEO1973v4 */
+#define NEO1973_GPIO_MODEM_DNLOAD	S3C2410_GPG0
+
+/* NEO1973Bv2 */
+#define NEO1973Bv2_GPIO_nGSM_EN		S3C2410_GPF2
+
+/* NEO1973Bv3 */
+#define NEO1973_GPIO_GPS_EN_3V3		S3C2410_GPG9
+
+#define NEO1973_GPIO_SDMMC_ON		S3C2410_GPB2
+#define NEO1973_GPIO_BT_EN		S3C2410_GPB5
+#define NEO1973_GPIO_AB_DETECT		S3C2410_GPB8
+#define NEO1973_GPIO_USB_PULLUP		S3C2410_GPB9
+#define NEO1973_GPIO_USB_ATTACH		S3C2410_GPB10
+
+#define NEO1973_GPIO_GPS_EN_2V8		S3C2410_GPG9
+#define NEO1973_GPIO_GPS_EN_3V		S3C2410_GPG10
+#define NEO1973_GPIO_GPS_RESET		S3C2410_GPC0
+
+#endif /* _NEO1973_H */
diff -urpN -X linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/Documentation/dontdiff linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/Kconfig linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/Kconfig
--- linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/Kconfig	2007-02-16 18:23:17.000000000 +0000
+++ linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/Kconfig	2007-02-17 12:16:24.000000000 +0000
@@ -109,5 +109,19 @@ config MACH_QT2410
 	help
 	   Say Y here if you are using the Armzone QT2410
 
+config MACH_NEO1973
+	bool "NEO1973"
+	select CPU_S3C2410
+	help
+	   Say Y here if you are using the FIC NEO1973
+
+config MACH_NEO1973_SPIHARD
+	bool "NEO1973 uses hardware SPI controller instead of GPIO"
+	depends on MACH_NEO1973
+	default n
+	help
+	  Say Y here to change to using the hardware SPI controller
+	  to manage the SPI bus on the NEO1973
+
 endmenu
 
diff -urpN -X linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/Documentation/dontdiff linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/Makefile linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/Makefile
--- linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/Makefile	2007-02-16 18:23:04.000000000 +0000
+++ linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/Makefile	2007-02-17 12:15:53.000000000 +0000
@@ -29,3 +29,4 @@ obj-$(CONFIG_MACH_AML_M5900)	+= mach-aml
 obj-$(CONFIG_BAST_PC104_IRQ)	+= bast-irq.o
 obj-$(CONFIG_MACH_VR1000)	+= mach-vr1000.o usb-simtec.o
 obj-$(CONFIG_MACH_QT2410)	+= mach-qt2410.o
+obj-$(CONFIG_MACH_NEO1973)	+= mach-neo1973.o
\ No newline at end of file
diff -urpN -X linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/Documentation/dontdiff linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/mach-neo1973.c linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/mach-neo1973.c
--- linux-2.6.20-rmk-16feb2007-moko1-vbusdraw/arch/arm/mach-s3c2410/mach-neo1973.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.20-rmk-16feb2007-moko2-neover/arch/arm/mach-s3c2410/mach-neo1973.c	2007-02-17 12:26:34.000000000 +0000
@@ -0,0 +1,354 @@
+/*
+ * linux/arch/arm/mach-s3c2410/mach-neo1973.c
+ *
+ * S3C2410 Machine Support for the FIC Neo1973 (GTA01)
+ *
+ * Copyright (C) 2006-2007 by OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#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/workqueue.h>
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/spi_bitbang.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/nand_ecc.h>
+#include <linux/mtd/partitions.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-serial.h>
+#include <asm/arch/regs-gpio.h>
+
+#include <asm/arch/usb-control.h>
+#include <asm/arch/spi-gpio.h>
+#include <asm/arch/nand.h>
+#include <asm/arch/udc.h>
+#include <asm/arch/fb.h>
+#include <asm/arch/spi.h>
+
+#include <asm/arch/neo1973.h>
+
+#include <asm/plat-s3c24xx/devs.h>
+#include <asm/plat-s3c24xx/cpu.h>
+#include <asm/plat-s3c24xx/pm.h>
+
+static struct map_desc neo1973_iodesc[] __initdata = {
+	{
+		.virtual	= 0xe0000000,
+		.pfn		= __phys_to_pfn(S3C2410_CS3+0x01000000),
+		.length		= SZ_1M,
+		.type		= MT_DEVICE
+	},
+};
+
+#define UCON S3C2410_UCON_DEFAULT
+#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
+#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
+
+static struct s3c2410_uartcfg neo1973_uartcfgs[] = {
+	[0] = {
+		.hwport	     = 0,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[1] = {
+		.hwport	     = 1,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+};
+
+/* LCD driver info */
+
+/* Configuration for 480x640 toppoly TD028TTEC1 */
+static struct s3c2410fb_mach_info neo1973_lcd_cfg __initdata = {
+	.regs	= {
+
+		.lcdcon1	= S3C2410_LCDCON1_TFT16BPP |
+				  S3C2410_LCDCON1_TFT |
+				  S3C2410_LCDCON1_CLKVAL(0x01),	/* HCLK/4 */
+
+		.lcdcon2	= S3C2410_LCDCON2_VBPD(1) |	/* 2 */
+				  S3C2410_LCDCON2_LINEVAL(639) |/* 640 */
+				  S3C2410_LCDCON2_VFPD(15) |	/* 16 */
+				  S3C2410_LCDCON2_VSPW(1),	/* 2 */
+
+		.lcdcon3	= S3C2410_LCDCON3_HBPD(7) |	/* 8 */
+				  S3C2410_LCDCON3_HOZVAL(479) |	/* 480 */
+				  S3C2410_LCDCON3_HFPD(103),	/* 104 */
+
+		.lcdcon4	= S3C2410_LCDCON4_MVAL(0) |
+				  S3C2410_LCDCON4_HSPW(7),	/* 8 */
+
+		.lcdcon5	= S3C2410_LCDCON5_FRM565 |
+				  S3C2410_LCDCON5_INVVLINE |
+				  S3C2410_LCDCON5_INVVFRAME |
+				  S3C2410_LCDCON5_PWREN |
+				  S3C2410_LCDCON5_HWSWP,
+	},
+
+	.lpcsel		= ((0xCE6) & ~7) | 1<<4,
+	.type		= S3C2410_LCDCON1_TFT16BPP,
+
+	.width		= 480,
+	.height		= 640,
+
+	.xres		= {
+		.min	= 480,
+		.max	= 480,
+		.defval	= 480,
+	},
+
+	.yres		= {
+		.min	= 640,
+		.max	= 640,
+		.defval = 640,
+	},
+
+	.bpp		= {
+		.min	= 16,
+		.max	= 16,
+		.defval = 16,
+	},
+};
+
+static struct platform_device *neo1973_devices[] __initdata = {
+	&s3c_device_usb,
+	&s3c_device_lcd,
+	&s3c_device_wdt,
+	&s3c_device_i2c,
+	&s3c_device_iis,
+	&s3c_device_sdi,
+	&s3c_device_usbgadget,
+	&s3c_device_nand,
+};
+
+static struct s3c24xx_board neo1973_board __initdata = {
+	.devices       = neo1973_devices,
+	.devices_count = ARRAY_SIZE(neo1973_devices)
+};
+
+static struct s3c2410_nand_set neo1973_nand_sets[] = {
+	[0] = {
+		.name		= "neo1973-nand",
+		.nr_chips	= 1,
+	},
+};
+
+/* choose a set of timings which should suit most 512Mbit
+ * chips and beyond.
+ */
+
+static struct s3c2410_platform_nand neo1973_nand_info = {
+	.tacls		= 20,
+	.twrph0		= 60,
+	.twrph1		= 20,
+	.nr_sets	= ARRAY_SIZE(neo1973_nand_sets),
+	.sets		= neo1973_nand_sets,
+};
+
+static void neo1973_udc_command(enum s3c2410_udc_cmd_e cmd)
+{
+	printk(KERN_DEBUG "%s(%d)\n", __func__, cmd);
+
+	switch (cmd) {
+	case S3C2410_UDC_P_ENABLE:
+		s3c2410_gpio_setpin(NEO1973_GPIO_USB_PULLUP, 1);
+		break;
+	case S3C2410_UDC_P_DISABLE:
+		s3c2410_gpio_setpin(NEO1973_GPIO_USB_PULLUP, 0);
+		break;
+	case S3C2410_UDC_P_RESET:
+		/* FIXME! */
+		break;
+	default:
+		break;
+	}
+}
+
+/* use a work queue, since I2C API inherently schedules
+ * and we get called in hardirq context from UDC driver */
+
+#define pcf50606_charge_fast(x,s) do { } while(0)
+
+struct vbus_draw {
+	struct work_struct	work;
+	int			ma;
+};
+
+static struct vbus_draw neo1973_udc_vbus_drawer;
+
+static void __neo1973_udc_vbus_draw(struct work_struct *work)
+{
+	if (neo1973_udc_vbus_drawer.ma >= 500) {
+		/* enable fast charge */
+		printk(KERN_DEBUG "udc: enabling fast charge\n");
+		pcf50606_charge_fast(pcf50606_global, 1);
+	} else {
+		/* disable fast charge */
+		printk(KERN_DEBUG "udc: disabling fast charge\n");
+		pcf50606_charge_fast(pcf50606_global, 0);
+	}
+}
+
+static void neo1973_udc_vbus_draw(unsigned int ma)
+{
+	neo1973_udc_vbus_drawer.ma = ma;
+	schedule_work(&neo1973_udc_vbus_drawer.work);
+}
+
+static struct s3c2410_udc_mach_info neo1973_udc_cfg = {
+	.vbus_draw	= neo1973_udc_vbus_draw,
+};
+
+/* SPI */
+
+static struct spi_board_info neo1973_spi_board_info[] __initdata = {
+	{
+		.modalias	= "jbt6k74",
+		.max_speed_hz	= 10 * 1000 * 1000,
+		.bus_num	= 1,
+	},
+};
+
+
+#ifdef CONFIG_MACH_NEO1973_SPIHARD
+static struct s3c2410_spi_info spi_cfg = {
+	.pin_cs		= S3C2410_GPG3,
+	.board_size	= ARRAY_SIZE(neo1973_spi_board_info),
+	.board_info	= neo1973_spi_board_info,
+};
+#else
+static void spi_gpio_cs(struct s3c2410_spigpio_info *spi, int cs)
+{
+	switch (cs) {
+	case BITBANG_CS_ACTIVE:
+		s3c2410_gpio_setpin(S3C2410_GPG3, 0);
+		break;
+	case BITBANG_CS_INACTIVE:
+		s3c2410_gpio_setpin(S3C2410_GPG3, 1);
+		break;
+	}
+}
+
+static struct s3c2410_spigpio_info spi_gpio_cfg = {
+	.pin_clk	= S3C2410_GPG7,
+	.pin_mosi	= S3C2410_GPG6,
+	.pin_miso	= S3C2410_GPG5,
+	.board_size	= ARRAY_SIZE(neo1973_spi_board_info),
+	.board_info	= neo1973_spi_board_info,
+	.chip_select	= &spi_gpio_cs,
+};
+
+struct platform_device s3c_device_spi_lcm = {
+	.name		  = "s3c24xx-spi-gpio",
+	.id		  = 1,
+	.dev = {
+		.platform_data = &spi_gpio_cfg,
+	},
+};
+#endif
+
+/* USB */
+
+static struct s3c2410_hcd_info neo1973_usb_info = {
+	.port[0]	= {
+		.flags	= S3C_HCDFLG_USED,
+	},
+	.port[1]	= {
+		.flags	= 0,
+	},
+};
+
+static void __init neo1973_map_io(void)
+{
+	s3c24xx_init_io(neo1973_iodesc, ARRAY_SIZE(neo1973_iodesc));
+	s3c24xx_init_clocks(12*1000*1000);
+	s3c24xx_init_uarts(neo1973_uartcfgs, ARRAY_SIZE(neo1973_uartcfgs));
+	s3c24xx_set_board(&neo1973_board);
+}
+
+static void __init neo1973_machine_init(void)
+{
+	if (system_rev == NEO1973v4_SYSTEM_REV ||
+	    system_rev == NEO1973Bv2_SYSTEM_REV ||
+	    system_rev == NEO1973Bv3_SYSTEM_REV)
+		neo1973_udc_cfg.udc_command = neo1973_udc_command;
+
+	s3c_device_usb.dev.platform_data = &neo1973_usb_info;
+	s3c_device_nand.dev.platform_data = &neo1973_nand_info;
+
+	s3c24xx_fb_set_platdata(&neo1973_lcd_cfg);
+
+	INIT_WORK(&neo1973_udc_vbus_drawer.work, __neo1973_udc_vbus_draw);
+	s3c24xx_udc_set_platdata(&neo1973_udc_cfg);
+
+	/* Set LCD_RESET / XRES to high */
+	s3c2410_gpio_cfgpin(S3C2410_GPC6, S3C2410_GPIO_OUTPUT);
+	s3c2410_gpio_setpin(S3C2410_GPC6, 1);
+
+	/* SPI chip select is gpio output */
+	s3c2410_gpio_cfgpin(S3C2410_GPG3, S3C2410_GPIO_OUTPUT);
+	s3c2410_gpio_setpin(S3C2410_GPG3, 1);
+
+#ifdef CONFIG_MACH_NEO1973_SPIHARD
+	s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPG5_SPIMISO1);
+	s3c2410_gpio_cfgpin(S3C2410_GPG6, S3C2410_GPG6_SPIMOSI1);
+	s3c2410_gpio_cfgpin(S3C2410_GPG7, S3C2410_GPG7_SPICLK1);
+
+	s3c_device_spi1.dev.platform_data = &spi_cfg;
+	platform_device_register(&s3c_device_spi1);
+#else
+	platform_device_register(&s3c_device_spi_lcm);
+#endif
+
+	s3c2410_pm_init();
+}
+
+MACHINE_START(NEO1973, "NEO1973")
+	.phys_io	= S3C2410_PA_UART,
+	.io_pg_offst	= (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
+	.boot_params	= S3C2410_SDRAM_PA + 0x100,
+	.map_io		= neo1973_map_io,
+	.init_irq	= s3c24xx_init_irq,
+	.init_machine	= neo1973_machine_init,
+	.timer		= &s3c24xx_timer,
+MACHINE_END




More information about the openmoko-kernel mailing list