diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/Kconfig linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Kconfig
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/Kconfig 2005-07-08 10:54:34.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Kconfig 2005-07-08 10:58:03.000000000 -0300
@@ -11,6 +11,16 @@ config ARCH_BAST
Product page: .
+config MACH_GP32
+ bool "GamePark GP32"
+ depends on EXPERIMENTAL
+ select CPU_S3C2400
+ help
+ Say Y here if you are using the GamePark GP32 handheld.
+
+ See for more
+ information on this project.
+
config ARCH_H1940
bool "IPAQ H1940"
select CPU_S3C2410
@@ -72,6 +82,13 @@ config MACH_NEXCODER_2440
endmenu
+config CPU_S3C2400
+ bool
+ depends on ARCH_S3C2410
+ help
+ Support for S3C2400 family from the S3C24XX line of Samsung
+ Mobile CPUs.
+
config CPU_S3C2410
bool
depends on ARCH_S3C2410
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/mach-gp32.c linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/mach-gp32.c
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/mach-gp32.c 1969-12-31 21:00:00.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/mach-gp32.c 2005-07-08 11:03:43.000000000 -0300
@@ -0,0 +1,118 @@
+/* linux/arch/arm/mach-s3c2410/mach-gp32.c
+ *
+ * Copyright (c) 2005 Lucas Correia Villa Real
+ *
+ * http://sourceforge.net/projects/gp32linux
+ *
+ * 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.
+ *
+ * Modifications:
+ * 06-Apr-2005 LCVR Created initial version
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include "clock.h"
+#include "devs.h"
+#include "cpu.h"
+#include "pm.h"
+
+#define COPYRIGHT ", (c) 2005 Lucas Correia Villa Real"
+
+static struct map_desc gp32_iodesc[] __initdata = {
+ /* dump ISA space somewhere unused */
+
+ { (u32)S3C24XX_VA(ISA_WORD), S3C2400_CS3, SZ_16M, MT_DEVICE },
+ { (u32)S3C24XX_VA(ISA_BYTE), S3C2400_CS3, SZ_16M, MT_DEVICE },
+
+ /* the BOOT-ROM is assigned to the nGCS0 */
+
+ { GP32_VA_BOOT_ROM, S3C2400_CS0, SZ_16M, MT_DEVICE },
+};
+
+#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
+#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
+#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
+
+static struct s3c2410_uartcfg gp32_uartcfgs[] = {
+ [0] = {
+ .hwport = 0,
+ .flags = 0,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
+ },
+ [1] = {
+ .hwport = 1,
+ .flags = 0,
+ .ucon = UCON,
+ .ulcon = ULCON,
+ .ufcon = UFCON,
+ }
+};
+
+/* Standard GP32 devices */
+
+static struct platform_device *gp32_devices[] __initdata = {
+ &s3c_device_usb,
+ &s3c_device_usbgadget,
+ &s3c_device_adc,
+ &s3c_device_lcd,
+ &s3c_device_wdt,
+ &s3c_device_i2c,
+ &s3c_device_iis,
+ &s3c_device_rtc,
+ &s3c_device_spi0,
+ &s3c_device_timer0,
+ &s3c_device_timer1,
+ &s3c_device_timer2,
+ &s3c_device_timer3
+};
+
+static struct s3c24xx_board gp32_board __initdata = {
+ .devices = gp32_devices,
+ .devices_count = ARRAY_SIZE(gp32_devices)
+};
+
+
+void __init gp32_map_io(void)
+{
+ s3c24xx_init_io(gp32_iodesc, ARRAY_SIZE(gp32_iodesc));
+ s3c24xx_init_clocks(0);
+ s3c24xx_init_uarts(gp32_uartcfgs, ARRAY_SIZE(gp32_uartcfgs));
+ s3c24xx_set_board(&gp32_board);
+}
+
+MACHINE_START(GP32, "GamePark GP32")
+ /* Maintainer: Lucas Correia Villa Real */
+ .phys_ram = S3C2400_SDRAM_PA,
+ .phys_io = S3C2400_PA_UART,
+ .io_pg_offst = ((u32)S3C24XX_VA(UART) >> 18) & 0xfffc,
+ .boot_params = S3C2400_SDRAM_PA + 0x100,
+ .map_io = gp32_map_io,
+ .init_irq = s3c24xx_init_irq,
+ .timer = &s3c24xx_timer,
+MACHINE_END
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/Makefile linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Makefile
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/Makefile 2005-07-08 10:56:23.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Makefile 2005-07-08 10:58:03.000000000 -0300
@@ -12,7 +12,7 @@ obj- :=
# S3C2400 support files
-obj-$(CONFIG_CPU_S3C2400) += s3c2400-irq.o
+obj-$(CONFIG_CPU_S3C2400) += s3c2400.o s3c2400-irq.o
# S3C2410 support files
@@ -32,6 +32,7 @@ obj-$(CONFIG_CPU_S3C2440) += s3c2440.o
obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
obj-$(CONFIG_ARCH_H1940) += mach-h1940.o
+obj-$(CONFIG_MACH_GP32) += mach-gp32.o
obj-$(CONFIG_MACH_N30) += mach-n30.o
obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o
obj-$(CONFIG_ARCH_S3C2440) += mach-smdk2440.o
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/Makefile.boot linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Makefile.boot
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/Makefile.boot 2005-07-08 10:54:34.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/Makefile.boot 2005-07-08 10:58:03.000000000 -0300
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_CPU_S3C2400),y)
+ zreladdr-y := 0x0c008000
+params_phys-y := 0x0c000100
+else
zreladdr-y := 0x30008000
params_phys-y := 0x30000100
-
+endif
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/s3c2400.c linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/s3c2400.c
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/s3c2400.c 1969-12-31 21:00:00.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/s3c2400.c 2005-07-08 10:58:03.000000000 -0300
@@ -0,0 +1,181 @@
+/* linux/arch/arm/mach-s3c2410/s3c2400.c
+ *
+ * Copyright (c) 2003-2005 Simtec Electronics
+ * Ben Dooks
+ *
+ * http://sourceforge.net/projects/gp32linux
+ *
+ * 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.
+ *
+ * Modifications:
+ * 16-May-2003 BJD Created initial version
+ * 16-Aug-2003 BJD Fixed header files and copyright, added URL
+ * 05-Sep-2003 BJD Moved to kernel v2.6
+ * 18-Jan-2004 BJD Added serial port configuration
+ * 21-Aug-2004 BJD Added new struct s3c2410_board handler
+ * 28-Sep-2004 BJD Updates for new serial port bits
+ * 04-Nov-2004 BJD Updated UART configuration process
+ * 10-Jan-2005 BJD Removed s3c2410_clock_tick_rate
+ * 05-Apr-2005 LCVR Modified for S3C2400
+*/
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+
+#include "s3c2400.h"
+#include "cpu.h"
+#include "clock.h"
+
+/* Initial IO mappings */
+
+static struct map_desc s3c2400_iodesc[] __initdata = {
+ IODESC_ENT(USBHOST),
+ IODESC_ENT(USBDEV),
+ IODESC_ENT(CLKPWR),
+ IODESC_ENT(LCD),
+ IODESC_ENT(UART),
+ IODESC_ENT(TIMER),
+ IODESC_ENT(ADC),
+ IODESC_ENT(WATCHDOG)
+};
+
+static struct resource s3c_uart0_resource[] = {
+ [0] = {
+ .start = S3C2410_PA_UART0,
+ .end = S3C2410_PA_UART0 + 0x3fff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_S3CUART_RX0,
+ .end = IRQ_S3CUART_ERR0,
+ .flags = IORESOURCE_IRQ,
+ }
+
+};
+
+static struct resource s3c_uart1_resource[] = {
+ [0] = {
+ .start = S3C2410_PA_UART1,
+ .end = S3C2410_PA_UART1 + 0x3fff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = IRQ_S3CUART_RX1,
+ .end = IRQ_S3CUART_ERR1,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+/* our uart devices */
+
+static struct platform_device s3c_uart0 = {
+ .name = "s3c2400-uart",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(s3c_uart0_resource),
+ .resource = s3c_uart0_resource,
+};
+
+
+static struct platform_device s3c_uart1 = {
+ .name = "s3c2400-uart",
+ .id = 1,
+ .num_resources = ARRAY_SIZE(s3c_uart1_resource),
+ .resource = s3c_uart1_resource,
+};
+
+static struct platform_device *uart_devices[] __initdata = {
+ &s3c_uart0,
+ &s3c_uart1
+};
+
+/* store our uart devices for the serial driver console */
+struct platform_device *s3c2400_uart_devices[2];
+
+static int s3c2400_uart_count = 0;
+
+/* uart registration process */
+
+void __init s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no)
+{
+ struct platform_device *platdev;
+ int uart;
+
+ for (uart = 0; uart < no; uart++, cfg++) {
+ platdev = uart_devices[cfg->hwport];
+
+ s3c24xx_uart_devs[uart] = platdev;
+ platdev->dev.platform_data = cfg;
+ }
+
+ s3c2400_uart_count = uart;
+}
+
+/* s3c2400_map_io
+ *
+ * register the standard cpu IO areas, and any passed in from the
+ * machine specific initialisation.
+*/
+
+void __init s3c2400_map_io(struct map_desc *mach_desc, int mach_size)
+{
+ /* register our io-tables */
+
+ iotable_init(s3c2400_iodesc, ARRAY_SIZE(s3c2400_iodesc));
+ iotable_init(mach_desc, mach_size);
+}
+
+void __init s3c2400_init_clocks(int xtal)
+{
+ unsigned long tmp;
+ unsigned long fclk;
+ unsigned long hclk;
+ unsigned long pclk;
+
+ /* now we've got our machine bits initialised, work out what
+ * clocks we've got */
+
+ fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal);
+
+ tmp = __raw_readl(S3C2410_CLKDIVN);
+
+ /* work out clock scalings */
+
+ hclk = fclk / ((tmp & S3C2410_CLKDIVN_HDIVN) ? 2 : 1);
+ pclk = hclk / ((tmp & S3C2410_CLKDIVN_PDIVN) ? 2 : 1);
+
+ /* print brieft summary of clocks, etc */
+
+ printk("S3C2400: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
+ print_mhz(fclk), print_mhz(hclk), print_mhz(pclk));
+
+ /* initialise the clocks here, to allow other things like the
+ * console to use them
+ */
+
+ s3c24xx_setup_clocks(xtal, fclk, hclk, pclk);
+}
+
+int __init s3c2400_init(void)
+{
+ printk("S3C2400: Initialising architecture\n");
+
+ return platform_add_devices(s3c24xx_uart_devs, s3c2400_uart_count);
+}
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/arch/arm/mach-s3c2410/s3c2400.h linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/s3c2400.h
--- linux-2.6.13-rc2/arch/arm/mach-s3c2410/s3c2400.h 1969-12-31 21:00:00.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/arch/arm/mach-s3c2410/s3c2400.h 2005-07-08 10:58:03.000000000 -0300
@@ -0,0 +1,38 @@
+/* arch/arm/mach-s3c2410/s3c2400.h
+ *
+ * Copyright (c) 2004 Simtec Electronics
+ * Ben Dooks
+ *
+ * Header file for S3C2400 cpu support
+ *
+ * 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.
+ *
+ * Modifications:
+ * 18-Aug-2004 BJD Created initial version
+ * 20-Aug-2004 BJD Added s3c2410_board struct
+ * 04-Sep-2004 BJD Added s3c2410_init_uarts() call
+ * 17-Oct-2004 BJD Moved board out to cpu
+ * 04-Jan-2005 BJD Changed uart init
+ * 10-Jan-2005 BJD Removed timer to cpu.h, moved 2410 specific bits here
+ * 14-Jan-2005 BJD Added s3c2410_init_clocks call
+ * 05-Apr-2005 LCVR Modified for S3C2400
+*/
+
+#ifdef CONFIG_CPU_S3C2400
+
+extern int s3c2400_init(void);
+
+extern void s3c2400_map_io(struct map_desc *mach_desc, int size);
+
+extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
+extern void s3c2400_init_clocks(int xtal);
+
+#else
+#define s3c2400_init_clocks NULL
+#define s3c2400_init_uarts NULL
+#define s3c2400_map_io NULL
+#define s3c2400_init NULL
+#endif
diff -X dontdiff-2.6 -Nurp linux-2.6.13-rc2/include/asm-arm/arch-s3c2410/gp32-map.h linux-2.6.13-rc2-lucasvr/include/asm-arm/arch-s3c2410/gp32-map.h
--- linux-2.6.13-rc2/include/asm-arm/arch-s3c2410/gp32-map.h 1969-12-31 21:00:00.000000000 -0300
+++ linux-2.6.13-rc2-lucasvr/include/asm-arm/arch-s3c2410/gp32-map.h 2005-07-08 10:58:03.000000000 -0300
@@ -0,0 +1,23 @@
+/* linux/include/asm-arm/arch-s3c2410/gp32-map.h
+ *
+ * Copyright (c) 2005 Lucas Correia Villa Real
+ *
+ * Machine GP32 - Memory map definitions
+ *
+ * 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.
+ *
+*/
+
+/* needs arch/map.h including with this */
+
+#ifndef __ASM_ARCH_GP32MAP_H
+#define __ASM_ARCH_GP32MAP_H
+
+#define GP32_IOADDR(x) (0xC0000000 + (x))
+
+/* maps the BOOT ROM, which is connected to nGCS0 */
+#define GP32_VA_BOOT_ROM GP32_IOADDR(0x00000000)
+
+#endif /* __ASM_ARCH_GP32MAP_H */