bump etrax to .25

SVN-Revision: 11028
This commit is contained in:
John Crispin 2008-05-03 15:51:16 +00:00
parent 6720686d55
commit 4e7ea16048
11 changed files with 202 additions and 2235 deletions

View file

@ -10,7 +10,7 @@ ARCH:=cris
BOARD:=etrax
BOARDNAME:=Foxboard (ETRAX 100LX)
FEATURES:=squashfs jffs2 broken
LINUX_VERSION:=2.6.19.2
LINUX_VERSION:=2.6.25
include $(INCLUDE_DIR)/target.mk
@ -21,19 +21,6 @@ define Target/Description
Build fimware images for the FOXBOARD made by acmesystems.it
endef
define Kernel/Prepare/Fox
bzcat $(DL_DIR)/$(LINUX_SOURCE) | tar -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
if [ -d ./files ]; then $(CP) ./files/* $(LINUX_DIR)/; fi
if [ -d ./patches/generic_2.6 ]; then $(PATCH) $(LINUX_DIR) ./patches/generic_2.6; fi
if [ -d ./patches/cris ]; then $(PATCH) $(LINUX_DIR) ./patches/cris; fi
ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/include/asm-cris/arch-v10 $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/include/asm-cris/arch
ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/arch/cris/arch-v10 $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/arch/cris/arch
endef
define Kernel/Prepare
$(call Kernel/Prepare/Fox)
endef
$(eval $(call BuildTarget))
$(eval $(call RequireCommand,/usr/local/cris/gcc-cris, \
Please install the binary cris toolchain. \

View file

@ -1,16 +1,25 @@
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_BASE_SMALL=0
CONFIG_BLK_DEV_SD=y
CONFIG_BITREVERSE=y
CONFIG_BOUNCE=y
CONFIG_CLASSIC_RCU=y
CONFIG_CRIS=y
# CONFIG_CRIS_MACH_ARTPEC3 is not set
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_MANAGER=y
# CONFIG_ETRAX100LX is not set
CONFIG_ETRAX100LX_V2=y
# CONFIG_ETRAXFS is not set
# CONFIG_ETRAXFS_SIM is not set
CONFIG_ETRAX_ARCH_V10=y
# CONFIG_ETRAX_ARCH_V32 is not set
CONFIG_ETRAX_AXISFLASHMAP=y
# CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE is not set
CONFIG_ETRAX_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
# CONFIG_ETRAX_CSP0_LEDS is not set
# CONFIG_ETRAX_DEBUG_PORT0 is not set
@ -19,7 +28,6 @@ CONFIG_ETRAX_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 init=/etc/pr
# CONFIG_ETRAX_DEBUG_PORT3 is not set
CONFIG_ETRAX_DEBUG_PORT_NULL=y
CONFIG_ETRAX_DEF_R_BUS_CONFIG=0x4
# CONFIG_ETRAX_DEF_R_PORT_G_DIR is not set
CONFIG_ETRAX_DEF_R_PORT_PA_DATA=0xf0
CONFIG_ETRAX_DEF_R_PORT_PA_DIR=0x1c
CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG=0x00
@ -46,7 +54,7 @@ CONFIG_ETRAX_I2C_CLK_PORT=1
CONFIG_ETRAX_I2C_DATA_PORT=0
# CONFIG_ETRAX_I2C_EEPROM is not set
CONFIG_ETRAX_I2C_USES_PB_NOT_PB_I2C=y
# CONFIG_ETRAX_IDE is not set
# CONFIG_ETRAX_KMALLOCED_MODULES is not set
CONFIG_ETRAX_LED1G=2
CONFIG_ETRAX_LED1R=2
CONFIG_ETRAX_LED2G=3
@ -57,7 +65,7 @@ CONFIG_ETRAX_NANDFLASH_BUSWIDTH=1
CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY=y
# CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK is not set
# CONFIG_ETRAX_NO_LEDS is not set
# CONFIG_ETRAX_NO_PHY is not set
CONFIG_ETRAX_PA_BUTTON_BITMASK=02
CONFIG_ETRAX_PA_CHANGEABLE_BITS=0xFF
CONFIG_ETRAX_PA_CHANGEABLE_DIR=0xFF
CONFIG_ETRAX_PA_LEDS=y
@ -113,6 +121,8 @@ CONFIG_ETRAX_SERIAL=y
# CONFIG_ETRAX_SERIAL_FAST_TIMER is not set
# CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST is not set
CONFIG_ETRAX_SERIAL_PORT0=y
# CONFIG_ETRAX_SERIAL_PORT0_DMA0_OUT is not set
# CONFIG_ETRAX_SERIAL_PORT0_DMA1_IN is not set
# CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT is not set
# CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN is not set
CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_IN=y
@ -121,28 +131,46 @@ CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_OUT=y
CONFIG_ETRAX_SERIAL_PORT2=y
CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT=y
CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN=y
# CONFIG_ETRAX_SERIAL_PORT2_DMA6_OUT is not set
# CONFIG_ETRAX_SERIAL_PORT2_DMA7_IN is not set
# CONFIG_ETRAX_SERIAL_PORT2_NO_DMA_IN is not set
# CONFIG_ETRAX_SERIAL_PORT2_NO_DMA_OUT is not set
CONFIG_ETRAX_SERIAL_PORT3=y
# CONFIG_ETRAX_SERIAL_PORT3_DMA2_OUT is not set
# CONFIG_ETRAX_SERIAL_PORT3_DMA3_IN is not set
CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT=y
CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN=y
# CONFIG_ETRAX_SERIAL_PORT3_DMA8_OUT is not set
# CONFIG_ETRAX_SERIAL_PORT3_DMA9_IN is not set
# CONFIG_ETRAX_SERIAL_PORT3_NO_DMA_IN is not set
# CONFIG_ETRAX_SERIAL_PORT3_NO_DMA_OUT is not set
CONFIG_ETRAX_SERIAL_RX_TIMEOUT_TICKS=1
# CONFIG_ETRAX_SOFT_SHUTDOWN is not set
# CONFIG_ETRAX_SYNCHRONOUS_SERIAL is not set
CONFIG_ETRAX_SYSFS_NODES=y
CONFIG_ETRAX_USB_HOST=y
CONFIG_ETRAX_USB_HOST_PORT1=y
CONFIG_ETRAX_USB_HOST_PORT2=y
# CONFIG_ETRAX_VCS_SIM is not set
# CONFIG_ETRAX_WATCHDOG is not set
CONFIG_FAT_FS=y
CONFIG_FORCE_MAX_ZONEORDER=6
CONFIG_FS_POSIX_ACL=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_IOMAP=y
# CONFIG_GEN_RTC is not set
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAVE_IDE=y
# CONFIG_HAVE_KPROBES is not set
# CONFIG_HAVE_KRETPROBES is not set
# CONFIG_HAVE_OPROFILE is not set
# CONFIG_HOSTAP is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_I2C is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IDE is not set
CONFIG_IEEE80211=y
# CONFIG_IEEE80211_CRYPT_CCMP is not set
@ -152,13 +180,15 @@ CONFIG_IEEE80211_DEBUG=y
CONFIG_IEEE80211_SOFTMAC=y
CONFIG_IEEE80211_SOFTMAC_DEBUG=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_IRQ_PER_CPU=y
CONFIG_LZO_COMPRESS=m
CONFIG_LZO_DECOMPRESS=m
CONFIG_MSDOS_FS=y
CONFIG_MTD=y
CONFIG_MTDRAM_ABS_POS=0x0
CONFIG_MTDRAM_ERASE_SIZE=128
CONFIG_MTDRAM_TOTAL_SIZE=0
# CONFIG_MTD_ABSENT is not set
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
# CONFIG_MTD_BLOCK2MTD is not set
CONFIG_MTD_CFI=y
@ -192,7 +222,6 @@ CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
CONFIG_MTD_MTDRAM=y
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_ONENAND is not set
# CONFIG_MTD_OTP is not set
CONFIG_MTD_PARTITIONS=y
@ -203,33 +232,27 @@ CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_SLRAM is not set
CONFIG_MTD_SPLIT_ROOTFS=y
# CONFIG_NET_WIRELESS_RTNETLINK is not set
CONFIG_NLS=y
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NO_IOPORT=y
# CONFIG_OOM_REBOOT is not set
# CONFIG_OVERRIDE_SCHED_STARVATION_LIMIT is not set
# CONFIG_RTC is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_SCSI=y
# CONFIG_SERIAL_8250 is not set
# CONFIG_SMP is not set
# CONFIG_SOFT_WATCHDOG is not set
CONFIG_SLABINFO=y
# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
# CONFIG_SVINTO_SIM is not set
# CONFIG_SYSTEM_PROFILER is not set
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_UID16=y
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_UNWIND_INFO is not set
CONFIG_USB=y
# CONFIG_USBPCWATCHDOG is not set
# CONFIG_USB_ARCH_HAS_EHCI is not set
# CONFIG_USB_ARCH_HAS_HCD is not set
# CONFIG_USB_ARCH_HAS_OHCI is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_SERIAL_IR is not set
CONFIG_USB_STORAGE=y
CONFIG_USB_ZD1201=y
CONFIG_VFAT_FS=y
# CONFIG_VLAN_8021Q is not set
# CONFIG_ZD1211RW is not set

View file

@ -1,191 +0,0 @@
#include <linux/autoconf.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include <linux/gpio_syscalls.h>
#include <asm/etraxgpio.h>
#include <asm/arch/svinto.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/arch/io_interface_mux.h>
#include <asm/unistd.h>
extern int errno;
asmlinkage void sys_gpiosetbits(unsigned char port, unsigned int bits){
switch(port){
case 'G':
case 'g':
*R_PORT_G_DATA = port_g_data_shadow |= bits;
break;
case 'A':
case 'a':
*R_PORT_PA_DATA = port_pa_data_shadow |= bits;
break;
case 'B':
case 'b':
*R_PORT_PB_DATA = port_pb_data_shadow |= bits;
break;
};
};
asmlinkage void sys_gpioclearbits(unsigned char port, unsigned int bits){
switch(port){
case 'G':
case 'g':
*R_PORT_G_DATA = port_g_data_shadow &= ~bits;
break;
case 'A':
case 'a':
*R_PORT_PA_DATA = port_pa_data_shadow &= ~bits;
break;
case 'B':
case 'b':
*R_PORT_PB_DATA = port_pb_data_shadow &= ~bits;
break;
};
};
asmlinkage void sys_gpiosetdir(unsigned char port, unsigned char dir, unsigned int bits){
if((dir=='I' )||(dir=='i')){
switch(port){
case 'G':
case 'g':
if(bits & (1<<0)){
genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g0dir);
};
if((bits & 0x0000FF00)==0x0000FF00){
genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g8_15dir);
};
if((bits & 0x00FF0000)==0x00FF0000){
genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g16_23dir);
};
if(bits & (1<<24)){
genconfig_shadow &= ~IO_MASK(R_GEN_CONFIG, g24dir);
};
*R_GEN_CONFIG = genconfig_shadow;
break;
case 'A':
case 'a':
*R_PORT_PA_DIR = port_pa_dir_shadow &= ~(bits & 0xff);
break;
case 'B':
case 'b':
*R_PORT_PB_DIR = port_pb_dir_shadow &= ~(bits & 0xff);
break;
};
} else if((dir=='O' )||(dir=='o')){
switch(port){
case 'G':
case 'g':
if(bits & (1<<0)){
genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g0dir);
};
if((bits & 0x0000FF00)==0x0000FF00){
genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g8_15dir);
};
if((bits & 0x00FF0000)==0x00FF0000){
genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g8_15dir);
};
if(bits & (1<<24)){
genconfig_shadow |= IO_MASK(R_GEN_CONFIG, g24dir);
};
*R_GEN_CONFIG = genconfig_shadow;
break;
case 'A':
case 'a':
*R_PORT_PA_DIR = port_pa_dir_shadow |= (bits & 0xff);
break;
case 'B':
case 'b':
*R_PORT_PB_DIR = port_pb_dir_shadow |= (bits & 0xff);
break;
};
};
};
asmlinkage void sys_gpiotogglebit(unsigned char port, unsigned int bits){
switch(port){
case 'G':
case 'g':
if(port_g_data_shadow & bits){
*R_PORT_G_DATA = port_g_data_shadow &= ~bits;
} else {
*R_PORT_G_DATA = port_g_data_shadow |= bits;
};
break;
case 'A':
case 'a':
if(*R_PORT_PA_DATA & bits){
*R_PORT_PA_DATA = port_pa_data_shadow &= ~(bits & 0xff);
} else {
*R_PORT_PA_DATA = port_pa_data_shadow |= (bits & 0xff);
};
break;
case 'B':
case 'b':
if(*R_PORT_PB_DATA & bits){
*R_PORT_PB_DATA = port_pb_data_shadow &= ~(bits & 0xff);
} else {
*R_PORT_PB_DATA = port_pb_data_shadow |= (bits & 0xff);
};
break;
};
};
asmlinkage unsigned int sys_gpiogetbits(unsigned char port, unsigned int bits){
unsigned int data = 0;
switch(port){
case 'G':
case 'g':
data = *R_PORT_G_DATA;
break;
case 'A':
case 'a':
data = *R_PORT_PA_DATA;
break;
case 'B':
case 'b':
data = *R_PORT_PB_DATA;
break;
};
data &= bits;
return data;
};

View file

@ -1,262 +0,0 @@
/*
* Simple bitbanged-GPIO SPI driver for ETRAX FS et al.
*
* Copyright (c) 2007 Axis Communications AB
*
* Author: Hans-Peter Nilsson, inspired by earlier work by
* Andre Spanberg but mostly by copying large parts of
* spi_s3c24xx_gpio.c, hence also:
* Copyright (c) 2006 Ben Dooks
* Copyright (c) 2006 Simtec Electronics
*
* 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/types.h>
#include <linux/device.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_bitbang.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/arch/board.h>
/* Our main driver state. */
struct crisv32_spi_hw_info {
struct crisv32_iopin sclk;
struct crisv32_iopin mosi;
struct crisv32_iopin miso;
struct crisv32_iopin cs;
};
/*
* The driver state hides behind the spi_bitbang state. We're
* responsible for allocating that, so we can get a little something
* for ourselves.
*/
struct crisv32_spi_gpio_devdata {
struct spi_bitbang bitbang;
struct crisv32_spi_hw_info pins;
};
/* Helper function getting the driver state from a spi_device. */
static inline struct crisv32_spi_hw_info *spidev_to_hw(struct spi_device *spi)
{
struct crisv32_spi_gpio_devdata *dd = spi_master_get_devdata(spi->master);
return &dd->pins;
}
/* The SPI-bitbang functions: see spi_bitbang.h at EXPAND_BITBANG_TXRX. */
static inline void setsck(struct spi_device *spi, int is_on)
{
crisv32_io_set(&spidev_to_hw(spi)->sclk, is_on != 0);
}
static inline void setmosi(struct spi_device *spi, int is_on)
{
crisv32_io_set(&spidev_to_hw(spi)->mosi, is_on != 0);
}
static inline u32 getmiso(struct spi_device *spi)
{
return crisv32_io_rd(&spidev_to_hw(spi)->miso) != 0 ? 1 : 0;
}
#define spidelay(x) ndelay(x)
#define EXPAND_BITBANG_TXRX
#include <linux/spi/spi_bitbang.h>
/*
* SPI-bitbang word transmit-functions for the four SPI modes,
* dispatching to the inlined functions we just included.
*/
static u32 crisv32_spi_gpio_txrx_mode0(struct spi_device *spi,
unsigned nsecs, u32 word, u8 bits)
{
return bitbang_txrx_be_cpha0(spi, nsecs, 0, word, bits);
}
static u32 crisv32_spi_gpio_txrx_mode1(struct spi_device *spi,
unsigned nsecs, u32 word, u8 bits)
{
return bitbang_txrx_be_cpha1(spi, nsecs, 0, word, bits);
}
static u32 crisv32_spi_gpio_txrx_mode2(struct spi_device *spi,
unsigned nsecs, u32 word, u8 bits)
{
return bitbang_txrx_be_cpha0(spi, nsecs, 1, word, bits);
}
static u32 crisv32_spi_gpio_txrx_mode3(struct spi_device *spi,
unsigned nsecs, u32 word, u8 bits)
{
return bitbang_txrx_be_cpha1(spi, nsecs, 1, word, bits);
}
/* SPI-bitbang chip-select function. */
static void crisv32_spi_gpio_chipselect(struct spi_device *spi, int value)
{
if (spi->mode & SPI_CS_HIGH)
crisv32_io_set(&spidev_to_hw(spi)->cs,
value == BITBANG_CS_ACTIVE ? 1 : 0);
else
crisv32_io_set(&spidev_to_hw(spi)->cs,
value == BITBANG_CS_ACTIVE ? 0 : 1);
}
/* Platform-device probe function. */
static int __devinit crisv32_spi_gpio_probe(struct platform_device *dev)
{
struct spi_master *master;
struct crisv32_spi_gpio_devdata *dd;
struct resource *res;
struct crisv32_spi_gpio_controller_data *gc;
int ret = 0;
/*
* We need to get the controller data as a hardware resource,
* or else it wouldn't be available until *after* the
* spi_bitbang_start call!
*/
res = platform_get_resource_byname(dev, 0, "controller_data_ptr");
if (res == NULL) {
dev_err(&dev->dev, "can't get controller_data resource\n");
return -EIO;
}
gc = (struct crisv32_spi_gpio_controller_data *) res->start;
master = spi_alloc_master(&dev->dev, sizeof *dd);
if (master == NULL) {
dev_err(&dev->dev, "failed to allocate spi master\n");
ret = -ENOMEM;
goto err;
}
dd = spi_master_get_devdata(master);
platform_set_drvdata(dev, dd);
/*
* The device data asks for this driver, and holds the id
* number, which must be unique among the same-type devices.
* We use this as the number of this SPI bus.
*/
master->bus_num = dev->id;
/*
* Allocate pins. Note that thus being allocated as GPIO, we
* don't have to deconfigure them at the end or if something
* fails.
*/
if ((ret = crisv32_io_get_name(&dd->pins.cs, gc->cs)) != 0
|| (ret = crisv32_io_get_name(&dd->pins.miso, gc->miso)) != 0
|| (ret = crisv32_io_get_name(&dd->pins.mosi, gc->mosi)) != 0
|| (ret = crisv32_io_get_name(&dd->pins.sclk, gc->sclk)) != 0)
goto err_no_pins;
/* Set directions of the SPI pins. */
crisv32_io_set_dir(&dd->pins.cs, crisv32_io_dir_out);
crisv32_io_set_dir(&dd->pins.sclk, crisv32_io_dir_out);
crisv32_io_set_dir(&dd->pins.miso, crisv32_io_dir_in);
crisv32_io_set_dir(&dd->pins.mosi, crisv32_io_dir_out);
/* Set state of the SPI pins. */
dev_dbg(&dev->dev, "cs.port 0x%x, pin: %d\n"
dd->pins.cs.port, dd->pins.cs.bit);
/*
* Can't use crisv32_spi_gpio_chipselect(spi, 1) here; we
* don't have a proper "spi" until after spi_bitbang_start.
*/
crisv32_io_set(&dd->pins.cs, 1);
crisv32_io_set(&dd->pins.sclk, 0);
crisv32_io_set(&dd->pins.mosi, 0);
/* Setup SPI bitbang adapter hooks. */
dd->bitbang.master = spi_master_get(master);
dd->bitbang.chipselect = crisv32_spi_gpio_chipselect;
dd->bitbang.txrx_word[SPI_MODE_0] = crisv32_spi_gpio_txrx_mode0;
dd->bitbang.txrx_word[SPI_MODE_1] = crisv32_spi_gpio_txrx_mode1;
dd->bitbang.txrx_word[SPI_MODE_2] = crisv32_spi_gpio_txrx_mode2;
dd->bitbang.txrx_word[SPI_MODE_3] = crisv32_spi_gpio_txrx_mode3;
ret = spi_bitbang_start(&dd->bitbang);
if (ret)
goto err_no_bitbang;
printk (KERN_INFO "CRIS v32 SPI driver for GPIO"
" (cs: %s, miso: %s, mosi: %s, sclk: %s)\n",
gc->cs, gc->miso, gc->mosi, gc->sclk);
return 0;
err_no_bitbang:
spi_master_put(dd->bitbang.master);
err_no_pins:
platform_set_drvdata(dev, NULL);
err:
return ret;
}
/* Platform-device remove-function. */
static int __devexit crisv32_spi_gpio_remove(struct platform_device *dev)
{
struct crisv32_spi_gpio_devdata *dd = platform_get_drvdata(dev);
int ret;
ret = spi_bitbang_stop(&dd->bitbang);
if (ret != 0)
return ret;
spi_master_put(dd->bitbang.master);
platform_set_drvdata(dev, NULL);
return 0;
}
/*
* For the time being, there's no suspend/resume support to care
* about, so we let those handlers default to NULL.
*/
static struct platform_driver crisv32_spi_gpio_drv = {
.probe = crisv32_spi_gpio_probe,
.remove = __devexit_p(crisv32_spi_gpio_remove),
.driver = {
.name = "spi_crisv32_gpio",
.owner = THIS_MODULE,
},
};
/* Module init function. */
static int __devinit crisv32_spi_gpio_init(void)
{
return platform_driver_register(&crisv32_spi_gpio_drv);
}
/* Module exit function. */
static void __devexit crisv32_spi_gpio_exit(void)
{
platform_driver_unregister(&crisv32_spi_gpio_drv);
}
module_init(crisv32_spi_gpio_init);
module_exit(crisv32_spi_gpio_exit);
MODULE_DESCRIPTION("CRIS v32 SPI-GPIO Driver");
MODULE_AUTHOR("Hans-Peter Nilsson, <hp@axis.com>");
MODULE_LICENSE("GPL");

File diff suppressed because it is too large Load diff

View file

@ -1,141 +0,0 @@
/* macros for debug output */
#define hcd_dbg(hcd, fmt, args...) \
dev_info(hcd->self.controller, fmt, ## args)
#define hcd_err(hcd, fmt, args...) \
dev_err(hcd->self.controller, fmt, ## args)
#define hcd_info(hcd, fmt, args...) \
dev_info(hcd->self.controller, fmt, ## args)
#define hcd_warn(hcd, fmt, args...) \
dev_warn(hcd->self.controller, fmt, ## args)
/*
#define devdrv_dbg(fmt, args...) \
printk(KERN_INFO "usb_devdrv dbg: ");printk(fmt, ## args)
*/
#define devdrv_dbg(fmt, args...) {}
#define devdrv_err(fmt, args...) \
printk(KERN_ERR "usb_devdrv error: ");printk(fmt, ## args)
#define devdrv_info(fmt, args...) \
printk(KERN_INFO "usb_devdrv: ");printk(fmt, ## args)
#define irq_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_irq dbg: ");printk(fmt, ## args)
#define irq_err(fmt, args...) \
printk(KERN_ERR "crisv10_irq error: ");printk(fmt, ## args)
#define irq_warn(fmt, args...) \
printk(KERN_INFO "crisv10_irq warn: ");printk(fmt, ## args)
#define irq_info(fmt, args...) \
printk(KERN_INFO "crisv10_hcd: ");printk(fmt, ## args)
/*
#define rh_dbg(fmt, args...) \
printk(KERN_DEBUG "crisv10_rh dbg: ");printk(fmt, ## args)
*/
#define rh_dbg(fmt, args...) {}
#define rh_err(fmt, args...) \
printk(KERN_ERR "crisv10_rh error: ");printk(fmt, ## args)
#define rh_warn(fmt, args...) \
printk(KERN_INFO "crisv10_rh warning: ");printk(fmt, ## args)
#define rh_info(fmt, args...) \
printk(KERN_INFO "crisv10_rh: ");printk(fmt, ## args)
/*
#define tc_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_tc dbg: ");printk(fmt, ## args)
*/
#define tc_dbg(fmt, args...) {while(0){}}
#define tc_err(fmt, args...) \
printk(KERN_ERR "crisv10_tc error: ");printk(fmt, ## args)
/*
#define tc_warn(fmt, args...) \
printk(KERN_INFO "crisv10_tc warning: ");printk(fmt, ## args)
*/
#define tc_warn(fmt, args...) {while(0){}}
#define tc_info(fmt, args...) \
printk(KERN_INFO "crisv10_tc: ");printk(fmt, ## args)
/* Debug print-outs for various traffic types */
#define intr_warn(fmt, args...) \
printk(KERN_INFO "crisv10_intr warning: ");printk(fmt, ## args)
/*
#define intr_dbg(fmt, args...) \
printk(KERN_DEBUG "crisv10_intr dbg: ");printk(fmt, ## args)
*/
#define intr_dbg(fmt, args...) {while(0){}}
#define isoc_err(fmt, args...) \
printk(KERN_ERR "crisv10_isoc error: ");printk(fmt, ## args)
/*
#define isoc_warn(fmt, args...) \
printk(KERN_INFO "crisv10_isoc warning: ");printk(fmt, ## args)
*/
#define isoc_warn(fmt, args...) {while(0){}}
/*
#define isoc_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_isoc dbg: ");printk(fmt, ## args)
*/
#define isoc_dbg(fmt, args...) {while(0){}}
/*
#define timer_warn(fmt, args...) \
printk(KERN_INFO "crisv10_timer warning: ");printk(fmt, ## args)
*/
#define timer_warn(fmt, args...) {while(0){}}
/*
#define timer_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_timer dbg: ");printk(fmt, ## args)
*/
#define timer_dbg(fmt, args...) {while(0){}}
/* Debug printouts for events related to late finishing of URBs */
/*
#define late_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_late dbg: ");printk(fmt, ## args)
*/
#define late_dbg(fmt, args...) {while(0){}}
#define late_warn(fmt, args...) \
printk(KERN_INFO "crisv10_late warning: ");printk(fmt, ## args)
/*
#define errno_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_errno dbg: ");printk(fmt, ## args)
*/
#define errno_dbg(fmt, args...) {while(0){}}
#define dma_dbg(fmt, args...) \
printk(KERN_INFO "crisv10_dma dbg: ");printk(fmt, ## args)
#define dma_err(fmt, args...) \
printk(KERN_ERR "crisv10_dma error: ");printk(fmt, ## args)
#define dma_warn(fmt, args...) \
printk(KERN_INFO "crisv10_dma warning: ");printk(fmt, ## args)
#define dma_info(fmt, args...) \
printk(KERN_INFO "crisv10_dma: ");printk(fmt, ## args)
#define str_dir(pipe) \
(usb_pipeout(pipe) ? "out" : "in")
#define str_type(pipe) \
({ \
char *s = "?"; \
switch (usb_pipetype(pipe)) { \
case PIPE_ISOCHRONOUS: s = "iso"; break; \
case PIPE_INTERRUPT: s = "intr"; break; \
case PIPE_CONTROL: s = "ctrl"; break; \
case PIPE_BULK: s = "bulk"; break; \
}; \
s; \
})

View file

@ -1,10 +0,0 @@
#ifndef __MTD_MTDRAM_H__
#define __MTD_MTDRAM_H__
#ifdef __KERNEL__
#include <linux/mtd/mtd.h>
int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
unsigned long size, char *name);
#endif /* __KERNEL__ */
#endif /* __MTD_MTDRAM_H__ */

View file

@ -8,44 +8,32 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
FOXBOARD:=custom MCM 416 816 832
FOXBOARD_4MB:=MCM 416
FOXBOARD_8MB:=custom 816 832
define Image/BuildKernel
for f in $(FOXBOARD); do \
cp $(KDIR)/vmlinuz_$$$$f $(BIN_DIR)/openwrt-$(BOARD)-zImage_$$$$f; \
done
cp $(KDIR)/vmlinuz $(BIN_DIR)/openwrt-$(BOARD)-zImage
endef
define Image/Prepare
for f in $(FOXBOARD); do \
cp $(LINUX_DIR)/arch/cris/boot/zImage_$$$$f $(KDIR)/vmlinuz_$$$$f; \
done
cp $(LINUX_DIR)/arch/cris/boot/zImage $(KDIR)/vmlinuz
$(MAKE) -C e100boot compile
$(MAKE) -C mkfimage compile
$(INSTALL_BIN) ./boot_linux $(BIN_DIR)
endef
define Image/Build/generic
for f in $(2); do \
mkfimage $(KDIR)/vmlinuz_$$$$f $(KDIR)/vmlinuz_$$$$f.tmp ; \
cat $(KDIR)/vmlinuz_$$$$f.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1)_$$$$f.tmp; \
dd if=$(KDIR)/fimage.$(1)_$$$$f.tmp of=$(KDIR)/fimage.$(1)_$$$$f bs=$(3) conv=sync; \
cp $(KDIR)/fimage.$(1)_$$$$f $(BIN_DIR)/openwrt-$(BOARD)-$(1)-fimage_$$$$f; \
done
mkfimage $(KDIR)/vmlinuz $(KDIR)/vmlinuz.tmp
cat $(KDIR)/vmlinuz.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1).tmp
dd if=$(KDIR)/fimage.$(1).tmp of=$(KDIR)/fimage.$(1) bs=$(2) conv=sync
cp $(KDIR)/fimage.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1)-fimage
endef
define Image/Build/jffs2-64k
$(call prepare_generic_jffs-64k,$(KDIR)/root.jff2-64k)
$(call Image/Build/generic,$(1),$(FOXBOARD_4MB),4194304)
$(call Image/Build/generic,$(1),$(FOXBOARD_8MB),8388608)
$(call Image/Build/generic,$(1),4194304)
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
$(call Image/Build/generic,$(1),$(FOXBOARD_4MB),4194304)
$(call Image/Build/generic,$(1),$(FOXBOARD_8MB),8388608)
$(call Image/Build/generic,$(1),4194304)
endef
define Image/Build

View file

@ -24,7 +24,7 @@ define Build/Compile
endef
define Build/InstallDev
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mkfimage $(STAGING_DIR)/bin/mkfimage
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mkfimage $(STAGING_DIR_HOST)/bin/mkfimage
endef
$(eval $(call Build/DefaultTargets))

View file

@ -0,0 +1,139 @@
Index: linux-2.6.25/arch/cris/mm/init.c
===================================================================
--- linux-2.6.25.orig/arch/cris/mm/init.c 2008-05-03 09:53:53.000000000 +0100
+++ linux-2.6.25/arch/cris/mm/init.c 2008-05-03 09:54:05.000000000 +0100
@@ -112,3 +112,7 @@
printk (KERN_INFO "Freeing unused kernel memory: %luk freed\n",
(unsigned long)((&__init_end - &__init_begin) >> 10));
}
+
+void free_initrd_mem(unsigned long start, unsigned long end)
+{
+}
Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
===================================================================
--- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:00:53.000000000 +0100
+++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
@@ -7,7 +7,7 @@
LD = ld-cris
ldflags-y += -T $(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
-OBJCOPY = objcopy-cris
+OBJCOPY = /usr/local/cris/objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss
quiet_cmd_image = BUILD $@
Index: linux-2.6.25/arch/cris/boot/Makefile
===================================================================
--- linux-2.6.25.orig/arch/cris/boot/Makefile 2008-04-17 03:49:44.000000000 +0100
+++ linux-2.6.25/arch/cris/boot/Makefile 2008-05-03 10:05:56.000000000 +0100
@@ -2,10 +2,10 @@
# arch/cris/arch-v10/boot/Makefile
#
-OBJCOPY = objcopy-cris
+OBJCOPY = /usr/local/cris/objcopy-cris
OBJCOPYFLAGS = -O binary --remove-section=.bss
-subdir- := compressed rescue
+subdir- := compressed
targets := Image
$(obj)/Image: vmlinux FORCE
@@ -14,7 +14,6 @@
$(obj)/compressed/vmlinux: $(obj)/Image FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
- $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
$(obj)/zImage: $(obj)/compressed/vmlinux
@cp $< $@
Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
===================================================================
--- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
+++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 16:29:55.000000000 +0100
@@ -2,9 +2,8 @@
# arch/cris/arch-v10/boot/compressed/Makefile
#
-CC = gcc-cris -melf $(LINUXINCLUDE)
ccflags-y += -O2
-LD = ld-cris
+LD=/usr/local/cris/ld-cris
ldflags-y += -T $(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
OBJCOPY = /usr/local/cris/objcopy-cris
@@ -22,10 +21,10 @@
$(call if_changed,objcopy)
$(obj)/head.o: $(obj)/head.S .config
- @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
+ /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__ASSEMBLY__ -traditional -c $< -o $@
$(obj)/misc.o: $(obj)/misc.c .config
- @$(CC) -D__KERNEL__ -c $< -o $@
+ /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__KERNEL__ -c $< -o $@
$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
$(call if_changed,image)
Index: linux-2.6.25/arch/cris/boot/compressed/misc.c
===================================================================
--- linux-2.6.25.orig/arch/cris/boot/compressed/misc.c 2008-05-03 16:22:44.000000000 +0100
+++ linux-2.6.25/arch/cris/boot/compressed/misc.c 2008-05-03 16:23:26.000000000 +0100
@@ -5,7 +5,7 @@
* adapted for Linux.
*
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
- * puts by Nick Holloway 1993, better puts by Martin Mares 1995
+ * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
* adaptation for Linux/CRIS Axis Communications AB, 1999
*
*/
@@ -99,7 +99,7 @@
static void gzip_mark(void **);
static void gzip_release(void **);
-static void puts(const char *);
+static void putstr(const char *);
/* the "heap" is put directly after the BSS ends, at end */
@@ -139,7 +139,7 @@
/* decompressor info and error messages to serial console */
static void
-puts(const char *s)
+putstr(const char *s)
{
#ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
while(*s) {
@@ -209,9 +209,9 @@
static void
error(char *x)
{
- puts("\n\n");
- puts(x);
- puts("\n\n -- System halted\n");
+ putstr("\n\n");
+ putstr(x);
+ putstr("\n\n -- System halted\n");
while(1); /* Halt */
}
@@ -257,14 +257,7 @@
makecrc();
- __asm__ volatile ("move vr,%0" : "=rm" (revision));
- if (revision < 10)
- {
- puts("You need an ETRAX 100LX to run linux 2.6\n");
- while(1);
- }
-
- puts("Uncompressing Linux...\n");
+ putstr("Uncompressing Linux...\n");
gunzip();
- puts("Done. Now booting the kernel.\n");
+ putstr("Done. Now booting the kernel.\n");
}