diff -crBN orig/arch/m32r/Kconfig new/arch/m32r/Kconfig
*** orig/arch/m32r/Kconfig	2005-10-31 16:40:22.000000000 +0900
--- new/arch/m32r/Kconfig	2006-12-18 17:50:11.000000000 +0900
***************
*** 81,86 ****
--- 81,89 ----
  config PLAT_MAPPI3
         bool "Mappi-III(M3A-2170)"
  
+ config PLAT_BLANCA
+ 	bool "CQpub Interface BLANCA"
+ 
  endchoice
  
  choice
***************
*** 136,142 ****
  config BUS_CLOCK
  	int "Bus Clock [Hz] (integer)"
  	default "70000000" if PLAT_MAPPI
! 	default "25000000" if PLAT_USRV
  	default "50000000" if PLAT_MAPPI3
  	default "50000000" if PLAT_M32700UT
  	default "50000000" if PLAT_OPSPUT
--- 139,145 ----
  config BUS_CLOCK
  	int "Bus Clock [Hz] (integer)"
  	default "70000000" if PLAT_MAPPI
! 	default "25000000" if PLAT_USRV  || PLAT_BLANCA
  	default "50000000" if PLAT_MAPPI3
  	default "50000000" if PLAT_M32700UT
  	default "50000000" if PLAT_OPSPUT
***************
*** 157,162 ****
--- 160,166 ----
  	default "08000000" if PLAT_USRV
  	default "08000000" if PLAT_M32700UT
  	default "08000000" if PLAT_OPSPUT
+ 	default "08000000" if PLAT_BLANCA
  	default "01000000" if PLAT_OAKS32R
  
  config MEMORY_SIZE
***************
*** 167,172 ****
--- 171,177 ----
  	default "01000000" if PLAT_M32700UT
  	default "01000000" if PLAT_OPSPUT
  	default "00800000" if PLAT_OAKS32R
+ 	default "00e00000" if PLAT_BLANCA
  
  config NOHIGHMEM
  	bool
diff -crBN orig/arch/m32r/blanca/defconfig new/arch/m32r/blanca/defconfig
*** orig/arch/m32r/blanca/defconfig	1970-01-01 09:00:00.000000000 +0900
--- new/arch/m32r/blanca/defconfig	2006-12-19 19:24:17.000000000 +0900
***************
*** 0 ****
--- 1,766 ----
+ #
+ # Automatically generated make config: don't edit
+ # Linux kernel version: 2.6.14
+ # Tue Dec 19 16:09:02 2006
+ #
+ CONFIG_M32R=y
+ # CONFIG_UID16 is not set
+ CONFIG_GENERIC_ISA_DMA=y
+ CONFIG_GENERIC_HARDIRQS=y
+ CONFIG_GENERIC_IRQ_PROBE=y
+ 
+ #
+ # Code maturity level options
+ #
+ CONFIG_EXPERIMENTAL=y
+ CONFIG_CLEAN_COMPILE=y
+ CONFIG_BROKEN_ON_SMP=y
+ CONFIG_LOCK_KERNEL=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+ 
+ #
+ # General setup
+ #
+ CONFIG_LOCALVERSION=""
+ CONFIG_LOCALVERSION_AUTO=y
+ CONFIG_SWAP=y
+ CONFIG_SYSVIPC=y
+ # CONFIG_POSIX_MQUEUE is not set
+ CONFIG_BSD_PROCESS_ACCT=y
+ # CONFIG_BSD_PROCESS_ACCT_V3 is not set
+ CONFIG_SYSCTL=y
+ # CONFIG_AUDIT is not set
+ CONFIG_HOTPLUG=y
+ CONFIG_KOBJECT_UEVENT=y
+ CONFIG_IKCONFIG=y
+ # CONFIG_IKCONFIG_PROC is not set
+ CONFIG_INITRAMFS_SOURCE=""
+ CONFIG_EMBEDDED=y
+ # CONFIG_KALLSYMS is not set
+ CONFIG_PRINTK=y
+ CONFIG_BUG=y
+ CONFIG_BASE_FULL=y
+ # CONFIG_FUTEX is not set
+ # CONFIG_EPOLL is not set
+ # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+ CONFIG_SHMEM=y
+ CONFIG_CC_ALIGN_FUNCTIONS=0
+ CONFIG_CC_ALIGN_LABELS=0
+ CONFIG_CC_ALIGN_LOOPS=0
+ CONFIG_CC_ALIGN_JUMPS=0
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+ 
+ #
+ # Loadable module support
+ #
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ # CONFIG_MODULE_FORCE_UNLOAD is not set
+ CONFIG_OBSOLETE_MODPARM=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+ 
+ #
+ # Processor type and features
+ #
+ # CONFIG_PLAT_MAPPI is not set
+ # CONFIG_PLAT_USRV is not set
+ # CONFIG_PLAT_M32700UT is not set
+ # CONFIG_PLAT_OPSPUT is not set
+ # CONFIG_PLAT_OAKS32R is not set
+ # CONFIG_PLAT_MAPPI2 is not set
+ # CONFIG_PLAT_MAPPI3 is not set
+ CONFIG_PLAT_BLANCA=y
+ # CONFIG_CHIP_M32700 is not set
+ # CONFIG_CHIP_M32102 is not set
+ CONFIG_CHIP_VDEC2=y
+ # CONFIG_CHIP_OPSP is not set
+ CONFIG_MMU=y
+ CONFIG_TLB_ENTRIES=8
+ CONFIG_ISA_M32R2=y
+ CONFIG_BUS_CLOCK=50000000
+ CONFIG_TIMER_DIVIDE=128
+ # CONFIG_CPU_LITTLE_ENDIAN is not set
+ CONFIG_MEMORY_START=0x08000000
+ CONFIG_MEMORY_SIZE=0x00f00000
+ CONFIG_NOHIGHMEM=y
+ # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+ CONFIG_SELECT_MEMORY_MODEL=y
+ CONFIG_FLATMEM_MANUAL=y
+ # CONFIG_DISCONTIGMEM_MANUAL is not set
+ # CONFIG_SPARSEMEM_MANUAL is not set
+ CONFIG_FLATMEM=y
+ CONFIG_FLAT_NODE_MEM_MAP=y
+ # CONFIG_SPARSEMEM_STATIC is not set
+ CONFIG_RWSEM_GENERIC_SPINLOCK=y
+ # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+ CONFIG_GENERIC_CALIBRATE_DELAY=y
+ CONFIG_PREEMPT=y
+ # CONFIG_SMP is not set
+ 
+ #
+ # Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+ #
+ # CONFIG_ISA is not set
+ 
+ #
+ # PCCARD (PCMCIA/CardBus) support
+ #
+ CONFIG_PCCARD=y
+ # CONFIG_PCMCIA_DEBUG is not set
+ CONFIG_PCMCIA=y
+ CONFIG_PCMCIA_LOAD_CIS=y
+ CONFIG_PCMCIA_IOCTL=y
+ 
+ #
+ # PC-card bridges
+ #
+ 
+ #
+ # PCI Hotplug Support
+ #
+ 
+ #
+ # Executable file formats
+ #
+ CONFIG_BINFMT_ELF=y
+ # CONFIG_BINFMT_MISC is not set
+ 
+ #
+ # Networking
+ #
+ CONFIG_NET=y
+ 
+ #
+ # Networking options
+ #
+ CONFIG_PACKET=y
+ # CONFIG_PACKET_MMAP is not set
+ CONFIG_UNIX=y
+ # CONFIG_NET_KEY is not set
+ CONFIG_INET=y
+ # CONFIG_IP_MULTICAST is not set
+ # CONFIG_IP_ADVANCED_ROUTER is not set
+ CONFIG_IP_FIB_HASH=y
+ CONFIG_IP_PNP=y
+ CONFIG_IP_PNP_DHCP=y
+ # CONFIG_IP_PNP_BOOTP is not set
+ # CONFIG_IP_PNP_RARP is not set
+ # CONFIG_NET_IPIP is not set
+ # CONFIG_NET_IPGRE is not set
+ # CONFIG_ARPD is not set
+ # CONFIG_SYN_COOKIES is not set
+ # CONFIG_INET_AH is not set
+ # CONFIG_INET_ESP is not set
+ # CONFIG_INET_IPCOMP is not set
+ # CONFIG_INET_TUNNEL is not set
+ CONFIG_INET_DIAG=y
+ CONFIG_INET_TCP_DIAG=y
+ # CONFIG_TCP_CONG_ADVANCED is not set
+ CONFIG_TCP_CONG_BIC=y
+ # CONFIG_IPV6 is not set
+ # CONFIG_NETFILTER is not set
+ 
+ #
+ # DCCP Configuration (EXPERIMENTAL)
+ #
+ # CONFIG_IP_DCCP is not set
+ 
+ #
+ # SCTP Configuration (EXPERIMENTAL)
+ #
+ # CONFIG_IP_SCTP is not set
+ # CONFIG_ATM is not set
+ # CONFIG_BRIDGE is not set
+ # CONFIG_VLAN_8021Q is not set
+ # CONFIG_DECNET is not set
+ # CONFIG_LLC2 is not set
+ # CONFIG_IPX is not set
+ # CONFIG_ATALK is not set
+ # CONFIG_X25 is not set
+ # CONFIG_LAPB is not set
+ # CONFIG_NET_DIVERT is not set
+ # CONFIG_ECONET is not set
+ # CONFIG_WAN_ROUTER is not set
+ # CONFIG_NET_SCHED is not set
+ # CONFIG_NET_CLS_ROUTE is not set
+ 
+ #
+ # Network testing
+ #
+ # CONFIG_NET_PKTGEN is not set
+ # CONFIG_HAMRADIO is not set
+ # CONFIG_IRDA is not set
+ # CONFIG_BT is not set
+ # CONFIG_IEEE80211 is not set
+ 
+ #
+ # Device Drivers
+ #
+ 
+ #
+ # Generic Driver Options
+ #
+ CONFIG_STANDALONE=y
+ CONFIG_PREVENT_FIRMWARE_BUILD=y
+ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
+ 
+ #
+ # Connector - unified userspace <-> kernelspace linker
+ #
+ # CONFIG_CONNECTOR is not set
+ 
+ #
+ # Memory Technology Devices (MTD)
+ #
+ # CONFIG_MTD is not set
+ 
+ #
+ # Parallel port support
+ #
+ # CONFIG_PARPORT is not set
+ 
+ #
+ # Plug and Play support
+ #
+ 
+ #
+ # Block devices
+ #
+ # CONFIG_BLK_DEV_COW_COMMON is not set
+ CONFIG_BLK_DEV_LOOP=y
+ # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+ # CONFIG_BLK_DEV_NBD is not set
+ # CONFIG_BLK_DEV_RAM is not set
+ CONFIG_BLK_DEV_RAM_COUNT=16
+ # CONFIG_CDROM_PKTCDVD is not set
+ 
+ #
+ # IO Schedulers
+ #
+ CONFIG_IOSCHED_NOOP=y
+ # CONFIG_IOSCHED_AS is not set
+ CONFIG_IOSCHED_DEADLINE=y
+ CONFIG_IOSCHED_CFQ=y
+ # CONFIG_ATA_OVER_ETH is not set
+ 
+ #
+ # ATA/ATAPI/MFM/RLL support
+ #
+ # CONFIG_IDE is not set
+ 
+ #
+ # SCSI device support
+ #
+ # CONFIG_RAID_ATTRS is not set
+ CONFIG_SCSI=m
+ CONFIG_SCSI_PROC_FS=y
+ 
+ #
+ # SCSI support type (disk, tape, CD-ROM)
+ #
+ CONFIG_BLK_DEV_SD=m
+ # CONFIG_CHR_DEV_ST is not set
+ # CONFIG_CHR_DEV_OSST is not set
+ CONFIG_BLK_DEV_SR=m
+ # CONFIG_BLK_DEV_SR_VENDOR is not set
+ CONFIG_CHR_DEV_SG=m
+ # CONFIG_CHR_DEV_SCH is not set
+ 
+ #
+ # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+ #
+ CONFIG_SCSI_MULTI_LUN=y
+ # CONFIG_SCSI_CONSTANTS is not set
+ # CONFIG_SCSI_LOGGING is not set
+ 
+ #
+ # SCSI Transport Attributes
+ #
+ # CONFIG_SCSI_SPI_ATTRS is not set
+ # CONFIG_SCSI_FC_ATTRS is not set
+ # CONFIG_SCSI_ISCSI_ATTRS is not set
+ # CONFIG_SCSI_SAS_ATTRS is not set
+ 
+ #
+ # SCSI low-level drivers
+ #
+ # CONFIG_SCSI_SATA is not set
+ # CONFIG_SCSI_DEBUG is not set
+ 
+ #
+ # PCMCIA SCSI adapter support
+ #
+ # CONFIG_PCMCIA_AHA152X is not set
+ # CONFIG_PCMCIA_FDOMAIN is not set
+ # CONFIG_PCMCIA_NINJA_SCSI is not set
+ # CONFIG_PCMCIA_QLOGIC is not set
+ # CONFIG_PCMCIA_SYM53C500 is not set
+ 
+ #
+ # Multi-device support (RAID and LVM)
+ #
+ # CONFIG_MD is not set
+ 
+ #
+ # Fusion MPT device support
+ #
+ # CONFIG_FUSION is not set
+ 
+ #
+ # IEEE 1394 (FireWire) support
+ #
+ 
+ #
+ # I2O device support
+ #
+ 
+ #
+ # Network device support
+ #
+ CONFIG_NETDEVICES=y
+ # CONFIG_DUMMY is not set
+ # CONFIG_BONDING is not set
+ # CONFIG_EQUALIZER is not set
+ # CONFIG_TUN is not set
+ 
+ #
+ # PHY device support
+ #
+ # CONFIG_PHYLIB is not set
+ 
+ #
+ # Ethernet (10 or 100Mbit)
+ #
+ CONFIG_NET_ETHERNET=y
+ CONFIG_MII=y
+ # CONFIG_SMC91X is not set
+ CONFIG_IFNIC=y
+ # CONFIG_NE2000 is not set
+ 
+ #
+ # Ethernet (1000 Mbit)
+ #
+ 
+ #
+ # Ethernet (10000 Mbit)
+ #
+ 
+ #
+ # Token Ring devices
+ #
+ 
+ #
+ # Wireless LAN (non-hamradio)
+ #
+ # CONFIG_NET_RADIO is not set
+ 
+ #
+ # PCMCIA network device support
+ #
+ # CONFIG_NET_PCMCIA is not set
+ 
+ #
+ # Wan interfaces
+ #
+ # CONFIG_WAN is not set
+ # CONFIG_PPP is not set
+ # CONFIG_SLIP is not set
+ # CONFIG_SHAPER is not set
+ # CONFIG_NETCONSOLE is not set
+ # CONFIG_NETPOLL is not set
+ # CONFIG_NET_POLL_CONTROLLER is not set
+ 
+ #
+ # ISDN subsystem
+ #
+ # CONFIG_ISDN is not set
+ 
+ #
+ # Telephony Support
+ #
+ # CONFIG_PHONE is not set
+ 
+ #
+ # Input device support
+ #
+ CONFIG_INPUT=y
+ 
+ #
+ # Userland interfaces
+ #
+ # CONFIG_INPUT_MOUSEDEV is not set
+ # CONFIG_INPUT_JOYDEV is not set
+ # CONFIG_INPUT_TSDEV is not set
+ # CONFIG_INPUT_EVDEV is not set
+ # CONFIG_INPUT_EVBUG is not set
+ 
+ #
+ # Input Device Drivers
+ #
+ # CONFIG_INPUT_KEYBOARD is not set
+ # CONFIG_INPUT_MOUSE is not set
+ # CONFIG_INPUT_JOYSTICK is not set
+ # CONFIG_INPUT_TOUCHSCREEN is not set
+ # CONFIG_INPUT_MISC is not set
+ 
+ #
+ # Hardware I/O ports
+ #
+ CONFIG_SERIO=y
+ # CONFIG_SERIO_I8042 is not set
+ CONFIG_SERIO_SERPORT=y
+ # CONFIG_SERIO_LIBPS2 is not set
+ # CONFIG_SERIO_RAW is not set
+ # CONFIG_GAMEPORT is not set
+ 
+ #
+ # Character devices
+ #
+ CONFIG_VT=y
+ CONFIG_VT_CONSOLE=y
+ CONFIG_HW_CONSOLE=y
+ # CONFIG_SERIAL_NONSTANDARD is not set
+ 
+ #
+ # Serial drivers
+ #
+ # CONFIG_SERIAL_8250 is not set
+ 
+ #
+ # Non-8250 serial port support
+ #
+ CONFIG_SERIAL_CORE=y
+ CONFIG_SERIAL_CORE_CONSOLE=y
+ CONFIG_SERIAL_M32R_SIO=y
+ CONFIG_SERIAL_M32R_SIO_CONSOLE=y
+ CONFIG_UNIX98_PTYS=y
+ CONFIG_LEGACY_PTYS=y
+ CONFIG_LEGACY_PTY_COUNT=256
+ 
+ #
+ # IPMI
+ #
+ # CONFIG_IPMI_HANDLER is not set
+ 
+ #
+ # Watchdog Cards
+ #
+ # CONFIG_WATCHDOG is not set
+ # CONFIG_RTC is not set
+ # CONFIG_DTLK is not set
+ # CONFIG_R3964 is not set
+ 
+ #
+ # Ftape, the floppy tape device driver
+ #
+ 
+ #
+ # PCMCIA character devices
+ #
+ # CONFIG_SYNCLINK_CS is not set
+ # CONFIG_RAW_DRIVER is not set
+ 
+ #
+ # TPM devices
+ #
+ 
+ #
+ # I2C support
+ #
+ # CONFIG_I2C is not set
+ 
+ #
+ # Dallas's 1-wire bus
+ #
+ # CONFIG_W1 is not set
+ 
+ #
+ # Hardware Monitoring support
+ #
+ CONFIG_HWMON=y
+ # CONFIG_HWMON_VID is not set
+ # CONFIG_HWMON_DEBUG_CHIP is not set
+ 
+ #
+ # Misc devices
+ #
+ 
+ #
+ # Multimedia Capabilities Port drivers
+ #
+ 
+ #
+ # Multimedia devices
+ #
+ # CONFIG_VIDEO_DEV is not set
+ 
+ #
+ # Digital Video Broadcasting Devices
+ #
+ # CONFIG_DVB is not set
+ 
+ #
+ # Graphics support
+ #
+ CONFIG_FB=y
+ CONFIG_FB_CFB_FILLRECT=y
+ CONFIG_FB_CFB_COPYAREA=y
+ CONFIG_FB_CFB_IMAGEBLIT=y
+ CONFIG_FB_SOFT_CURSOR=y
+ # CONFIG_FB_MACMODES is not set
+ # CONFIG_FB_MODE_HELPERS is not set
+ # CONFIG_FB_TILEBLITTING is not set
+ # CONFIG_FB_S1D13XXX is not set
+ CONFIG_FB_IFRGBC=y
+ # CONFIG_FB_VIRTUAL is not set
+ 
+ #
+ # Console display driver support
+ #
+ CONFIG_VGA_CONSOLE=y
+ CONFIG_DUMMY_CONSOLE=y
+ CONFIG_FRAMEBUFFER_CONSOLE=y
+ # CONFIG_FONTS is not set
+ CONFIG_FONT_8x8=y
+ CONFIG_FONT_8x16=y
+ 
+ #
+ # Logo configuration
+ #
+ CONFIG_LOGO=y
+ # CONFIG_LOGO_LINUX_MONO is not set
+ # CONFIG_LOGO_LINUX_VGA16 is not set
+ # CONFIG_LOGO_LINUX_CLUT224 is not set
+ CONFIG_LOGO_M32R_CLUT224=y
+ # CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+ 
+ #
+ # Sound
+ #
+ # CONFIG_SOUND is not set
+ 
+ #
+ # USB support
+ #
+ # CONFIG_USB_ARCH_HAS_HCD is not set
+ # CONFIG_USB_ARCH_HAS_OHCI is not set
+ 
+ #
+ # USB Gadget Support
+ #
+ # CONFIG_USB_GADGET is not set
+ 
+ #
+ # MMC/SD Card support
+ #
+ # CONFIG_MMC is not set
+ 
+ #
+ # InfiniBand support
+ #
+ 
+ #
+ # SN Devices
+ #
+ 
+ #
+ # File systems
+ #
+ CONFIG_EXT2_FS=y
+ # CONFIG_EXT2_FS_XATTR is not set
+ # CONFIG_EXT2_FS_XIP is not set
+ CONFIG_EXT3_FS=m
+ CONFIG_EXT3_FS_XATTR=y
+ # CONFIG_EXT3_FS_POSIX_ACL is not set
+ # CONFIG_EXT3_FS_SECURITY is not set
+ CONFIG_JBD=m
+ CONFIG_JBD_DEBUG=y
+ CONFIG_FS_MBCACHE=y
+ CONFIG_REISERFS_FS=m
+ # CONFIG_REISERFS_CHECK is not set
+ # CONFIG_REISERFS_PROC_INFO is not set
+ # CONFIG_REISERFS_FS_XATTR is not set
+ # CONFIG_JFS_FS is not set
+ # CONFIG_FS_POSIX_ACL is not set
+ # CONFIG_XFS_FS is not set
+ # CONFIG_MINIX_FS is not set
+ # CONFIG_ROMFS_FS is not set
+ CONFIG_INOTIFY=y
+ # CONFIG_QUOTA is not set
+ CONFIG_DNOTIFY=y
+ # CONFIG_AUTOFS_FS is not set
+ # CONFIG_AUTOFS4_FS is not set
+ # CONFIG_FUSE_FS is not set
+ 
+ #
+ # CD-ROM/DVD Filesystems
+ #
+ CONFIG_ISO9660_FS=m
+ CONFIG_JOLIET=y
+ # CONFIG_ZISOFS is not set
+ CONFIG_UDF_FS=m
+ CONFIG_UDF_NLS=y
+ 
+ #
+ # DOS/FAT/NT Filesystems
+ #
+ CONFIG_FAT_FS=m
+ CONFIG_MSDOS_FS=m
+ CONFIG_VFAT_FS=m
+ CONFIG_FAT_DEFAULT_CODEPAGE=437
+ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+ # CONFIG_NTFS_FS is not set
+ 
+ #
+ # Pseudo filesystems
+ #
+ CONFIG_PROC_FS=y
+ CONFIG_PROC_KCORE=y
+ CONFIG_SYSFS=y
+ CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+ # CONFIG_RELAYFS_FS is not set
+ 
+ #
+ # Miscellaneous filesystems
+ #
+ # CONFIG_ADFS_FS is not set
+ # CONFIG_AFFS_FS is not set
+ # CONFIG_HFS_FS is not set
+ # CONFIG_HFSPLUS_FS is not set
+ # CONFIG_BEFS_FS is not set
+ # CONFIG_BFS_FS is not set
+ # CONFIG_EFS_FS is not set
+ # CONFIG_CRAMFS is not set
+ # CONFIG_VXFS_FS is not set
+ # CONFIG_HPFS_FS is not set
+ # CONFIG_QNX4FS_FS is not set
+ # CONFIG_SYSV_FS is not set
+ # CONFIG_UFS_FS is not set
+ 
+ #
+ # Network File Systems
+ #
+ CONFIG_NFS_FS=y
+ CONFIG_NFS_V3=y
+ # CONFIG_NFS_V3_ACL is not set
+ # CONFIG_NFS_V4 is not set
+ # CONFIG_NFS_DIRECTIO is not set
+ # CONFIG_NFSD is not set
+ CONFIG_ROOT_NFS=y
+ CONFIG_LOCKD=y
+ CONFIG_LOCKD_V4=y
+ CONFIG_NFS_COMMON=y
+ CONFIG_SUNRPC=y
+ # CONFIG_RPCSEC_GSS_KRB5 is not set
+ # CONFIG_RPCSEC_GSS_SPKM3 is not set
+ # CONFIG_SMB_FS is not set
+ # CONFIG_CIFS is not set
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+ # CONFIG_AFS_FS is not set
+ # CONFIG_9P_FS is not set
+ 
+ #
+ # Partition Types
+ #
+ # CONFIG_PARTITION_ADVANCED is not set
+ CONFIG_MSDOS_PARTITION=y
+ 
+ #
+ # Native Language Support
+ #
+ CONFIG_NLS=y
+ CONFIG_NLS_DEFAULT="iso8859-1"
+ # CONFIG_NLS_CODEPAGE_437 is not set
+ # CONFIG_NLS_CODEPAGE_737 is not set
+ # CONFIG_NLS_CODEPAGE_775 is not set
+ # CONFIG_NLS_CODEPAGE_850 is not set
+ # CONFIG_NLS_CODEPAGE_852 is not set
+ # CONFIG_NLS_CODEPAGE_855 is not set
+ # CONFIG_NLS_CODEPAGE_857 is not set
+ # CONFIG_NLS_CODEPAGE_860 is not set
+ # CONFIG_NLS_CODEPAGE_861 is not set
+ # CONFIG_NLS_CODEPAGE_862 is not set
+ # CONFIG_NLS_CODEPAGE_863 is not set
+ # CONFIG_NLS_CODEPAGE_864 is not set
+ # CONFIG_NLS_CODEPAGE_865 is not set
+ # CONFIG_NLS_CODEPAGE_866 is not set
+ # CONFIG_NLS_CODEPAGE_869 is not set
+ # CONFIG_NLS_CODEPAGE_936 is not set
+ # CONFIG_NLS_CODEPAGE_950 is not set
+ # CONFIG_NLS_CODEPAGE_932 is not set
+ # CONFIG_NLS_CODEPAGE_949 is not set
+ # CONFIG_NLS_CODEPAGE_874 is not set
+ # CONFIG_NLS_ISO8859_8 is not set
+ # CONFIG_NLS_CODEPAGE_1250 is not set
+ # CONFIG_NLS_CODEPAGE_1251 is not set
+ # CONFIG_NLS_ASCII is not set
+ # CONFIG_NLS_ISO8859_1 is not set
+ # CONFIG_NLS_ISO8859_2 is not set
+ # CONFIG_NLS_ISO8859_3 is not set
+ # CONFIG_NLS_ISO8859_4 is not set
+ # CONFIG_NLS_ISO8859_5 is not set
+ # CONFIG_NLS_ISO8859_6 is not set
+ # CONFIG_NLS_ISO8859_7 is not set
+ # CONFIG_NLS_ISO8859_9 is not set
+ # CONFIG_NLS_ISO8859_13 is not set
+ # CONFIG_NLS_ISO8859_14 is not set
+ # CONFIG_NLS_ISO8859_15 is not set
+ # CONFIG_NLS_KOI8_R is not set
+ # CONFIG_NLS_KOI8_U is not set
+ # CONFIG_NLS_UTF8 is not set
+ 
+ #
+ # Profiling support
+ #
+ # CONFIG_PROFILING is not set
+ 
+ #
+ # Kernel hacking
+ #
+ # CONFIG_PRINTK_TIME is not set
+ CONFIG_DEBUG_KERNEL=y
+ # CONFIG_MAGIC_SYSRQ is not set
+ CONFIG_LOG_BUF_SHIFT=14
+ CONFIG_DETECT_SOFTLOCKUP=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_DEBUG_SLAB is not set
+ CONFIG_DEBUG_PREEMPT=y
+ # CONFIG_DEBUG_SPINLOCK is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+ # CONFIG_DEBUG_BUGVERBOSE is not set
+ # CONFIG_DEBUG_INFO is not set
+ # CONFIG_DEBUG_FS is not set
+ # CONFIG_FRAME_POINTER is not set
+ # CONFIG_DEBUG_STACKOVERFLOW is not set
+ CONFIG_DEBUG_STACK_USAGE=y
+ 
+ #
+ # Security options
+ #
+ # CONFIG_KEYS is not set
+ # CONFIG_SECURITY is not set
+ 
+ #
+ # Cryptographic options
+ #
+ # CONFIG_CRYPTO is not set
+ 
+ #
+ # Hardware crypto devices
+ #
+ 
+ #
+ # Library routines
+ #
+ # CONFIG_CRC_CCITT is not set
+ # CONFIG_CRC16 is not set
+ CONFIG_CRC32=y
+ # CONFIG_LIBCRC32C is not set
diff -crBN orig/arch/m32r/blanca/dot.gdbinit new/arch/m32r/blanca/dot.gdbinit
*** orig/arch/m32r/blanca/dot.gdbinit	1970-01-01 09:00:00.000000000 +0900
--- new/arch/m32r/blanca/dot.gdbinit	2006-12-19 19:24:31.000000000 +0900
***************
*** 0 ****
--- 1,102 ----
+ # .gdbinit file
+ # $Id: dot.gdbinit.mappi,v 1.3 2002/04/02 09:31:16 takata Exp takata $
+ 
+ # setting
+ set width 0d70
+ set radix 0d16
+ use_debug_dma
+ debug_chaos
+ 
+ # Show M32R registers
+ define show_regs
+   printf " R0[0x%08lX]   R1[0x%08lX]   R2[0x%08lX]   R3[0x%08lX]\n",$r0,$r1,$r2,$r3 
+   printf " R4[0x%08lX]   R5[0x%08lX]   R6[0x%08lX]   R7[0x%08lX]\n",$r4,$r5,$r6,$r7 
+   printf " R8[0x%08lX]   R9[0x%08lX]  R10[0x%08lX]  R11[0x%08lX]\n",$r8,$r9,$r10,$r11 
+   printf "R12[0x%08lX]   FP[0x%08lX]   LR[0x%08lX]   SP[0x%08lX]\n",$r12,$fp,$lr,$sp
+   printf "PSW[0x%08lX]  CBR[0x%08lX]  SPI[0x%08lX]  SPU[0x%08lX]\n",$psw,$cbr,$spi,$spu
+   printf "BPC[0x%08lX]   PC[0x%08lX] ACCL[0x%08lX] ACCH[0x%08lX]\n",$bpc,$pc,$accl,$acch
+   set $mests = *(unsigned long *)0xffff000c
+   set $mdeva = *(unsigned long *)0xffff0010
+   printf "MESTS[0x%08lX] MDEVA[0x%08lX]\n",$mests,$mdeva
+ end
+ 
+ 
+ # Load modules
+ define load_modules
+   use_debug_dma
+   load
+ end
+ 
+ # Set kernel parameters
+ define set_kernel_parameters
+   set $param = (void*)0x08001000
+ 
+   ## MOUNT_ROOT_RDONLY
+   #set {long}($param+0x00)=0
+   ## RAMDISK_FLAGS
+   #set {long}($param+0x04)=0
+   ## ORIG_ROOT_DEV
+   #set {long}($param+0x08)=0x00000100
+   ## LOADER_TYPE
+   #set {long}($param+0x0C)=0
+   ## INITRD_START
+   #set {long}($param+0x10)=0x082a0000
+   ## INITRD_SIZE
+   #set {long}($param+0x14)=0d4000000
+ 
+   # M32R_CPUCLK
+   set *(unsigned long *)($param + 0x0018) = 0d25000000
+   # M32R_BUSCLK
+   set *(unsigned long *)($param + 0x001c) = 0d25000000
+   # M32R_TIMER_DIVIDE
+   set *(unsigned long *)($param + 0x0020) = 0d128
+ 
+   set {char[0x200]}($param + 0x100) = "console=tty1 console=ttyS0,115200n8x root=/dev/nfsroot nfsroot=192.168.0.1:/project/m32r-linux/export/root.2.6_05 nfsaddrs=192.168.0.105:192.168.0.1:192.168.0.1:255.255.255.0:blanca \0"
+ 
+ end
+ 
+ # Boot
+ define boot
+   set_kernel_parameters
+   set $pc=0x08002000
+   del b
+   si
+   c
+ #  show_regs
+ end
+ 
+ define bus_init
+   set *(unsigned long *)0x00ef5000=0x01111200
+   set *(unsigned long *)0x00ef5004=0x01119200
+   set *(unsigned long *)0x00ef5008=0x01119200
+   set *(unsigned long *)0x00ef500C=0x01119200
+   set *(unsigned long *)0x00ef5010=0x01119200
+   set *(unsigned long *)0x00ef5014=0x01119200
+   set *(unsigned long *)0x00ef5018=0x01119200
+   set *(unsigned long *)0x00ef501C=0x01119200
+ 
+   # Blanca Com Reset
+   set *(unsigned long *)0x05800020=0x80000004
+ 
+   # Blanca LANC Int enable
+   set *(unsigned long *)0x04000014=0x00040000
+ 
+   #RGBC
+   set *(unsigned long *)0x06000120=0x80000001
+   set *(unsigned long *)0x0600012c=0x3e00
+   end
+ 
+ # Restart
+ define restart
+   sdireset
+   bus_init
+   load_modules
+   boot
+ end
+ 
+ sdireset
+ file vmlinux
+ target m32rsdi 
+ 
+ restart
+ 
diff -crBN orig/arch/m32r/kernel/Makefile new/arch/m32r/kernel/Makefile
*** orig/arch/m32r/kernel/Makefile	2005-08-29 10:23:46.000000000 +0900
--- new/arch/m32r/kernel/Makefile	2006-12-18 14:48:25.000000000 +0900
***************
*** 14,19 ****
--- 14,20 ----
  obj-$(CONFIG_PLAT_USRV)		+= setup_usrv.o io_usrv.o
  obj-$(CONFIG_PLAT_M32700UT)	+= setup_m32700ut.o io_m32700ut.o
  obj-$(CONFIG_PLAT_OPSPUT)	+= setup_opsput.o io_opsput.o
+ obj-$(CONFIG_PLAT_BLANCA)	+= setup_blanca.o io_blanca.o
  obj-$(CONFIG_MODULES)		+= module.o
  obj-$(CONFIG_PLAT_OAKS32R)	+= setup_oaks32r.o io_oaks32r.o
  
diff -crBN orig/arch/m32r/kernel/io_blanca.c new/arch/m32r/kernel/io_blanca.c
*** orig/arch/m32r/kernel/io_blanca.c	1970-01-01 09:00:00.000000000 +0900
--- new/arch/m32r/kernel/io_blanca.c	2006-12-18 17:27:39.000000000 +0900
***************
*** 0 ****
--- 1,237 ----
+ /*
+  *  linux/arch/m32r/kernel/io_blanca.c
+  *
+  *  Typical I/O routines for CQpub BLANCA board.
+  *
+  *  Copyright (c) 2001-2006  Hiroyuki Kondo, Hirokazu Takata,
+  *                           Hitoshi Yamamoto, Mamoru Sakugawa
+  */
+ 
+ #include <linux/config.h>
+ #include <asm/m32r.h>
+ #include <asm/page.h>
+ #include <asm/io.h>
+ #include <asm/byteorder.h>
+ 
+ #define PORT2ADDR(port)      _port2addr(port)
+ #define PORT2ADDR_NE(port)   _port2addr_ne(port)
+ #define PORT2ADDR_USB(port)  _port2addr_usb(port)
+ 
+ static inline void *_port2addr(unsigned long port)
+ {
+ 	return (void *)(port + NONCACHE_OFFSET);
+ }
+ 
+ #define LAN_IOSTART	0x300
+ #define LAN_IOEND	0x320
+ 
+ #if defined(CONFIG_IDE) 
+ static inline void *__port2addr_ata(unsigned long port)
+ {
+ 	static int	dummy_reg;
+ 
+ 	switch (port) {
+ 	case 0x1f0:	return (void *)0xad0000c0; /* Data           */
+ 	case 0x1f1:	return (void *)0xad0000c4; /* Error/Features */
+ 	case 0x1f2:	return (void *)0xad0000c8; /* SectorCount    */
+ 	case 0x1f3:	return (void *)0xad0000cc; /* SectorNumber   */
+ 	case 0x1f4:	return (void *)0xad0000d0; /* CylinderLow    */
+ 	case 0x1f5:	return (void *)0xad0000d4; /* CylinderHigh   */
+ 	case 0x1f6:	return (void *)0xad0000d8; /* Device/Head    */
+ 	case 0x1f7:	return (void *)0xad0000dc; /* Status/Command */
+ 	case 0x3f6:	return (void *)0xad0000f8; /* Alt Status     */
+ 	default: 	return (void *)&dummy_reg;
+ 	}
+ }
+ #endif
+ 
+ static inline void delay(void)
+ {
+ 	__asm__ __volatile__ ("push r0; \n\t pop r0;" : : :"memory");
+ }
+ 
+ unsigned char _inb(unsigned long port)
+ {
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		return *(volatile unsigned char *)__port2addr_ata(port);
+ 	}
+ 	else 
+ #endif
+ 	return *(volatile unsigned char *)PORT2ADDR(port);
+ }
+ 
+ unsigned short _inw(unsigned long port)
+ {
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		return *(volatile unsigned short *)__port2addr_ata(port);
+ 	} else 
+ #endif
+ 		return *(volatile unsigned short *)PORT2ADDR(port);
+ }
+ 
+ unsigned long _inl(unsigned long port)
+ {
+ 	return *(volatile unsigned long *)PORT2ADDR(port);
+ }
+ 
+ unsigned char _inb_p(unsigned long port)
+ {
+ 	unsigned char v = _inb(port);
+ 	delay();
+ 	return (v);
+ }
+ 
+ unsigned short _inw_p(unsigned long port)
+ {
+ 	unsigned short v = _inw(port);
+ 	delay();
+ 	return (v);
+ }
+ 
+ unsigned long _inl_p(unsigned long port)
+ {
+ 	unsigned long v = _inl(port);
+ 	delay();
+ 	return (v);
+ }
+ 
+ void _outb(unsigned char b, unsigned long port)
+ {
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		*(volatile unsigned char *)__port2addr_ata(port) = b;
+ 	} else
+ #endif
+ 		*(volatile unsigned char *)PORT2ADDR(port) = b;
+ }
+ 
+ void _outw(unsigned short w, unsigned long port)
+ {
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		*(volatile unsigned short *)__port2addr_ata(port) = w;
+ 	} else
+ #endif
+ 		*(volatile unsigned short *)PORT2ADDR(port) = w;
+ }
+ 
+ void _outl(unsigned long l, unsigned long port)
+ {
+ 	*(volatile unsigned long *)PORT2ADDR(port) = l;
+ }
+ 
+ void _outb_p(unsigned char b, unsigned long port)
+ {
+ 	_outb(b, port);
+ 	delay();
+ }
+ 
+ void _outw_p(unsigned short w, unsigned long port)
+ {
+ 	_outw(w, port);
+ 	delay();
+ }
+ 
+ void _outl_p(unsigned long l, unsigned long port)
+ {
+ 	_outl(l, port);
+ 	delay();
+ }
+ 
+ void _insb(unsigned int port, void * addr, unsigned long count)
+ {
+ #if defined(CONFIG_IDE) 
+ 	else if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		unsigned char *buf = addr;
+ 		unsigned char *portp = __port2addr_ata(port);
+ 		while (count--)
+ 			*buf++ = *(volatile unsigned char *)portp;
+ 	} else 
+ #endif
+ 	{
+ 		unsigned char *buf = addr;
+ 		unsigned char *portp = PORT2ADDR(port);
+ 		while (count--)
+ 			*buf++ = *(volatile unsigned char *)portp;
+ 	}
+ }
+ 
+ void _insw(unsigned int port, void * addr, unsigned long count)
+ {
+ 	unsigned short *buf = addr;
+ 	unsigned short *portp;
+ 
+ #if defined(CONFIG_IDE)
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		portp = __port2addr_ata(port);
+ 		while (count--)
+ 			*buf++ = *(volatile unsigned short *)portp;
+ #endif
+ 	{
+ 		portp = PORT2ADDR(port);
+ 		while (count--)
+ 			*buf++ = *(volatile unsigned short *)portp;
+ 	}
+ }
+ 
+ void _insl(unsigned int port, void * addr, unsigned long count)
+ {
+ 	unsigned long *buf = addr;
+ 	unsigned long *portp;
+ 
+ 	portp = PORT2ADDR(port);
+ 	while (count--)
+ 		*buf++ = *(volatile unsigned long *)portp;
+ }
+ 
+ void _outsb(unsigned int port, const void * addr, unsigned long count)
+ {
+ 	const unsigned char *buf = addr;
+ 	unsigned char *portp;
+ 
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		portp = __port2addr_ata(port);
+ 		while (count--)
+ 			*(volatile unsigned char *)portp = *buf++;
+ 	} else 
+ #endif
+ 	{
+ 		portp = PORT2ADDR(port);
+ 		while (count--)
+ 			*(volatile unsigned char *)portp = *buf++;
+ 	}
+ }
+ 
+ void _outsw(unsigned int port, const void * addr, unsigned long count)
+ {
+ 	const unsigned short *buf = addr;
+ 	unsigned short *portp;
+ 
+ #if defined(CONFIG_IDE) 
+ 	if ((port >= 0x1f0 && port <=0x1f7) || port == 0x3f6) {
+ 		portp = __port2addr_ata(port);
+ 		while (count--)
+ 			*(volatile unsigned short *)portp = *buf++;
+ 	} else
+ #endif
+ 	{
+ 		portp = PORT2ADDR(port);
+ 		while (count--)
+ 			*(volatile unsigned short *)portp = *buf++;
+ 	}
+ }
+ 
+ void _outsl(unsigned int port, const void * addr, unsigned long count)
+ {
+ 	const unsigned long *buf = addr;
+ 	unsigned char *portp;
+ 
+ 	portp = PORT2ADDR(port);
+ 	while (count--)
+ 		*(volatile unsigned long *)portp = *buf++;
+ }
+ 
+ 
diff -crBN orig/arch/m32r/kernel/setup.c new/arch/m32r/kernel/setup.c
*** orig/arch/m32r/kernel/setup.c	2005-08-29 10:23:46.000000000 +0900
--- new/arch/m32r/kernel/setup.c	2006-12-18 17:55:58.000000000 +0900
***************
*** 306,313 ****
  	seq_printf(m, "processor\t: %ld\n", cpu);
  
  #ifdef CONFIG_CHIP_VDEC2
! 	seq_printf(m, "cpu family\t: VDEC2\n"
! 		"cache size\t: Unknown\n");
  #elif  CONFIG_CHIP_M32700
  	seq_printf(m,"cpu family\t: M32700\n"
  		"cache size\t: I-8KB/D-8KB\n");
--- 306,313 ----
  	seq_printf(m, "processor\t: %ld\n", cpu);
  
  #ifdef CONFIG_CHIP_VDEC2
! 	seq_printf(m, "cpu family\t: M32R-VDEC2\n"
! 		"cache size\t: I-8KB/D-8KB\n");
  #elif  CONFIG_CHIP_M32700
  	seq_printf(m,"cpu family\t: M32700\n"
  		"cache size\t: I-8KB/D-8KB\n");
***************
*** 340,345 ****
--- 340,347 ----
  	seq_printf(m, "Machine\t\t: uServer\n");
  #elif  CONFIG_PLAT_OAKS32R
  	seq_printf(m, "Machine\t\t: OAKS32R\n");
+ #elif  CONFIG_PLAT_BLANCA
+ 	seq_printf(m, "Machine\t\t: BLANCA\n");
  #else
  	seq_printf(m, "Machine\t\t: Unknown\n");
  #endif
diff -crBN orig/arch/m32r/kernel/setup_blanca.c new/arch/m32r/kernel/setup_blanca.c
*** orig/arch/m32r/kernel/setup_blanca.c	1970-01-01 09:00:00.000000000 +0900
--- new/arch/m32r/kernel/setup_blanca.c	2006-12-19 17:35:27.000000000 +0900
***************
*** 0 ****
--- 1,187 ----
+ /*
+  *  linux/arch/m32r/kernel/setup_blanca.c
+  *
+  *  Setup routines for CQpub Interface BLANCA Board
+  *
+  *  Copyright (c) 2001-2006  Hiroyuki Kondo, Hirokazu Takata,
+  *                           Hitoshi Yamamoto, Mamoru Sakugawa
+  */
+ 
+ #include <linux/config.h>
+ #include <linux/irq.h>
+ #include <linux/kernel.h>
+ #include <linux/init.h>
+ #include <linux/device.h>
+ 
+ #include <asm/system.h>
+ #include <asm/m32r.h>
+ #include <asm/io.h>
+ 
+ #define irq2port(x) (M32R_ICU_CR1_PORTL + ((x - 1) * sizeof(unsigned long)))
+ 
+ #ifndef CONFIG_SMP
+ typedef struct {
+ 	unsigned long icucr;  /* ICU Control Register */
+ } icu_data_t;
+ #endif /* CONFIG_SMP */
+ 
+ icu_data_t icu_data[NR_IRQS];
+ 
+ static void disable_blanca_irq(unsigned int irq)
+ {
+ 	unsigned long port, data;
+ 
+ 	if ((irq == 0) ||(irq >= NR_IRQS))  {
+ 		printk("bad irq 0x%08x\n", irq);
+ 		return;
+ 	}
+ 	port = irq2port(irq);
+ 	data = icu_data[irq].icucr|M32R_ICUCR_ILEVEL7;
+ 	outl(data, port);
+ }
+ 
+ static void enable_blanca_irq(unsigned int irq)
+ {
+ 	unsigned long port, data;
+ 
+ 	if ((irq == 0) ||(irq >= NR_IRQS))  {
+ 		printk("bad irq 0x%08x\n", irq);
+ 		return;
+ 	}
+ 	port = irq2port(irq);
+ 	data = icu_data[irq].icucr|M32R_ICUCR_IEN|M32R_ICUCR_ILEVEL6;
+ 	outl(data, port);
+ }
+ 
+ static void mask_and_ack_blanca(unsigned int irq)
+ {
+ 	disable_blanca_irq(irq);
+ }
+ 
+ static void end_blanca_irq(unsigned int irq)
+ {
+ 	enable_blanca_irq(irq);
+ }
+ 
+ static unsigned int startup_blanca_irq(unsigned int irq)
+ {
+ 	enable_blanca_irq(irq);
+ 	return (0);
+ }
+ 
+ static void shutdown_blanca_irq(unsigned int irq)
+ {
+ 	unsigned long port;
+ 
+ 	port = irq2port(irq);
+ 	outl(M32R_ICUCR_ILEVEL7, port);
+ }
+ 
+ static struct hw_interrupt_type blanca_irq_type =
+ {
+ 	.typename = "BLANCA-IRQ",
+ 	.startup = startup_blanca_irq,
+ 	.shutdown = shutdown_blanca_irq,
+ 	.enable = enable_blanca_irq,
+ 	.disable = disable_blanca_irq,
+ 	.ack = mask_and_ack_blanca,
+ 	.end = end_blanca_irq
+ };
+ 
+ void __init init_IRQ(void)
+ {
+ #if defined(CONFIG_IFNIC)
+ 	/* INT2 : LAN controller */
+ 	irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_INT0].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_INT0].action = 0;
+ 	irq_desc[M32R_IRQ_INT0].depth = 1;
+ 	icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD11;
+ 	disable_blanca_irq(M32R_IRQ_INT0);
+ #endif  /* CONFIG_IFNIC */
+ 
+ 	/* MFT2 : system timer */
+ 	irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_MFT2].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_MFT2].action = 0;
+ 	irq_desc[M32R_IRQ_MFT2].depth = 1;
+ 	icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
+ 	disable_blanca_irq(M32R_IRQ_MFT2);
+ 
+ #ifdef CONFIG_SERIAL_M32R_SIO
+ 	/* SIO0_R : uart receive data */
+ 	irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_SIO0_R].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_SIO0_R].action = 0;
+ 	irq_desc[M32R_IRQ_SIO0_R].depth = 1;
+ 	icu_data[M32R_IRQ_SIO0_R].icucr = 0;
+ 	disable_blanca_irq(M32R_IRQ_SIO0_R);
+ 
+ 	/* SIO0_S : uart send data */
+ 	irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_SIO0_S].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_SIO0_S].action = 0;
+ 	irq_desc[M32R_IRQ_SIO0_S].depth = 1;
+ 	icu_data[M32R_IRQ_SIO0_S].icucr = 0;
+ 	disable_blanca_irq(M32R_IRQ_SIO0_S);
+ 	/* SIO1_R : uart receive data */
+ 	irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_SIO1_R].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_SIO1_R].action = 0;
+ 	irq_desc[M32R_IRQ_SIO1_R].depth = 1;
+ 	icu_data[M32R_IRQ_SIO1_R].icucr = 0;
+ 	disable_blanca_irq(M32R_IRQ_SIO1_R);
+ 
+ 	/* SIO1_S : uart send data */
+ 	irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
+ 	irq_desc[M32R_IRQ_SIO1_S].handler = &blanca_irq_type;
+ 	irq_desc[M32R_IRQ_SIO1_S].action = 0;
+ 	irq_desc[M32R_IRQ_SIO1_S].depth = 1;
+ 	icu_data[M32R_IRQ_SIO1_S].icucr = 0;
+ 	disable_blanca_irq(M32R_IRQ_SIO1_S);
+ #endif  /* CONFIG_M32R_USE_DBG_CONSOLE */
+ 
+ }
+ 
+ #if defined(CONFIG_FB_IFRGBC)
+ #include <asm/ifrgbc.h>
+ 
+ static struct ifrgbcfb_pdata ifrgbcfb_data = {
+   .initregs = ifrgbcfb_initregs,
+   .initregssize = ARRAY_SIZE(ifrgbcfb_initregs),
+   .platform_init_video = NULL,
+ };
+ 
+ static struct resource ifrgbcfb_resources[] = {
+ 	[0] = {
+ 		.start  = 0x08f00000UL,
+ 		.end    = 0x08ffffffUL,
+ 		.flags  = IORESOURCE_MEM,
+ 		},
+ 	[1] = {
+ 		.start  = 0x0d000000UL,
+ 		.end    = 0x0d0000FFUL,
+ 		.flags  = IORESOURCE_MEM,
+ 	}
+ };
+ 
+ static struct platform_device ifrgbcfb_device = {
+   .name	        = "ifrgbcfb",
+   .id		= 0,
+   .dev          = {
+     .platform_data = &ifrgbcfb_data,
+   },
+   .num_resources  = ARRAY_SIZE(ifrgbcfb_resources),
+   .resource       = ifrgbcfb_resources,
+ };
+ #endif
+ 
+ static int __init platform_init(void)
+ {
+ #if defined(CONFIG_FB_IFRGBC)
+ 	platform_device_register(&ifrgbcfb_device);
+ #endif
+ 	return 0;
+ }
+ 
+ arch_initcall(platform_init);
diff -crBN orig/drivers/net/Kconfig new/drivers/net/Kconfig
*** orig/drivers/net/Kconfig	2005-10-31 16:40:59.000000000 +0900
--- new/drivers/net/Kconfig	2006-12-18 15:51:47.000000000 +0900
***************
*** 818,823 ****
--- 818,831 ----
  	  module, say M here and read <file:Documentation/modules.txt> as well
  	  as <file:Documentation/networking/net-modules.txt>.
  
+ config IFNIC
+          tristate "CQ pub Interface NIC support" 
+ 	 select CRC32
+ 	 select MII
+ 	 depends on NET_ETHERNET && M32R
+ 	 help
+ 	   This is a driver for CQ pub Interface 10Base-T Ether-MAC controller.
+ 
  config SMC9194
  	tristate "SMC 9194 support"
  	depends on NET_VENDOR_SMC && (ISA || MAC && BROKEN)
diff -crBN orig/drivers/net/Makefile new/drivers/net/Makefile
*** orig/drivers/net/Makefile	2005-10-31 16:40:59.000000000 +0900
--- new/drivers/net/Makefile	2006-12-18 15:51:50.000000000 +0900
***************
*** 185,190 ****
--- 185,191 ----
  obj-$(CONFIG_IBMVETH) += ibmveth.o
  obj-$(CONFIG_S2IO) += s2io.o
  obj-$(CONFIG_SMC91X) += smc91x.o
+ obj-$(CONFIG_IFNIC) += ifnic.o
  obj-$(CONFIG_DM9000) += dm9000.o
  obj-$(CONFIG_FEC_8XX) += fec_8xx/
  
diff -crBN orig/drivers/net/ifnic.c new/drivers/net/ifnic.c
*** orig/drivers/net/ifnic.c	1970-01-01 09:00:00.000000000 +0900
--- new/drivers/net/ifnic.c	2006-12-18 17:33:49.000000000 +0900
***************
*** 0 ****
--- 1,323 ----
+ /*
+  * linux/drivers/net/ifnic.c - CQpub Interface LANC Driver
+  *
+  *  Copyright (C) 2005 Shinichi Yamagiwa (for kernel-2.4)
+  *  Copyright (C) 2006 Mamoru Sakugawa
+  *                    
+  * 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/config.h>
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
+ #include <linux/version.h>
+ #include <linux/signal.h>
+ #include <linux/device.h>
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+ 
+ #include <asm/io.h>
+ #include "ifnic.h"
+ 
+ #define CARDNAME	"ifnic"
+ 
+ /* local structure */
+ struct ifnic_local {
+ 	int version;
+ 	int irq;
+ 	int tx_active;
+ 	int curr_txbuf;
+ 	int curr_rxbuf;
+ 	struct net_device_stats stats;
+ };
+ 
+ void ifnic_get_mac_addr(unsigned char *addr)
+ {
+ 	int i;
+ 	static int offset = IFNIC_MAC_ADDR_OFFSET;
+ 
+ 	for (i = 0; i < 6; i++) {
+ 		outl( (ROMCTL_ACCBUSY | ROMCTL_READ | (offset++ << 16)), IFNIC_ROMCTL);
+ 		*addr++ = inl(IFNIC_ROMCTL);
+ 	}
+ }
+ 
+ static int ifnic_recv (struct net_device *dev, int num) 
+ {
+ 	struct ifnic_local *lp = netdev_priv(dev);
+ 	struct sk_buff *skb;
+ 	int i;
+ 
+ 	skb = dev_alloc_skb(RXBUF_MAX);
+ 	if (skb == NULL) {
+ 		printk(KERN_NOTICE "%s: Low memory, packet dropped.\n",dev->name);
+ 		return -1;
+ 	}
+ 	skb->dev = dev;
+ 
+ 	/* Align IP header to 32bits */
+ 	skb_reserve(skb,2);
+ 	skb->len = inl(IFNIC_RXCNTL) & 0x7ff;
+ 
+ 	for (i = 0; i < skb->len; i++) {
+ 		skb->data[i] = inb(IFNIC_RXBUF + i);
+ 	}
+ 	skb_put(skb, skb->len);
+ 
+ 	lp->stats.rx_packets++;
+ 	lp->stats.rx_bytes += skb->len;
+ 
+ 	skb->protocol = eth_type_trans(skb, dev);
+ 	netif_rx(skb);
+ }  
+ 
+ static irqreturn_t ifnic_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+ {
+ 	struct net_device *dev = dev_id;
+ 	struct ifnic_local *lp = netdev_priv(dev);
+         unsigned int intstat, txcntl, rxcntl;
+ 	unsigned int tmp;
+ 
+         intstat = inl(IFNIC_INTSTAT);
+ 	txcntl = inl(IFNIC_TXCNTL);
+         rxcntl = inl(IFNIC_RXCNTL);
+ 
+ 	/* Tx error */
+ 	if ((intstat & TXERR) && (txcntl & TXERR_END)) {
+ 		printk("Tx Error \n");
+ 		/* re-send */
+ 		outl(TXERR_END, IFNIC_TXCNTL);
+ 		outl(TXERR, IFNIC_INTSTAT);
+ 	}
+ 
+ 	/* TX complete */
+ 	if (intstat & TXCP) {
+ 		outl(TXCP, IFNIC_INTSTAT);
+ 		if ((txcntl & TXBUSY) == 0) {
+ 			netif_wake_queue(dev);
+ 			lp->tx_active = 1;
+ 		}
+ 	}
+ 
+ 	/* Rx Error */
+ 	if (intstat & RXERR) {
+ 		printk("IFNIC Rx Error %08X \n", rxcntl);
+ 		if(rxcntl & (RXOVF | RXPHYERR | FERR2 | FERR1 | FERR0 | CRCERR)) {
+ 			outl(RXERR, IFNIC_INTSTAT);
+ 			outl(RXDEN, IFNIC_RXCNTL);
+ 
+ 			tmp = inl(IFNIC_RXCFG);
+ 			outl((tmp | RXRST), IFNIC_RXCFG);
+ 			tmp = inl(IFNIC_RXCFG);
+ 			outl((tmp & ~RXRST), IFNIC_RXCFG);
+ 		}
+ 	}
+ 
+ 	/* Rx complete */
+ 	if (intstat & RXCP) {
+ 		ifnic_recv(dev,0);
+ 		outl(RXCP, IFNIC_INTSTAT);
+ 		outl(RXDEN, IFNIC_RXCNTL);
+ 	}	  
+ 
+ 	return IRQ_HANDLED;
+ }	
+ 
+ 
+ 
+ /* 
+  * Open
+  */
+ static int ifnic_open(struct net_device *dev)
+ {
+ 	struct ifnic_local *lp = netdev_priv(dev);
+ 
+ 	outl((RXERR | RXCP | TXERR | TXCP) , IFNIC_INTSTAT);
+ 	outl((RXERR | RXCP | TXERR | TXCP) , IFNIC_INTMASK);
+ 
+ 	outl( TXRST , IFNIC_TXCFG);
+ 	outl(~TXRST , IFNIC_TXCFG);
+ 	outl( RXRST , IFNIC_RXCFG);
+ 	outl(~RXRST , IFNIC_RXCFG);
+ 
+ 	lp->tx_active = 1;
+ 	lp->curr_rxbuf = 0;
+ 
+ 	netif_start_queue(dev);
+ 
+ 	return 0;
+ }
+ 
+ static int ifnic_stop(struct net_device *dev)
+ {
+ 	unsigned long tmp;
+ 	outl(0, IFNIC_INTMASK);
+ 
+ 	tmp = inl(IFNIC_RXCFG);
+ 	outl((tmp | RXRST), IFNIC_RXCFG);
+ 
+ 	tmp = inl(IFNIC_TXCFG);
+ 	outl((tmp | TXRST), IFNIC_TXCFG);
+ 
+ 	return 0;
+ }
+ 
+ static int ifnic_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ {
+ 	struct ifnic_local *lp = netdev_priv(dev);
+ 	unsigned long txcntl;
+ 	int i;
+ 
+ 	if (skb->len < ETH_ZLEN) {
+ 		skb = skb_padto(skb, ETH_ZLEN);
+ 		skb->len = ETH_ZLEN;
+ 	}
+ 
+ 	/* Write to send buffer */
+ 	for (i = 0; i < skb->len; i++)
+ 		outb(skb->data[i], IFNIC_TXBUF+i);
+ 	
+ 	/* Tx enable */
+ 	outl((TXBUSY | (skb->len & 0x7ff)), IFNIC_TXCNTL);
+ 
+ 	lp->stats.tx_packets ++;
+ 	lp->stats.tx_bytes += skb->len;
+ 	dev_kfree_skb(skb);
+ 
+ 	txcntl = inl(IFNIC_TXCNTL);
+ 	return 0;
+ }
+ 
+ static struct net_device_stats *ifnic_get_stats(struct net_device *dev)
+ {
+ 	struct ifnic_local *lp = netdev_priv(dev);
+ 	return &lp->stats;
+ }
+ 
+ static void ifnic_tx_timeout(struct net_device *dev)
+ {
+ 	struct ifnic_local *lp = netdev_priv(dev);
+ 
+ 	/* Tx RESET */
+ 	outl(TXRST , IFNIC_TXCFG);
+ 	outl(0, IFNIC_TXCFG);
+ 
+ 	netif_wake_queue(dev);
+ 	lp->tx_active = 1;
+ }
+ 
+ /*
+  * Probe for the device
+  */
+ static int ifnic_drv_probe(struct device *dev)
+ {
+ 	struct net_device *ndev;
+ 	unsigned long dev_id;
+ 	unsigned short rev1,rev2;
+ 	int ret;
+ 	int i;
+ 
+ 	/* Read Device-ID register */
+ 	dev_id = inl(IFNIC_DEVID);
+ 	if (dev_id != 0x4c414e43) {  
+ 	   return -ENODEV;
+ 	}
+ 	rev1 = inw(IFNIC_REV1);
+ 	rev2 = inw(IFNIC_REV2);
+ 
+ 	printk(KERN_INFO "IFNIC Rev=%d.%d \n",rev1,rev2);
+ 
+ 	ndev = alloc_etherdev(sizeof(struct ifnic_local));
+ 	if (!ndev) {
+ 		printk(KERN_ERR "%s: could not allocate device.\n",CARDNAME);
+ 	 	return -ENOMEM;
+ 	}
+ 	SET_MODULE_OWNER(ndev);
+ 	SET_NETDEV_DEV(ndev,dev);
+ 
+ 	ndev->open = ifnic_open;
+ 	ndev->stop = ifnic_stop;
+ 	ndev->hard_start_xmit = ifnic_start_xmit;
+ 	ndev->get_stats = ifnic_get_stats;
+ 	ndev->watchdog_timeo = TX_TIMEOUT;	
+ 	ndev->tx_timeout = ifnic_tx_timeout;
+ 
+ 	ifnic_get_mac_addr(ndev->dev_addr); 
+ 	printk("MAC ADDR=");
+ 	for (i = 0; i < 5; i++) {
+ 		printk("%02X:",ndev->dev_addr[i]);
+ 	}	
+ 	printk("%02x\n",ndev->dev_addr[i]);
+ 
+ 	ret = register_netdev(ndev);
+ 	if (ret) {
+ 		printk(KERN_ERR "could not register netdev\n");
+ 		free_netdev(ndev);
+ 		return ret;
+ 	}
+ 
+ 	ndev->irq = 1;
+ 	ret = request_irq(ndev->irq, &ifnic_interrupt, 0, ndev->name, ndev);
+ 	if (ret) {
+ 		printk(KERN_ERR "%s: could not register IRQ\n",CARDNAME);
+ 		return ret;
+         }
+ 	return 0;
+ }
+ 
+ 
+ /*
+  * Remove a device
+  */
+ static int ifnic_drv_remove(struct device *dev)
+ {
+ 	struct net_device *ndev = dev_get_drvdata(dev);
+ 
+ 	dev_set_drvdata(dev, NULL);
+ 	unregister_netdev(ndev);
+ 	free_irq(ndev->irq, ndev);
+ 	free_netdev(ndev);
+ 
+ 	return 0;
+ }
+ 
+ static struct device_driver ifnic_driver = {
+ 	.name	= CARDNAME,
+ 	.bus	= &platform_bus_type,
+ 	.probe	= ifnic_drv_probe,
+ 	.remove	= ifnic_drv_remove,	
+ };
+ 
+ static struct platform_device ifnic_device = {
+ 	.name	= CARDNAME,
+ 	.id	= 0,
+ };
+ 
+ static int __init ifnic_init(void)
+ {
+ 	int ret;
+ 
+ 	ret = driver_register(&ifnic_driver);
+ 	if (ret < 0) {
+ 	   return ret;
+ 	}
+ 	return platform_device_register(&ifnic_device);
+ }
+ 
+ static void __exit ifnic_exit(void)
+ {
+ 	platform_device_unregister(&ifnic_device);
+ 	driver_unregister(&ifnic_driver);
+ }
+ 
+ module_init(ifnic_init);
+ module_exit(ifnic_exit);
+ 
+ MODULE_DESCRIPTION("CQ Pub Interface LAN Controller Driver");
+ MODULE_AUTHOR("Mamoru Sakugawa");
+ MODULE_LICENSE("GPL");
+ 
diff -crBN orig/drivers/net/ifnic.h new/drivers/net/ifnic.h
*** orig/drivers/net/ifnic.h	1970-01-01 09:00:00.000000000 +0900
--- new/drivers/net/ifnic.h	2006-12-18 15:51:57.000000000 +0900
***************
*** 0 ****
--- 1,46 ----
+ /*
+  * CQpub Interface LANC 
+  * Copyright(C) 2006 Mamoru Sakugawa
+  *
+  */
+ 
+ #ifdef CONFIG_M32R
+ #define IFNIC_BASE		0x0c800000
+ #endif
+ 
+ #define IFNIC_DEVID		(IFNIC_BASE + 0x00)
+ #define IFNIC_REV1		(IFNIC_BASE + 0x04)
+ #define IFNIC_REV2		(IFNIC_BASE + 0x06)
+ #define IFNIC_ROMCTL		(IFNIC_BASE + 0x2c)
+ #define ROMCTL_ACCBUSY  	(1<<31)
+ #define ROMCTL_READ     	(1<<30)
+ #define IFNIC_MAC_ADDR_OFFSET	0x10
+ #define IFNIC_INTSTAT	      	(IFNIC_BASE + 0x10)
+ #define IFNIC_INTMASK	      	(IFNIC_BASE + 0x14)
+ #define NETDBG           	(1<<31)
+ #define TXERR            	(1<<17)
+ #define TXCP             	(1<<16)
+ #define RXERR            	(1<<1)
+ #define RXCP             	(1<<0)
+ #define IFNIC_RXCFG   		(IFNIC_BASE + 0x40)
+ #define RXRST            	(1<<31)
+ #define IFNIC_RXCNTL  		(IFNIC_BASE + 0x44)
+ #define RXDEN            	(1<<31)
+ #define RXOVF            	(1<<30)
+ #define RXPHYERR         	(1<<28)
+ #define FERR2            	(1<<27)
+ #define FERR1            	(1<<26)
+ #define FERR0            	(1<<25)
+ #define CRCERR           	(1<<24)
+ #define IFNIC_TXCFG   		(IFNIC_BASE + 0x60)
+ #define TXRST            	(1<<31)
+ #define IFNIC_TXCNTL  		(IFNIC_BASE + 0x64)
+ #define TXBUSY           	(1<<31)
+ #define TXERR_END        	(1<<30)
+ #define IFNIC_TXBUF   		(IFNIC_BASE + 0x4000)
+ #define IFNIC_RXBUF   		(IFNIC_BASE + 0x8000)
+ 
+ #define TX_TIMEOUT    		10*HZ
+ #define RXBUF_MAX  		0x2000
+  
+ 
diff -crBN orig/drivers/video/Kconfig new/drivers/video/Kconfig
*** orig/drivers/video/Kconfig	2005-10-31 16:41:29.000000000 +0900
--- new/drivers/video/Kconfig	2006-12-19 16:08:23.000000000 +0900
***************
*** 1519,1524 ****
--- 1519,1534 ----
  	  working with S1D13806). Product specs at
  	  <http://www.erd.epson.com/vdc/html/legacy_13xxx.htm>
  
+ config FB_IFRGBC
+        tristate "CQpub Interface RGB Controller framebuffer support"
+        depends on FB
+ 	select FB_CFB_FILLRECT
+ 	select FB_CFB_COPYAREA
+ 	select FB_CFB_IMAGEBLIT
+ 	select FB_SOFT_CURSOR
+        help
+ 	 Support for CQpub Interface RGB Controller
+ 
  config FB_S3C2410
  	tristate "S3C2410 LCD framebuffer support"
  	depends on FB && ARCH_S3C2410
diff -crBN orig/drivers/video/Makefile new/drivers/video/Makefile
*** orig/drivers/video/Makefile	2005-10-31 16:41:29.000000000 +0900
--- new/drivers/video/Makefile	2006-12-19 15:09:38.000000000 +0900
***************
*** 95,100 ****
--- 95,101 ----
  obj-$(CONFIG_FB_S1D13XXX)	  += s1d13xxxfb.o
  obj-$(CONFIG_FB_IMX)              += imxfb.o
  obj-$(CONFIG_FB_S3C2410)	  += s3c2410fb.o
+ obj-$(CONFIG_FB_IFRGBC)		  += ifrgbc.o
  
  # Platform or fallback drivers go here
  obj-$(CONFIG_FB_VESA)             += vesafb.o
diff -crBN orig/drivers/video/ifrgbc.c new/drivers/video/ifrgbc.c
*** orig/drivers/video/ifrgbc.c	1970-01-01 09:00:00.000000000 +0900
--- new/drivers/video/ifrgbc.c	2006-12-19 17:33:51.000000000 +0900
***************
*** 0 ****
--- 1,295 ----
+ /* drivers/video/ifrgbc.c
+  *
+  * (c) 2006 Mamoru SAKUGAWA <sakugawa@linux-m32r.org>
+  *
+  * Driver for Interface BLANCA RGB Controller 
+  *   (Support only 16bpp)
+  */
+ 
+ #include <linux/config.h>
+ #include <linux/module.h>
+ #include <linux/device.h>
+ #include <linux/delay.h>
+ 
+ #include <linux/types.h>
+ #include <linux/errno.h>
+ #include <linux/mm.h>
+ #include <linux/mman.h>
+ #include <linux/fb.h>
+ 
+ #include <asm/io.h>
+ 
+ #ifdef CONFIG_M32R
+ #include <asm/ifrgbc.h>
+ #endif
+ 
+ #define PFX "ifrgbc: "
+ 
+ 
+ /*
+  * Here we define the default struct fb_fix_screeninfo
+  */
+ static struct fb_fix_screeninfo __devinitdata ifrgbcfb_fix = {
+ 	.id		= "IFRGBC",
+ 	.type		= FB_TYPE_PACKED_PIXELS,
+ 	.visual		= FB_VISUAL_PSEUDOCOLOR,
+ 	.xpanstep	= 0,
+ 	.ypanstep	= 1,
+ 	.ywrapstep	= 0,
+ 	.accel		= FB_ACCEL_NONE,
+ };
+ 
+ /* framebuffer control routines */
+ static inline void
+ ifrgbcfb_setup_pseudocolour(struct fb_info *info)
+ {
+   ;
+ }
+ 
+ static inline void
+ ifrgbcfb_setup_truecolour(struct fb_info *info)
+ {
+   info->fix.visual = FB_VISUAL_TRUECOLOR;
+   info->var.xoffset = 0;
+   info->var.yoffset = 0;
+ 
+   info->var.bits_per_pixel = 16;
+   info->var.red.length = 5;
+   info->var.red.offset = 10;
+   info->var.red.msb_right = 0;
+   info->var.green.length = 5;
+   info->var.green.offset = 5;
+   info->var.blue.length = 5;
+   info->var.blue.offset = 0;
+ 
+   info->var.green.msb_right = 0;
+   info->var.blue.msb_right = 0;
+   info->var.activate = FB_ACTIVATE_NOW;
+   //  info->var.height = -1;
+   //  info->var.width  = -1;
+   info->fix.type = FB_TYPE_PACKED_PIXELS;
+   info->fix.accel = FB_ACCEL_NONE;
+ }
+ 
+ static int
+ ifrgbcfb_set_par(struct fb_info *info)
+ {
+ 
+ 	ifrgbcfb_setup_truecolour(info);
+ 	info->fix.line_length = info->var.xres_virtual * 2;
+ 	return 0;
+ }
+ 
+ static int
+ ifrgbcfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
+ 			u_int transp, struct fb_info *info)
+ {
+ 	unsigned int pseudo_val = 0;
+ 
+ 	/* 1:5:5:5 */
+ 	pseudo_val |= ((red >> 11) & 0x1f)   << info->var.red.offset;
+ 	pseudo_val |= ((green >> 11) & 0x1f) << info->var.green.offset;
+ 	pseudo_val |= ((blue >> 11) & 0x1f)  << info->var.blue.offset;
+ 
+ 	((u32 *)info->pseudo_palette)[regno] = pseudo_val;
+ 
+ 	return 0;
+ }
+ 
+ static int
+ ifrgbcfb_blank(int blank_mode, struct fb_info *info)
+ {
+ 	return 0;
+ }
+ 
+ static int
+ ifrgbcfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
+ {
+   
+ 	return 0;
+ }
+ 
+ 
+ /* framebuffer information structures */
+ static struct fb_ops ifrgbcfb_fbops = {
+ 	.owner		= THIS_MODULE,
+ 	.fb_set_par	= ifrgbcfb_set_par,
+ 	.fb_setcolreg	= ifrgbcfb_setcolreg,
+ 	.fb_blank	= ifrgbcfb_blank,
+ 
+ 	.fb_pan_display	= ifrgbcfb_pan_display,
+ 
+ 	/* to be replaced by any acceleration we can */
+ 	.fb_fillrect	= cfb_fillrect,
+ 	.fb_copyarea	= cfb_copyarea,
+ 	.fb_imageblit	= cfb_imageblit,
+ 	.fb_cursor	= soft_cursor
+ };
+ 
+ static void __devinit
+ ifrgbcfb_fetch_hw_state(struct fb_info *info)
+ {
+ 	struct fb_var_screeninfo *var = &info->var;
+ 	struct fb_fix_screeninfo *fix = &info->fix;
+ 	struct ifrgbcfb_par *par = info->par;
+ 	u16 offset;
+ 	u32 xres, yres;
+ 	u32 xres_virtual, yres_virtual;
+ 	int bpp;
+ 
+ 	fix->type = FB_TYPE_PACKED_PIXELS;
+ 
+ 	/* general info */
+ 	par->display = 0;
+ 
+ 	bpp = 5;
+ 	ifrgbcfb_setup_truecolour(info);
+ 
+ 	xres=640;
+ 	yres=480;
+ 	offset=0;
+ 
+ 	xres_virtual = 1024;
+ 	yres_virtual = 480;
+ 
+ 	var->xres		= xres;
+ 	var->yres		= yres;
+ 	var->xres_virtual	= xres_virtual;
+ 	var->yres_virtual	= yres_virtual;
+ 	var->xoffset		= var->yoffset = 0;
+ 	var->grayscale		= 0;
+ 	var->activate		= FB_ACTIVATE_NOW;
+ 
+ }
+ 
+ 
+ static int
+ ifrgbcfb_remove(struct device *dev)
+ {
+ #if 0
+ 	struct fb_info *info = dev_get_drvdata(dev);
+ 	struct platform_device *pdev = to_platform_device(dev);
+ 	struct ifrgbcfb_par *par = NULL;
+ #endif
+ 	return 0;
+ }
+ 
+ static int __devinit
+ ifrgbcfb_probe(struct device *dev)
+ {
+ 	struct platform_device *pdev = to_platform_device(dev);
+ 	struct ifrgbcfb_par *default_par;
+ 	struct fb_info *info;
+ 	struct ifrgbcfb_pdata *pdata = NULL;
+ 	int ret = 0;
+ 
+ 	/* enable platform-dependent hardware glue, if any */
+ 
+ 	if (dev->platform_data)
+ 		pdata = dev->platform_data;
+ 
+ 	if (pdata && pdata->platform_init_video)
+ 		pdata->platform_init_video();
+ 
+ 	/* resource[0] is VRAM, resource[1] is registers */
+ 	if (pdev->resource[0].flags != IORESOURCE_MEM
+ 			|| pdev->resource[1].flags != IORESOURCE_MEM) {
+ 		dev_err(&pdev->dev, "invalid resource type\n");
+ 		ret = -ENODEV;
+ 		goto bail;
+ 	}
+ 
+ 	if (!request_mem_region(pdev->resource[0].start,
+ 		pdev->resource[0].end - pdev->resource[0].start +1, "ifrgbcfb mem")) {
+ 		printk("request_mem_region failed\n");
+ 		ret = -EBUSY;
+ 		goto bail;
+ 	}
+ 
+ 	info = framebuffer_alloc(sizeof(struct ifrgbcfb_par) + sizeof(u32) * 256, &pdev->dev);
+ 	if (!info) {
+ 		ret = -ENOMEM;
+ 		goto bail;
+ 	}
+ 
+ 	default_par = info->par;
+ 	default_par->regs = ioremap_nocache(pdev->resource[1].start,
+ 			pdev->resource[1].end - pdev->resource[1].start +1);
+ 	if (!default_par->regs) {
+ 		printk(KERN_ERR PFX "unable to map registers\n");
+ 	}
+ 	info->pseudo_palette = default_par->pseudo_palette;
+ 
+ 	info->screen_base = ioremap_nocache(pdev->resource[0].start,
+ 			pdev->resource[0].end - pdev->resource[0].start +1);
+ 
+ 	if (!info->screen_base) {
+ 		printk(KERN_ERR PFX "unable to map framebuffer\n");
+ 	}
+ 	info->fix = ifrgbcfb_fix;
+ 	info->fix.mmio_start = pdev->resource[1].start;
+ 	info->fix.mmio_len = pdev->resource[1].end - pdev->resource[1].start +1;
+ 	info->fix.smem_start = pdev->resource[0].start;
+ 	info->fix.smem_len = pdev->resource[0].end - pdev->resource[0].start +1;
+ 
+ 	printk(KERN_INFO PFX "fb %d KB mapped at 0x%p\n",
+ 	       info->fix.smem_len / 1024, info->screen_base);
+ 
+ 	info->par = default_par;
+ 	info->fbops = &ifrgbcfb_fbops;
+ 	info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+ 
+ 	/* perform "manual" chip initialization, if needed */
+ 	ifrgbcfb_fetch_hw_state(info);
+ 
+ 	if (register_framebuffer(info) < 0) {
+ 		ret = -EINVAL;
+ 		goto bail;
+ 	}
+ 
+ 	dev_set_drvdata(&pdev->dev, info);
+ 
+ 	printk(KERN_INFO "fb%d: %s frame buffer device\n",
+ 	       info->node, info->fix.id);
+ 
+ 	return 0;
+ 
+ bail:
+ 	ifrgbcfb_remove(dev);
+ 	return ret;
+ 
+ }
+ 
+ 
+ static struct device_driver ifrgbcfb_driver = {
+ 	.name		= "ifrgbcfb",
+ 	.bus		= &platform_bus_type,
+ 	.probe		= ifrgbcfb_probe,
+ 	.remove		= ifrgbcfb_remove,
+ };
+ 
+ 
+ static int __init
+ ifrgbcfb_init(void)
+ {
+ 	if (fb_get_options("ifrgbcfb", NULL))
+ 		return -ENODEV;
+ 
+ 	return driver_register(&ifrgbcfb_driver);
+ }
+ 
+ 
+ static void __exit
+ ifrgbcfb_exit(void)
+ {
+ 	driver_unregister(&ifrgbcfb_driver);
+ }
+ 
+ module_init(ifrgbcfb_init);
+ module_exit(ifrgbcfb_exit);
+ 
+ 
+ MODULE_LICENSE("GPL");
+ MODULE_DESCRIPTION("Framebuffer driver for ifrgbc devices");
+ MODULE_AUTHOR("Mamoru SAKUGAWA <sakugawa@linux-m32r.org>");
+ 
diff -crBN orig/include/asm-m32r/ifrgbc.h new/include/asm-m32r/ifrgbc.h
*** orig/include/asm-m32r/ifrgbc.h	1970-01-01 09:00:00.000000000 +0900
--- new/include/asm-m32r/ifrgbc.h	2006-12-19 17:35:01.000000000 +0900
***************
*** 0 ****
--- 1,21 ----
+ struct ifrgbcfb_regval {
+   u16 addr;
+   u32 value;
+ };
+ 
+ struct ifrgbcfb_par {
+   void __iomem *regs;
+   unsigned char display;
+   unsigned int pseudo_palette[16];
+ };
+ 
+ struct ifrgbcfb_pdata {
+   const struct ifrgbcfb_regval *initregs;
+   const unsigned int initregssize;
+   void (*platform_init_video)(void);
+ };
+ 
+ static struct ifrgbcfb_regval ifrgbcfb_initregs[] = {
+   {0x120,0x80000001},
+   {0x12c,0x00003e00},
+ };

