diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/Makefile linux-2.4.2-rmk2-np1-pvs2/arch/arm/Makefile --- linux/arch/arm/Makefile Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/Makefile Mon Apr 16 06:37:18 2001 @@ -108,6 +108,10 @@ # SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory TEXTADDR = 0xc0208000 endif +ifeq ($(CONFIG_SA1100_PSION_SERIES7),y) +# 0xc0008000 is in video memory as setup by EPOC32 +TEXTADDR = 0xc0208000 +endif endif ifeq ($(CONFIG_ARCH_L7200),y) diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/boot/Makefile linux-2.4.2-rmk2-np1-pvs2/arch/arm/boot/Makefile --- linux/arch/arm/boot/Makefile Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/boot/Makefile Mon Apr 16 06:40:31 2001 @@ -94,6 +94,10 @@ ZTEXTADDR = 0x00080000 ZBSSADDR = 0xc0200000 endif +ifeq ($(CONFIG_SA1100_PSION_SERIES7),y) + ZTEXTADDR = 0xc0208000 + ZRELADDR = 0xc0208000 +endif ifeq ($(CONFIG_SA1111),y) ZRELADDR = 0xc0208000 endif Binary files linux/arch/arm/boot/kernels7.gz and linux-2.4.2-rmk2-np1-pvs2/arch/arm/boot/kernels7.gz differ diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/config.in linux-2.4.2-rmk2-np1-pvs2/arch/arm/config.in --- linux/arch/arm/config.in Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/config.in Mon Apr 16 05:05:51 2001 @@ -65,6 +65,7 @@ dep_bool ' Assabet' CONFIG_SA1100_ASSABET $CONFIG_ARCH_SA1100 dep_bool ' Include support for Neponset' CONFIG_ASSABET_NEPONSET $CONFIG_SA1100_ASSABET dep_bool ' Brutus' CONFIG_SA1100_BRUTUS $CONFIG_ARCH_SA1100 +dep_bool ' Psion Series 7' CONFIG_SA1100_PSION_SERIES7 $CONFIG_ARCH_SA1100 dep_bool ' CerfBoard' CONFIG_SA1100_CERF $CONFIG_ARCH_SA1100 if [ "$CONFIG_SA1100_CERF" = "y" ]; then bool ' 32MB Cerf support' CONFIG_SA1100_CERF_32MB diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/def-configs/series7 linux-2.4.2-rmk2-np1-pvs2/arch/arm/def-configs/series7 --- linux/arch/arm/def-configs/series7 Wed Dec 31 19:00:00 1969 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/def-configs/series7 Wed Feb 27 12:11:49 2002 @@ -0,0 +1,404 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_UID16=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +# CONFIG_OBSOLETE is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +# CONFIG_KMOD is not set + +# +# System Type +# +# CONFIG_ARCH_ARCA5K is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_RPC is not set +CONFIG_ARCH_SA1100=y +# CONFIG_ARCH_CLPS711X is not set + +# +# Archimedes/A5000 Implementations +# + +# +# Archimedes/A5000 Implementations (select only ONE) +# + +# +# Footbridge Implementations +# + +# +# SA11x0 Implementations +# +# CONFIG_SA1100_ASSABET is not set +# CONFIG_SA1100_BRUTUS is not set +CONFIG_SA1100_PSION_SERIES7=y +# CONFIG_SA1100_CERF is not set +# CONFIG_SA1100_BITSY is not set +# CONFIG_SA1100_EXTENEX1 is not set +# CONFIG_SA1100_FREEBIRD is not set +# CONFIG_SA1100_GRAPHICSCLIENT is not set +# CONFIG_SA1100_HUW_WEBPANEL is not set +# CONFIG_SA1100_LART is not set +# CONFIG_SA1100_PLEB is not set +# CONFIG_SA1100_NANOENGINE is not set +# CONFIG_SA1100_PANGOLIN is not set +# CONFIG_SA1100_SHERMAN is not set +# CONFIG_SA1100_VICTOR is not set +# CONFIG_SA1100_XP860 is not set +# CONFIG_SA1100_YOPY is not set +# CONFIG_SA1100_PFS168 is not set +# CONFIG_SA1100_USB is not set +# CONFIG_SA1100_FREQUENCY_SCALE is not set + +# +# CLPS711X/EP721X Implementations +# +# CONFIG_ARCH_ACORN is not set +# CONFIG_FOOTBRIDGE is not set +# CONFIG_FOOTBRIDGE_HOST is not set +# CONFIG_FOOTBRIDGE_ADDIN is not set +CONFIG_CPU_32=y +# CONFIG_CPU_26 is not set + +# +# Processor Type +# +# CONFIG_CPU_32v3 is not set +CONFIG_CPU_32v4=y +# CONFIG_CPU_ARM610 is not set +# CONFIG_CPU_ARM710 is not set +# CONFIG_CPU_ARM720T is not set +# CONFIG_CPU_ARM920T is not set +# CONFIG_CPU_ARM1020 is not set +# CONFIG_CPU_SA110 is not set +CONFIG_CPU_SA1100=y +CONFIG_DISCONTIGMEM=y + +# +# General setup +# + +# +# Please ensure that you have read the help on the next option +# +# CONFIG_ANGELBOOT is not set +# CONFIG_PCI is not set +# CONFIG_ISA is not set +# CONFIG_ISA_DMA is not set +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +# CONFIG_FPE_NWFPE is not set +CONFIG_FPE_FASTFPE=y +CONFIG_KCORE_ELF=y +# CONFIG_KCORE_AOUT is not set +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_PM is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="keepinitrd" +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UCB1200 is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_INITRD=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking options +# +# CONFIG_PACKET is not set +# CONFIG_NETLINK is not set +# CONFIG_NETFILTER is not set +# CONFIG_FILTER is not set +# CONFIG_UNIX is not set +# CONFIG_INET is not set +# CONFIG_ATM is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET_AUNUDP is not set +# CONFIG_ECONET_NATIVE is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network device support +# +# CONFIG_NETDEVICES is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input core support +# +# CONFIG_INPUT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +# CONFIG_SERIAL is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_SERIAL_SA1100=y +# CONFIG_SERIAL_SA1100_CONSOLE is not set +CONFIG_SA1100_DEFAULT_BAUDRATE=9600 +# CONFIG_TOUCHSCREEN_BITSY is not set +# CONFIG_PROFILER is not set +CONFIG_SERIAL_CORE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=32 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# + +# +# Game port support +# + +# +# Gameport joysticks +# + +# +# Serial port support +# + +# +# Serial port joysticks +# + +# +# Parallel port joysticks +# + +# +# Parport support is needed for parallel port joysticks +# +# CONFIG_QIC02_TAPE is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_SA1100_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_FAT_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS_FS_VERBOSE=0 +CONFIG_JFFS2_FS_DEBUG=0 +# CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set +# CONFIG_ISO9660_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +# CONFIG_SUNRPC is not set +# CONFIG_LOCKD is not set +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_NCPFS_NLS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Console drivers +# +CONFIG_PC_KEYMAP=y +# CONFIG_VGA_CONSOLE is not set +CONFIG_FB=y + +# +# Frame-buffer support +# +CONFIG_FB=y +CONFIG_DUMMY_CONSOLE=y +CONFIG_FB_SA1100=y +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FBCON_ADVANCED is not set +CONFIG_FBCON_CFB2=y +CONFIG_FBCON_CFB4=y +CONFIG_FBCON_CFB8=y +CONFIG_FBCON_CFB16=y +CONFIG_FBCON_FONTWIDTH8_ONLY=y +CONFIG_FBCON_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Kernel hacking +# +# CONFIG_NO_FRAME_POINTER is not set +CONFIG_DEBUG_ERRORS=y +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_INFO=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_DEBUG_LL is not set diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/mach-sa1100/Makefile linux-2.4.2-rmk2-np1-pvs2/arch/arm/mach-sa1100/Makefile --- linux/arch/arm/mach-sa1100/Makefile Thu Feb 28 18:50:11 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/mach-sa1100/Makefile Mon Apr 16 06:50:16 2001 @@ -9,6 +9,8 @@ O_TARGET := sa1100.o +CFLAGS_arch.o := -DTEXTADDR=$(TEXTADDR) + # Object file lists. obj-y := arch.o hw.o dma-sa1100.o # mm.o diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/mach-sa1100/arch.c linux-2.4.2-rmk2-np1-pvs2/arch/arm/mach-sa1100/arch.c --- linux/arch/arm/mach-sa1100/arch.c Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/mach-sa1100/arch.c Mon Apr 16 07:19:14 2001 @@ -261,6 +261,13 @@ setup_ramdisk( 1, 0, 0, 8192 ); setup_initrd( 0xc0800000, 3*1024*1024 ); } + + else if (machine_is_psion_series7()) { + SET_BANK(0, 0xc0000000, 16 * 1024 * 1024); + mi->nr_banks = 1; + ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); + setup_ramdisk(1, 0, 0, 8 * 1024); + } } #ifdef CONFIG_SA1100_ASSABET @@ -417,5 +424,15 @@ FIXUP(fixup_sa1100) MAPIO(sa1100_map_io) INITIRQ(genarch_init_irq) +MACHINE_END +#endif +#ifdef CONFIG_SA1100_PSION_SERIES7 +MACHINE_START(PSION_SERIES7, "Psion Series 7") + BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) + VIDEO(0xc0000000, 0x50000) + FIXUP(fixup_sa1100) + MAPIO(sa1100_map_io) + INITIRQ(genarch_init_irq) + BOOT_PARAMS(TEXTADDR - (128 * 1024)) MACHINE_END #endif diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/mm/init.c linux-2.4.2-rmk2-np1-pvs2/arch/arm/mm/init.c --- linux/arch/arm/mm/init.c Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/mm/init.c Mon Apr 16 07:04:27 2001 @@ -419,6 +419,9 @@ reserve_bootmem_node(pgdat, 0x02000000, 0x00080000); if (machine_is_p720t()) reserve_bootmem_node(pgdat, PAGE_OFFSET, 0x00014000); + if (machine_is_psion_series7()) + reserve_bootmem_node(pgdat, 0xc0000000, 0x00050000); + #ifdef CONFIG_SA1111 /* * Because of the SA1111 DMA bug, we want to preserve diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/arch/arm/mm/mm-sa1100.c linux-2.4.2-rmk2-np1-pvs2/arch/arm/mm/mm-sa1100.c --- linux/arch/arm/mm/mm-sa1100.c Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/arch/arm/mm/mm-sa1100.c Wed Apr 18 15:57:21 2001 @@ -199,6 +199,15 @@ LAST_DESC }; + +static struct map_desc psion_series7_io_desc[] __initdata = { +#ifdef CONFIG_SA1100_PSION_SERIES7 + /* virtual physical length domain r w c b */ \ + { 0xf1000000, 0x10000000, 0x00001000, DOMAIN_IO, 1, 1, 0, 0 }, /* PSION */ + LAST_DESC +#endif +}; + void __init sa1100_map_io(void) { struct map_desc *desc = NULL; @@ -237,6 +246,8 @@ desc = huw_webpanel_io_desc; else if (machine_is_pfs168()) desc = pfs168_io_desc; + else if (machine_is_psion_series7()) + desc = psion_series7_io_desc; if (desc) iotable_init(desc); diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/drivers/char/Makefile linux-2.4.2-rmk2-np1-pvs2/drivers/char/Makefile --- linux/drivers/char/Makefile Thu Feb 28 18:52:54 2002 +++ linux-2.4.2-rmk2-np1-pvs2/drivers/char/Makefile Tue Apr 17 07:48:28 2001 @@ -67,6 +67,9 @@ KEYMAP = gckeymap.o KEYBD = gc_keyb.o endif + ifeq ($(CONFIG_SA1100_PSION_SERIES7),y) + KEYBD = s7_keyb.o + endif endif ifeq ($(ARCH),sh) diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/drivers/char/s7_keyb.c linux-2.4.2-rmk2-np1-pvs2/drivers/char/s7_keyb.c --- linux/drivers/char/s7_keyb.c Wed Dec 31 19:00:00 1969 +++ linux-2.4.2-rmk2-np1-pvs2/drivers/char/s7_keyb.c Wed Feb 27 16:29:02 2002 @@ -0,0 +1,152 @@ +/* + * linux/drivers/char/s7_keyb.c + * + * Copyright (C) 2002 Peter van Sebille + * + * 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 +#include +#include +#include +#include +#include // for OS timers in watchdog_reset + +/* + * TODO: + * - pressing 'b' and 'n' at roughly the same time results in '3' and ';' + */ + +#define S7_KBD_ROWS 8 +#define S7_KBD_COLS 8 + +static unsigned rows_reported_down[S7_KBD_COLS]; + +#define SCANHZ (HZ/20) +#define NUL 0 + +struct timer_list scan_timer; + +static const int s7_keymap[S7_KBD_ROWS][S7_KBD_COLS] = +{ + /* 0 1 2 3 4 5 6 7 */ + /* 0 */ { 28, 14, 0, 0, 57, 0, 0, 1}, + /* 1 */ { 77, 0, 37, 51, 19, 33, 16, 2}, + /* 2 */ { 15, 12, 23, 41, 5, 47, 30, 3}, + /* 3 */ { 21, 13, 9, 50, 6, 46, 44, 7}, + /* 4 */ { 75, 11, 10, 36, 20, 32, 31, 52}, + /* 5 */ { 80, 25, 24, 22, 34, 18, 17, 72}, + /* 6 */ { 49, 39, 38, 8, 48, 4, 45, 35}, + /* 7 */ { 42, 54, 29, 0, 43, 53, 0, 0} +}; + + +// need to go to a new header file: asm/arch/s7hw.h +#define S7KeyScan (*((volatile unsigned short *) 0xf1000030)) +#define S7PADR (*((volatile unsigned short *) 0xf1000004)) +#define S7_KBDSCAN 0xf +#define S7_KBSC_COL0 8 + + +// the 16 udelay as used on the S5mx is not long enough. +unsigned kbd_delay[]={32 ,32 ,32 ,32 ,32 ,32 ,32 ,32 ,32}; + + +static void check_kbd(void) +{ + int col, row, scancode; + unsigned newup, newdown, rows_down; + int need_tasklet_schedule=0; + unsigned char state; + + for (col=0; col>= 1; + newup >>= 1; + } + + rows_reported_down[col] = rows_down; + } + + if(need_tasklet_schedule) + tasklet_schedule(&keyboard_tasklet); +} + + +static void reset_watchdog(void) +{ + /* + * The watchdog has been enabled from under EPOC. Once enabled + * it can't be disabled, so each keyboard tick we advance the + * watchdog timer as far ahead as possible. + */ + OSMR3 = OSCR - 1; +} + + +static void s7_scan_kbd(unsigned long dummy) +{ + check_kbd(); + reset_watchdog(); + + init_timer(&scan_timer); + scan_timer.expires = jiffies + SCANHZ; + scan_timer.data = 0; + scan_timer.function = s7_scan_kbd; + add_timer(&scan_timer); +} + + +void __init Series7_kbd_init_hw(void) +{ + init_timer(&scan_timer); + scan_timer.expires = jiffies + SCANHZ; + scan_timer.data = 0; + scan_timer.function = s7_scan_kbd; + add_timer(&scan_timer); + + printk("Psion Series 7-Netbook keyboard driver initialized\n"); +} + + + + + + + + + + + + + + + diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/drivers/video/sa1100fb.c linux-2.4.2-rmk2-np1-pvs2/drivers/video/sa1100fb.c --- linux/drivers/video/sa1100fb.c Thu Feb 28 18:52:55 2002 +++ linux-2.4.2-rmk2-np1-pvs2/drivers/video/sa1100fb.c Mon Apr 16 11:26:36 2001 @@ -498,12 +498,21 @@ return -EINVAL; } +#ifdef CONFIG_SA1100_PSION_SERIES7 + palette_mem_size = SA1100_PALETTE_MEM_SIZE(par->bits_per_pixel); + palette_mem_phys = (u_long)VideoMemRegion_phys + 512 - palette_mem_size; + par->p_palette_base = (u_short *)palette_mem_phys; + par->v_palette_base = (u_short *)((u_long)VideoMemRegion + 512 - palette_mem_size); + par->p_screen_base = (u_char *)((u_long)VideoMemRegion_phys + 512); + par->v_screen_base = (u_char *)((u_long)VideoMemRegion + 512); +#else palette_mem_size = SA1100_PALETTE_MEM_SIZE(par->bits_per_pixel); palette_mem_phys = (u_long)VideoMemRegion_phys + PAGE_SIZE - palette_mem_size; par->p_palette_base = (u_short *)palette_mem_phys; par->v_palette_base = (u_short *)((u_long)VideoMemRegion + PAGE_SIZE - palette_mem_size); par->p_screen_base = (u_char *)((u_long)VideoMemRegion_phys + PAGE_SIZE); par->v_screen_base = (u_char *)((u_long)VideoMemRegion + PAGE_SIZE); +#endif DPRINTK("p_palette_base = 0x%08lx\n",(u_long)par->p_palette_base); DPRINTK("v_palette_base = 0x%08lx\n",(u_long)par->v_palette_base); @@ -847,6 +856,14 @@ init_var.upper_margin = 2; init_var.lower_margin = 1; + } else if (machine_is_psion_series7()) { + current_par.max_xres = 640; + current_par.max_yres = 480; + current_par.max_bpp = 8; + init_var.red.length = 4; + init_var.green = init_var.red; + init_var.blue = init_var.red; + init_var.sync = 0; } current_par.p_palette_base = NULL; @@ -881,6 +898,7 @@ static int __init sa1100fb_map_video_memory(void) { +#if 0 u_int required_pages; u_int extra_pages; u_int order; @@ -922,6 +940,7 @@ L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE); +#endif return (VideoMemRegion == NULL ? -EINVAL : 0); } @@ -967,6 +986,11 @@ static int sa1100fb_activate_var(struct fb_var_screeninfo *var) { +#ifdef CONFIG_SA1100_PSION_SERIES7 + DPRINTK("Configuring SA1100 LCD\n"); + sa1100fb_enable_lcd_controller(); + return 0; +#else u_long flags; int pcd = get_pcd(var->pixclock); @@ -1223,6 +1247,7 @@ } return 0; +#endif } @@ -1283,7 +1308,11 @@ */ static void sa1100fb_disable_lcd_controller(void) { - DPRINTK("Disabling LCD controller\n"); +#ifdef CONFIG_SA1100_PSION_SERIES7 + + DPRINTK("Disabling LCD controller\n"); + current_par.controller_state = LCD_MODE_DISABLED; +#else /* Exit if already LCD disabled, or LDD IRQ unmasked */ if ((current_par.controller_state == LCD_MODE_DISABLED) || @@ -1317,6 +1346,7 @@ while(!(LCSR & LCSR_LDD)); current_par.controller_state = LCD_MODE_DISABLED; +#endif } /* @@ -1327,6 +1357,11 @@ */ static void sa1100fb_enable_lcd_controller(void) { +#ifdef CONFIG_SA1100_PSION_SERIES7 + + current_par.controller_state = LCD_MODE_ENABLED; + DPRINTK("Ingore: Enabling LCD controller\n"); +#else u_long flags; DPRINTK("__FUNCTION__\n"); @@ -1413,6 +1448,7 @@ } /* Restore interrupt status */ local_irq_restore(flags); +#endif } /* @@ -1493,25 +1529,65 @@ #endif + + +static int sa1100fb_remap_epoc_video_memory(void) +{ + u_int fb_size = 0x50000; + struct page *page; + + if (VideoMemRegion != NULL) + return -EINVAL; + + DPRINTK("-1-"); + + /* Find order required to allocate enough memory for framebuffer */ + VideoMemRegion_phys = (u_char *)0xc0000000; + VideoMemRegion = (u_char *)__phys_to_virt((u_long)VideoMemRegion_phys); + + /* Set reserved flag for fb memory to allow it to be remapped into */ + /* user space by the common fbmem driver using remap_page_range(). */ + for(page = virt_to_page(VideoMemRegion); + page < virt_to_page(VideoMemRegion + fb_size); page++) + mem_map_reserve(page); + + /* Remap the fb memory to a non-buffered, non-cached region */ + VideoMemRegion = (u_char *)__ioremap((u_long)VideoMemRegion_phys, + fb_size, + L_PTE_PRESENT | + L_PTE_YOUNG | + L_PTE_DIRTY | + L_PTE_WRITE); + return 0; +} + + int __init sa1100fb_init(void) { int ret; sa1100fb_init_fbinfo(); +#ifdef CONFIG_SA1100_PSION_SERIES7 + if ((ret = sa1100fb_remap_epoc_video_memory()) != 0) + return ret; +#else /* Initialize video memory */ if ((ret = sa1100fb_map_video_memory()) != 0) return ret; +#endif if (current_par.montype < 0 || current_par.montype > NR_MONTYPES) current_par.montype = 1; +#ifndef CONFIG_SA1100_PSION_SERIES7 if (request_irq(IRQ_LCD, sa1100fb_inter_handler, SA_INTERRUPT, "SA1100 LCD", NULL) != 0) { printk(KERN_ERR "sa1100fb: failed in request_irq\n"); return -EBUSY; } DPRINTK("sa1100fb: request_irq succeeded\n"); disable_irq(IRQ_LCD); +#endif if (machine_is_assabet()) { sa1100fb_assabet_set_truecolor(current_par.visual == diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/include/asm-arm/arch-sa1100/keyboard.h linux-2.4.2-rmk2-np1-pvs2/include/asm-arm/arch-sa1100/keyboard.h --- linux/include/asm-arm/arch-sa1100/keyboard.h Thu Feb 28 18:50:12 2002 +++ linux-2.4.2-rmk2-np1-pvs2/include/asm-arm/arch-sa1100/keyboard.h Wed Feb 27 11:00:16 2002 @@ -140,6 +140,21 @@ #define MSE_STAT_TXE (1<<7) #define MSE_STAT_STP (1<<8) +#elif (CONFIG_SA1100_PSION_SERIES7) + +//extern int Series7_kbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode); +extern void Series7_kbd_init_hw(void); + +#define kbd_setkeycode(x...) (-ENOSYS) +#define kbd_getkeycode(x...) (-ENOSYS) +#define kbd_translate(s, k, r) ({ *(k) = s; 1;}) +//#define kbd_translate Series7_kbd_translate +#define kbd_unexpected_up(x...) (1) +#define kbd_init_hw Series7_kbd_init_hw + +#define kbd_leds(x...) do {;} while (0) +#define kbd_enable_irq(x...) do {;} while (0) +#define kbd_disable_irq(x...) do {;} while (0) #else diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/include/asm-arm/constants.h linux-2.4.2-rmk2-np1-pvs2/include/asm-arm/constants.h --- linux/include/asm-arm/constants.h Wed Dec 31 19:00:00 1969 +++ linux-2.4.2-rmk2-np1-pvs2/include/asm-arm/constants.h Mon Apr 16 04:49:39 2001 @@ -0,0 +1,28 @@ +/* + * This file is automatically generated from arch/arm/tools/getconstants.c. + * Do not edit! Only include this file in assembly (.S) files! + */ + +#define TSK_SIGPENDING 8 +#define TSK_ADDR_LIMIT 12 +#define TSK_NEED_RESCHED 20 +#define TSK_PTRACE 24 +#define TSK_USED_MATH 560 +#define TSS_SAVE 776 +#define TSS_FPESAVE 616 +#define TSS_DOMAIN 780 +#define HPTE_TYPE_SMALL 2 +#define HPTE_AP_READ 2720 +#define HPTE_AP_WRITE 1360 +#define LPTE_PRESENT 1 +#define LPTE_YOUNG 2 +#define LPTE_BUFFERABLE 4 +#define LPTE_CACHEABLE 8 +#define LPTE_USER 16 +#define LPTE_WRITE 32 +#define LPTE_EXEC 64 +#define LPTE_DIRTY 128 +#define PAGE_SZ 4096 +#define KSWI_BASE 9437184 +#define KSWI_SYS_BASE 10420224 +#define SYS_ERROR0 10420224 diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/init/main.c linux-2.4.2-rmk2-np1-pvs2/init/main.c --- linux/init/main.c Thu Feb 28 18:52:55 2002 +++ linux-2.4.2-rmk2-np1-pvs2/init/main.c Mon Apr 16 07:57:16 2001 @@ -741,6 +741,7 @@ mount_devfs_fs (); + #ifdef CONFIG_BLK_DEV_INITRD root_mountflags = real_root_mountflags; if (mount_initrd && ROOT_DEV != real_root_dev diff -urN -X /home/pese/linux/archive/dontdiff -X /home/pese/linux/archive/dontdiff.peter linux/kernel/printk.c linux-2.4.2-rmk2-np1-pvs2/kernel/printk.c --- linux/kernel/printk.c Tue Feb 13 16:15:05 2001 +++ linux-2.4.2-rmk2-np1-pvs2/kernel/printk.c Wed Feb 27 12:30:53 2002 @@ -53,6 +53,119 @@ struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES]; static int preferred_console = -1; + +#define font_vga_8x8 my_private_fontdata +#include "../drivers/video/font_8x8.c" + +#define VIDEO_WIDTH 640 +#define VIDEO_HEIGHT 480 +#define FONT_X 8 +#define FONT_Y 8 +#define VIDEO_CHAR_COLS (VIDEO_WIDTH / FONT_X) +#define VIDEO_CHAR_ROWS (VIDEO_HEIGHT / FONT_Y) + +static unsigned* fb_base = (unsigned*) 0xc0000200; +static int xpos, ypos=7; +static int isInit; + +/* + * Blue: 220 + * Red: 5 + * Yellow: 250 + */ +#define VIDEO_BG_COLOR 220 +#define VIDEO_FG_COLOR 250 + +#define BG_PIXELS4 ((VIDEO_BG_COLOR << 24) | (VIDEO_BG_COLOR << 16) | (VIDEO_BG_COLOR << 8) | VIDEO_BG_COLOR) +#define FG_PIXELS4 ((VIDEO_FG_COLOR << 24) | (VIDEO_FG_COLOR << 16) | (VIDEO_FG_COLOR << 8) | VIDEO_FG_COLOR) + +static fg_colour = 35; +void video_clear(void) +{ + unsigned* fb = fb_base; + unsigned i = (VIDEO_WIDTH * VIDEO_HEIGHT ) >> 2; + while (i--) + *fb++ = BG_PIXELS4; + xpos=ypos=0; +} + +void video_moveup(void) +{ + unsigned* fb_src = fb_base + ((FONT_Y * VIDEO_WIDTH) >> 2); + unsigned* fb_dst = fb_base; + unsigned pixel4; + + pixel4 = ((VIDEO_HEIGHT - FONT_Y) * VIDEO_WIDTH) >> 2; + while(pixel4--) + *fb_dst++ = *fb_src++; + pixel4 = (FONT_Y * VIDEO_WIDTH) >> 2; + while(pixel4--) + *fb_dst++ = BG_PIXELS4; + xpos=0; + ypos=VIDEO_CHAR_ROWS - 1; +} + + +void video_printch_pos(char c, int xpos, int ypos) +{ + unsigned* fb_line = fb_base + (((ypos * VIDEO_WIDTH * FONT_Y) + ((xpos+1) * FONT_X)) >> 2); + unsigned char* fb; + unsigned char* fontchar = &fontdata_8x8[c*FONT_Y]; + unsigned x, y, bitmap; + + for(y=0 ; y>=1; + } + fb_line+=(VIDEO_WIDTH >> 2); + } +} + +void video_linefeed(void) +{ + xpos=0; + if (++ypos == VIDEO_CHAR_ROWS) + video_moveup(); +} + +void video_printch(char c) +{ + if (c == '\n') + { + video_linefeed(); + return; + } + + video_printch_pos(c, xpos, ypos); +#if 0 + if (++fg_colour == 256) + fg_colour=0; +#endif + if (++xpos == VIDEO_CHAR_COLS) + video_linefeed(); +} + +void video_puts(const char* s, int len) +{ + if (!isInit) + { + isInit = 1; + /*video_clear();*/ + } + while(len--) + video_printch(*s++); +} + + + /* * Setup a list of consoles. Called from init/main.c */ @@ -304,6 +417,7 @@ c = c->next; } } +// video_puts(msg, p - msg + line_feed); if (line_feed) msg_level = -1; } @@ -325,6 +439,7 @@ c->write(c, s, len); c = c->next; } +// video_puts(s, len); spin_unlock_irqrestore(&console_lock, flags); }