1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-03 21:09:42 +02:00

[etrax] dump 2.6.25 support

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17816 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
claudio 2009-10-02 08:07:39 +00:00
parent b12bd64229
commit 9e0befc4f3
19 changed files with 2 additions and 7719 deletions

View File

@ -1,176 +0,0 @@
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_BASE_SMALL=0
CONFIG_BITREVERSE=y
CONFIG_BLK_DEV_SD=y
CONFIG_BOUNCE=y
# CONFIG_BRIDGE is not set
CONFIG_CLASSIC_RCU=y
CONFIG_CRIS=y
# CONFIG_CRIS_MACH_ARTPEC3 is not set
# CONFIG_ETRAX100LX is not set
CONFIG_ETRAX100LX_V2=y
# CONFIG_ETRAXFS is not set
CONFIG_ETRAX_ARCH_V10=y
# CONFIG_ETRAX_ARCH_V32 is not set
CONFIG_ETRAX_AXISFLASHMAP=y
CONFIG_ETRAX_CMDLINE="root=/dev/mtdblock1 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
# CONFIG_ETRAX_CSP0_LEDS is not set
# CONFIG_ETRAX_DEBUG_PORT0 is not set
# CONFIG_ETRAX_DEBUG_PORT1 is not set
# CONFIG_ETRAX_DEBUG_PORT2 is not set
# 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_PA_DATA=0xf0
CONFIG_ETRAX_DEF_R_PORT_PA_DIR=0x1c
CONFIG_ETRAX_DEF_R_PORT_PB_CONFIG=0x00
CONFIG_ETRAX_DEF_R_PORT_PB_DATA=0x03
CONFIG_ETRAX_DEF_R_PORT_PB_DIR=0xce
CONFIG_ETRAX_DEF_R_SDRAM_CONFIG=0x09603737
CONFIG_ETRAX_DEF_R_SDRAM_TIMING=0x80008002
CONFIG_ETRAX_DEF_R_WAITSTATES=0x95f8
CONFIG_ETRAX_DRAM_SIZE=32
CONFIG_ETRAX_DRAM_VIRTUAL_BASE=c0000000
CONFIG_ETRAX_ETHERNET=y
CONFIG_ETRAX_FAST_TIMER=y
CONFIG_ETRAX_FLASH1_SIZE=0
CONFIG_ETRAX_FLASH_BUSWIDTH=2
CONFIG_ETRAX_GPIO=y
# CONFIG_ETRAX_I2C is not set
# CONFIG_ETRAX_I2C_GVC is not set
# CONFIG_ETRAX_KMALLOCED_MODULES is not set
CONFIG_ETRAX_LED1G=2
CONFIG_ETRAX_LED1R=2
CONFIG_ETRAX_LED2G=3
CONFIG_ETRAX_LED2R=3
CONFIG_ETRAX_LED3G=2
CONFIG_ETRAX_LED3R=2
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_PA_BUTTON_BITMASK=02
CONFIG_ETRAX_PA_CHANGEABLE_BITS=0xFF
CONFIG_ETRAX_PA_CHANGEABLE_DIR=0xFF
CONFIG_ETRAX_PA_LEDS=y
CONFIG_ETRAX_PB_CHANGEABLE_BITS=0xFF
CONFIG_ETRAX_PB_CHANGEABLE_DIR=0xFF
# CONFIG_ETRAX_PB_LEDS is not set
CONFIG_ETRAX_PTABLE_SECTOR=0
CONFIG_ETRAX_RESCUE_SER0=y
# CONFIG_ETRAX_RESCUE_SER1 is not set
# CONFIG_ETRAX_RESCUE_SER2 is not set
# CONFIG_ETRAX_RESCUE_SER3 is not set
# CONFIG_ETRAX_RS485 is not set
CONFIG_ETRAX_SDRAM=y
CONFIG_ETRAX_SER0_CD_ON_PA_BIT=-1
CONFIG_ETRAX_SER0_CD_ON_PB_BIT=-1
CONFIG_ETRAX_SER0_DSR_ON_PA_BIT=-1
CONFIG_ETRAX_SER0_DSR_ON_PB_BIT=-1
CONFIG_ETRAX_SER0_DTR_ON_PA_BIT=-1
CONFIG_ETRAX_SER0_DTR_ON_PB_BIT=-1
# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_MIXED is not set
CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_NONE=y
# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PA is not set
# CONFIG_ETRAX_SER0_DTR_RI_DSR_CD_ON_PB is not set
CONFIG_ETRAX_SER0_RI_ON_PA_BIT=-1
CONFIG_ETRAX_SER0_RI_ON_PB_BIT=-1
CONFIG_ETRAX_SER2_CD_ON_PA_BIT=-1
CONFIG_ETRAX_SER2_CD_ON_PB_BIT=-1
CONFIG_ETRAX_SER2_DSR_ON_PA_BIT=-1
CONFIG_ETRAX_SER2_DSR_ON_PB_BIT=-1
CONFIG_ETRAX_SER2_DTR_ON_PA_BIT=-1
CONFIG_ETRAX_SER2_DTR_ON_PB_BIT=-1
# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_MIXED is not set
CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_NONE=y
# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PA is not set
# CONFIG_ETRAX_SER2_DTR_RI_DSR_CD_ON_PB is not set
CONFIG_ETRAX_SER2_RI_ON_PA_BIT=-1
CONFIG_ETRAX_SER2_RI_ON_PB_BIT=-1
CONFIG_ETRAX_SER3_CD_ON_PA_BIT=-1
CONFIG_ETRAX_SER3_CD_ON_PB_BIT=-1
CONFIG_ETRAX_SER3_DSR_ON_PA_BIT=-1
CONFIG_ETRAX_SER3_DSR_ON_PB_BIT=-1
CONFIG_ETRAX_SER3_DTR_ON_PA_BIT=-1
CONFIG_ETRAX_SER3_DTR_ON_PB_BIT=-1
# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_MIXED is not set
CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_NONE=y
# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_PA is not set
# CONFIG_ETRAX_SER3_DTR_RI_DSR_CD_ON_PB is not set
CONFIG_ETRAX_SER3_RI_ON_PA_BIT=-1
CONFIG_ETRAX_SER3_RI_ON_PB_BIT=-1
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
CONFIG_ETRAX_SERIAL_PORT0_NO_DMA_OUT=y
# CONFIG_ETRAX_SERIAL_PORT1 is not set
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_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_EXT2_FS=y
CONFIG_FORCE_MAX_ZONEORDER=6
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_IOMAP=y
# CONFIG_GEN_RTC is not set
# CONFIG_HAMRADIO 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_HW_RANDOM is not set
# CONFIG_I2C is not set
# CONFIG_IDE is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_MTDRAM_ABS_POS=0x0
CONFIG_MTDRAM_ERASE_SIZE=128
CONFIG_MTDRAM_TOTAL_SIZE=0
# CONFIG_MTD_CFI_INTELEXT is not set
CONFIG_MTD_CONCAT=y
CONFIG_MTD_MTDRAM=y
# CONFIG_NETDEV_1000 is not set
CONFIG_NO_IOPORT=y
# CONFIG_OOM_REBOOT is not set
# CONFIG_RTC is not set
CONFIG_SCSI=y
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
# CONFIG_SERIAL_8250 is not set
CONFIG_SLABINFO=y
# CONFIG_SVINTO_SIM is not set
# CONFIG_SYSTEM_PROFILER is not set
CONFIG_UID16=y
CONFIG_USB=y
# 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_VLAN_8021Q is not set
# CONFIG_WLAN_80211 is not set

View File

@ -1,49 +0,0 @@
#ifndef _LINUX_ETRAXI2C_H
#define _LINUX_ETRAXI2C_H
/* etraxi2c _IOC_TYPE, bits 8 to 15 in ioctl cmd */
#define ETRAXI2C_IOCTYPE 44
/* supported ioctl _IOC_NR's */
/* in write operations, the argument contains both i2c
* slave, register and value.
*/
#define I2C_WRITEARG(slave, reg, value) (((slave) << 16) | ((reg) << 8) | (value))
#define I2C_READARG(slave, reg) (((slave) << 16) | ((reg) << 8))
#define I2C_ARGSLAVE(arg) ((arg) >> 16)
#define I2C_ARGREG(arg) (((arg) >> 8) & 0xff)
#define I2C_ARGVALUE(arg) ((arg) & 0xff)
#define I2C_WRITEREG 0x1 /* write to an I2C register */
#define I2C_READREG 0x2 /* read from an I2C register */
/*
EXAMPLE usage:
i2c_arg = I2C_WRITEARG(STA013_WRITE_ADDR, reg, val);
ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_WRITEREG), i2c_arg);
i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
*/
/* Extended part */
#define I2C_READ 0x4 /* reads from I2C device */
#define I2C_WRITE 0x3 /* writes to I2C device */
#define I2C_WRITEREAD 0x5 /* writes to I2C device where to start reading */
typedef struct _I2C_DATA
{
unsigned char slave; /* I2C address (8-bit representation) of slave device */
unsigned char wbuf[256]; /* Write buffer (length = 256 bytes) */
unsigned int wlen; /* Number of bytes to write from wbuf[] */
unsigned char rbuf[256]; /* Read buffer (length = 256 bytes) */
unsigned int rlen; /* Number of bytes to read into rbuf[] */
} I2C_DATA;
#endif

View File

@ -1,20 +0,0 @@
#ifndef _I2C_ERRNO_H
#define _I2C_ERRNO_H
#define EI2CNOERRORS 0 /* All fine */
#define EI2CBUSNFREE 1 /* I2C bus not free */
#define EI2CWADDRESS 2 /* Address write failed */
#define EI2CRADDRESS 3 /* Address read failed */
#define EI2CSENDDATA 4 /* Sending data failed */
#define EI2CRECVDATA 5 /* Receiving data failed */
#define EI2CSTRTCOND 6 /* Start condition failed */
#define EI2CRSTACOND 7 /* Repeated start condition failed */
#define EI2CSTOPCOND 8 /* Stop condition failed */
#define EI2CNOSNDBYT 9 /* Number of send bytes is 0, while there's a send buffer defined */
#define EI2CNOSNDBUF 10 /* No send buffer defined, while number of send bytes is not 0 */
#define EI2CNORCVBYT 11 /* Number of receive bytes is 0, while there's a receive buffer defined */
#define EI2CNORCVBUF 12 /* No receive buffer defined, while number of receive bytes is not 0 */
#define EI2CNOACKNLD 13 /* No acknowledge received from slave */
#define EI2CNOMNUMBR 14 /* No MAJOR number received from kernel while registering the device */
#endif /* _I2C_ERRNO_H */

View File

@ -1,30 +0,0 @@
#ifndef _I2C_H
#define _I2C_H
int i2c_init(void);
/* High level I2C actions */
int i2c_writereg(unsigned char theSlave, unsigned char theReg, unsigned char theValue);
unsigned char i2c_readreg(unsigned char theSlave, unsigned char theReg);
/* Low level I2C */
int i2c_start(void);
int i2c_stop(void);
int i2c_outbyte(unsigned char x);
unsigned char i2c_inbyte(void);
int i2c_getack(void);
void i2c_sendack(void);
void i2c_sendnack(void);
/**GVC**/
/* New low level I2C functions */
int i2c_read( unsigned char slave, unsigned char* rbuf, unsigned char rlen );
int i2c_write( unsigned char slave, unsigned char* wbuf, unsigned char wlen );
int i2c_writeread( unsigned char slave
, unsigned char* wbuf
, unsigned char wlen
, unsigned char* rbuf
, unsigned char rlen
);
/**END GVC**/
#endif /* _I2C_H */

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; \
})

File diff suppressed because it is too large Load Diff

View File

@ -1,333 +0,0 @@
#ifndef __LINUX_ETRAX_USB_H
#define __LINUX_ETRAX_USB_H
#include <linux/types.h>
#include <linux/list.h>
struct USB_IN_Desc {
volatile __u16 sw_len;
volatile __u16 command;
volatile unsigned long next;
volatile unsigned long buf;
volatile __u16 hw_len;
volatile __u16 status;
};
struct USB_SB_Desc {
volatile __u16 sw_len;
volatile __u16 command;
volatile unsigned long next;
volatile unsigned long buf;
};
struct USB_EP_Desc {
volatile __u16 hw_len;
volatile __u16 command;
volatile unsigned long sub;
volatile unsigned long next;
};
/* Root Hub port status struct */
struct crisv10_rh {
volatile __u16 wPortChange[2];
volatile __u16 wPortStatusPrev[2];
};
/* HCD description */
struct crisv10_hcd {
spinlock_t lock;
__u8 num_ports;
__u8 running;
};
/* Endpoint HC private data description */
struct crisv10_ep_priv {
int epid;
};
/* Additional software state info for a USB Controller epid */
struct etrax_epid {
__u8 inuse; /* !0 = setup in Etrax and used for a endpoint */
__u8 disabled; /* !0 = Temporarly disabled to avoid resubmission */
__u8 type; /* Setup as: PIPE_BULK, PIPE_CONTROL ... */
__u8 out_traffic; /* !0 = This epid is for out traffic */
};
/* Struct to hold information of scheduled later URB completion */
struct urb_later_data {
struct delayed_work dws;
struct usb_hcd *hcd;
struct urb *urb;
int urb_num;
int status;
};
typedef enum {
STARTED,
NOT_STARTED,
UNLINK,
} crisv10_urb_state_t;
struct crisv10_urb_priv {
/* Sequence number for this URB. Every new submited URB gets this from
a incrementing counter. Used when a URB is scheduled for later finish to
be sure that the intended URB hasn't already been completed (device
drivers has a tendency to reuse URBs once they are completed, causing us
to not be able to single old ones out only based on the URB pointer.) */
__u32 urb_num;
/* The first_sb field is used for freeing all SB descriptors belonging
to an urb. The corresponding ep descriptor's sub pointer cannot be
used for this since the DMA advances the sub pointer as it processes
the sb list. */
struct USB_SB_Desc *first_sb;
/* The last_sb field referes to the last SB descriptor that belongs to
this urb. This is important to know so we can free the SB descriptors
that ranges between first_sb and last_sb. */
struct USB_SB_Desc *last_sb;
/* The rx_offset field is used in ctrl and bulk traffic to keep track
of the offset in the urb's transfer_buffer where incoming data should be
copied to. */
__u32 rx_offset;
/* Counter used in isochronous transfers to keep track of the
number of packets received/transmitted. */
__u32 isoc_packet_counter;
/* Flag that marks if this Isoc Out URB has finished it's transfer. Used
because several URBs can be finished before list is processed */
__u8 isoc_out_done;
/* This field is used to pass information about the urb's current state
between the various interrupt handlers (thus marked volatile). */
volatile crisv10_urb_state_t urb_state;
/* In Ctrl transfers consist of (at least) 3 packets: SETUP, IN and ZOUT.
When DMA8 sub-channel 2 has processed the SB list for this sequence we
get a interrupt. We also get a interrupt for In transfers and which
one of these interrupts that comes first depends of data size and device.
To be sure that we have got both interrupts before we complete the URB
we have these to flags that shows which part that has completed.
We can then check when we get one of the interrupts that if the other has
occured it's safe for us to complete the URB, otherwise we set appropriate
flag and do the completion when we get the other interrupt. */
volatile unsigned char ctrl_zout_done;
volatile unsigned char ctrl_rx_done;
/* Connection between the submitted urb and ETRAX epid number */
__u8 epid;
/* The rx_data_list field is used for periodic traffic, to hold
received data for later processing in the the complete_urb functions,
where the data us copied to the urb's transfer_buffer. Basically, we
use this intermediate storage because we don't know when it's safe to
reuse the transfer_buffer (FIXME?). */
struct list_head rx_data_list;
/* The interval time rounded up to closest 2^N */
int interval;
/* Pool of EP descriptors needed if it's a INTR transfer.
Amount of EPs in pool correspons to how many INTR that should
be inserted in TxIntrEPList (max 128, defined by MAX_INTR_INTERVAL) */
struct USB_EP_Desc* intr_ep_pool[128];
/* The mount of EPs allocated for this INTR URB */
int intr_ep_pool_length;
/* Pointer to info struct if URB is scheduled to be finished later */
struct urb_later_data* later_data;
/* Allocated bandwidth for isochronous and interrupt traffic */
int bandwidth;
};
/* This struct is for passing data from the top half to the bottom half irq
handlers */
struct crisv10_irq_reg {
struct usb_hcd* hcd;
__u32 r_usb_epid_attn;
__u8 r_usb_status;
__u16 r_usb_rh_port_status_1;
__u16 r_usb_rh_port_status_2;
__u32 r_usb_irq_mask_read;
__u32 r_usb_fm_number;
struct work_struct usb_bh;
};
/* This struct is for passing data from the isoc top half to the isoc bottom
half. */
struct crisv10_isoc_complete_data {
struct usb_hcd *hcd;
struct urb *urb;
struct work_struct usb_bh;
};
/* Entry item for URB lists for each endpint */
typedef struct urb_entry
{
struct urb *urb;
struct list_head list;
} urb_entry_t;
/* ---------------------------------------------------------------------------
Virtual Root HUB
------------------------------------------------------------------------- */
/* destination of request */
#define RH_INTERFACE 0x01
#define RH_ENDPOINT 0x02
#define RH_OTHER 0x03
#define RH_CLASS 0x20
#define RH_VENDOR 0x40
/* Requests: bRequest << 8 | bmRequestType */
#define RH_GET_STATUS 0x0080
#define RH_CLEAR_FEATURE 0x0100
#define RH_SET_FEATURE 0x0300
#define RH_SET_ADDRESS 0x0500
#define RH_GET_DESCRIPTOR 0x0680
#define RH_SET_DESCRIPTOR 0x0700
#define RH_GET_CONFIGURATION 0x0880
#define RH_SET_CONFIGURATION 0x0900
#define RH_GET_STATE 0x0280
#define RH_GET_INTERFACE 0x0A80
#define RH_SET_INTERFACE 0x0B00
#define RH_SYNC_FRAME 0x0C80
/* Our Vendor Specific Request */
#define RH_SET_EP 0x2000
/* Hub port features */
#define RH_PORT_CONNECTION 0x00
#define RH_PORT_ENABLE 0x01
#define RH_PORT_SUSPEND 0x02
#define RH_PORT_OVER_CURRENT 0x03
#define RH_PORT_RESET 0x04
#define RH_PORT_POWER 0x08
#define RH_PORT_LOW_SPEED 0x09
#define RH_C_PORT_CONNECTION 0x10
#define RH_C_PORT_ENABLE 0x11
#define RH_C_PORT_SUSPEND 0x12
#define RH_C_PORT_OVER_CURRENT 0x13
#define RH_C_PORT_RESET 0x14
/* Hub features */
#define RH_C_HUB_LOCAL_POWER 0x00
#define RH_C_HUB_OVER_CURRENT 0x01
#define RH_DEVICE_REMOTE_WAKEUP 0x00
#define RH_ENDPOINT_STALL 0x01
/* Our Vendor Specific feature */
#define RH_REMOVE_EP 0x00
#define RH_ACK 0x01
#define RH_REQ_ERR -1
#define RH_NACK 0x00
/* Field definitions for */
#define USB_IN_command__eol__BITNR 0 /* command macros */
#define USB_IN_command__eol__WIDTH 1
#define USB_IN_command__eol__no 0
#define USB_IN_command__eol__yes 1
#define USB_IN_command__intr__BITNR 3
#define USB_IN_command__intr__WIDTH 1
#define USB_IN_command__intr__no 0
#define USB_IN_command__intr__yes 1
#define USB_IN_status__eop__BITNR 1 /* status macros. */
#define USB_IN_status__eop__WIDTH 1
#define USB_IN_status__eop__no 0
#define USB_IN_status__eop__yes 1
#define USB_IN_status__eot__BITNR 5
#define USB_IN_status__eot__WIDTH 1
#define USB_IN_status__eot__no 0
#define USB_IN_status__eot__yes 1
#define USB_IN_status__error__BITNR 6
#define USB_IN_status__error__WIDTH 1
#define USB_IN_status__error__no 0
#define USB_IN_status__error__yes 1
#define USB_IN_status__nodata__BITNR 7
#define USB_IN_status__nodata__WIDTH 1
#define USB_IN_status__nodata__no 0
#define USB_IN_status__nodata__yes 1
#define USB_IN_status__epid__BITNR 8
#define USB_IN_status__epid__WIDTH 5
#define USB_EP_command__eol__BITNR 0
#define USB_EP_command__eol__WIDTH 1
#define USB_EP_command__eol__no 0
#define USB_EP_command__eol__yes 1
#define USB_EP_command__eof__BITNR 1
#define USB_EP_command__eof__WIDTH 1
#define USB_EP_command__eof__no 0
#define USB_EP_command__eof__yes 1
#define USB_EP_command__intr__BITNR 3
#define USB_EP_command__intr__WIDTH 1
#define USB_EP_command__intr__no 0
#define USB_EP_command__intr__yes 1
#define USB_EP_command__enable__BITNR 4
#define USB_EP_command__enable__WIDTH 1
#define USB_EP_command__enable__no 0
#define USB_EP_command__enable__yes 1
#define USB_EP_command__hw_valid__BITNR 5
#define USB_EP_command__hw_valid__WIDTH 1
#define USB_EP_command__hw_valid__no 0
#define USB_EP_command__hw_valid__yes 1
#define USB_EP_command__epid__BITNR 8
#define USB_EP_command__epid__WIDTH 5
#define USB_SB_command__eol__BITNR 0 /* command macros. */
#define USB_SB_command__eol__WIDTH 1
#define USB_SB_command__eol__no 0
#define USB_SB_command__eol__yes 1
#define USB_SB_command__eot__BITNR 1
#define USB_SB_command__eot__WIDTH 1
#define USB_SB_command__eot__no 0
#define USB_SB_command__eot__yes 1
#define USB_SB_command__intr__BITNR 3
#define USB_SB_command__intr__WIDTH 1
#define USB_SB_command__intr__no 0
#define USB_SB_command__intr__yes 1
#define USB_SB_command__tt__BITNR 4
#define USB_SB_command__tt__WIDTH 2
#define USB_SB_command__tt__zout 0
#define USB_SB_command__tt__in 1
#define USB_SB_command__tt__out 2
#define USB_SB_command__tt__setup 3
#define USB_SB_command__rem__BITNR 8
#define USB_SB_command__rem__WIDTH 6
#define USB_SB_command__full__BITNR 6
#define USB_SB_command__full__WIDTH 1
#define USB_SB_command__full__no 0
#define USB_SB_command__full__yes 1
#endif

View File

@ -1,74 +0,0 @@
Index: linux-2.6.25.16/arch/cris/arch-v10/drivers/ds1302.c
===================================================================
--- linux-2.6.25.16.o/arch/cris/arch-v10/drivers/ds1302.c 2008-10-26 15:54:02.000000000 +0100
+++ linux-2.6.25.16/arch/cris/arch-v10/drivers/ds1302.c 2008-10-26 15:59:37.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/delay.h>
#include <linux/bcd.h>
#include <linux/capability.h>
+#include <linux/device.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -489,6 +490,10 @@
return 0;
}
+#ifdef CONFIG_SYSFS
+static struct class *rtc_class;
+#endif
+
static int __init ds1302_register(void)
{
ds1302_init();
@@ -497,6 +502,12 @@
ds1302_name, RTC_MAJOR_NR);
return -1;
}
+ #ifdef CONFIG_SYSFS
+ rtc_class = class_create(THIS_MODULE, "rtc");
+ class_device_create(rtc_class, NULL, MKDEV(RTC_MAJOR_NR, 0),
+ NULL, "rtc");
+ #endif
+
return 0;
}
Index: linux-2.6.25.16/arch/cris/arch-v10/drivers/gpio.c
===================================================================
--- linux-2.6.25.16.o/arch/cris/arch-v10/drivers/gpio.c 2008-10-26 15:56:28.000000000 +0100
+++ linux-2.6.25.16/arch/cris/arch-v10/drivers/gpio.c 2008-10-26 15:57:41.000000000 +0100
@@ -20,6 +20,7 @@
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/device.h>
#include <asm/etraxgpio.h>
#include <asm/arch/svinto.h>
@@ -768,6 +769,10 @@
/* main driver initialization routine, called from mem.c */
+#ifdef CONFIG_SYSFS
+static struct class *gpio_class;
+#endif
+
static int __init gpio_init(void)
{
int res;
@@ -781,6 +786,13 @@
return res;
}
+#ifdef CONFIG_SYSFS
+ gpio_class = class_create(THIS_MODULE, "gpio");
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 0), NULL, "gpioa");
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 1), NULL, "gpiob");
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 2), NULL, "leds");
+ class_device_create(gpio_class, NULL, MKDEV(GPIO_MAJOR, 3), NULL, "gpiog");
+#endif
/* Clear all leds */
#if defined (CONFIG_ETRAX_CSP0_LEDS) || defined (CONFIG_ETRAX_PA_LEDS) || defined (CONFIG_ETRAX_PB_LEDS)
CRIS_LED_NETWORK_SET(0);

View File

@ -1,302 +0,0 @@
--- a/arch/cris/Makefile
+++ b/arch/cris/Makefile
@@ -33,7 +33,7 @@ endif
LD = $(CROSS_COMPILE)ld -mcrislinux
-OBJCOPYFLAGS := -O binary -R .note -R .comment -S
+OBJCOPYFLAGS := -O binary -R .bss -R .note -R .note.gnu.build-id -R .comment -S
CPPFLAGS_vmlinux.lds = -DDRAM_VIRTUAL_BASE=0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)
--- a/arch/cris/arch-v10/boot/Makefile
+++ b/arch/cris/arch-v10/boot/Makefile
@@ -2,9 +2,6 @@
# arch/cris/arch-v10/boot/Makefile
#
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
-
subdir- := compressed rescue
targets := Image
@@ -14,7 +11,6 @@ $(obj)/Image: vmlinux FORCE
$(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 $< $@
--- a/arch/cris/arch-v10/boot/compressed/Makefile
+++ b/arch/cris/arch-v10/boot/compressed/Makefile
@@ -2,13 +2,9 @@
# arch/cris/arch-v10/boot/compressed/Makefile
#
-CC = gcc-cris -melf $(LINUXINCLUDE)
ccflags-y += -O2
-LD = ld-cris
ldflags-y += -T $(obj)/decompress.ld
OBJECTS = $(obj)/head.o $(obj)/misc.o
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
quiet_cmd_image = BUILD $@
cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
@@ -21,12 +17,6 @@
$(obj)/decompress.bin: $(obj)/decompress.o FORCE
$(call if_changed,objcopy)
-$(obj)/head.o: $(obj)/head.S .config
- @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
-
-$(obj)/misc.o: $(obj)/misc.c .config
- @$(CC) -D__KERNEL__ -c $< -o $@
-
$(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
$(call if_changed,image)
--- a/arch/cris/arch-v10/boot/compressed/decompress.ld
+++ b/arch/cris/arch-v10/boot/compressed/decompress.ld
@@ -1,4 +1,4 @@
-OUTPUT_FORMAT(elf32-us-cris)
+OUTPUT_FORMAT(elf32-cris)
MEMORY
{
--- a/arch/cris/arch-v10/boot/compressed/head.S
+++ b/arch/cris/arch-v10/boot/compressed/head.S
@@ -10,13 +10,14 @@
#define ASSEMBLER_MACROS_ONLY
#include <asm/arch/sv_addr_ag.h>
+#include <linux/autoconf.h>
#define RAM_INIT_MAGIC 0x56902387
#define COMMAND_LINE_MAGIC 0x87109563
;; Exported symbols
- .globl _input_data
+ .globl input_data
.text
@@ -26,7 +27,7 @@
;; We need to initialze DRAM registers before we start using the DRAM
- cmp.d RAM_INIT_MAGIC, r8 ; Already initialized?
+ cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized?
beq dram_init_finished
nop
@@ -36,91 +37,91 @@ dram_init_finished:
;; Initiate the PA and PB ports
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0
- move.b r0, [R_PORT_PA_DATA]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0
+ move.b $r0, [R_PORT_PA_DATA]
- move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0
- move.b r0, [R_PORT_PA_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0
+ move.b $r0, [R_PORT_PA_DIR]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0
- move.b r0, [R_PORT_PB_DATA]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0
+ move.b $r0, [R_PORT_PB_DATA]
- move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0
- move.b r0, [R_PORT_PB_DIR]
+ move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0
+ move.b $r0, [R_PORT_PB_DIR]
;; Setup the stack to a suitably high address.
;; We assume 8 MB is the minimum DRAM in an eLinux
;; product and put the sp at the top for now.
- move.d 0x40800000, sp
+ move.d 0x40800000, $sp
;; Figure out where the compressed piggyback image is
;; in the flash (since we wont try to copy it to DRAM
;; before unpacking). It is at _edata, but in flash.
;; Use (_edata - basse) as offset to the current PC.
-basse: move.d pc, r5
- and.d 0x7fffffff, r5 ; strip any non-cache bit
- subq 2, r5 ; compensate for the move.d pc instr
- move.d r5, r0 ; save for later - flash address of 'basse'
- add.d _edata, r5
- sub.d basse, r5 ; r5 = flash address of '_edata'
+basse: move.d $pc, $r5
+ and.d 0x7fffffff, $r5 ; strip any non-cache bit
+ subq 2, $r5 ; compensate for the move.d pc instr
+ move.d $r5, $r0 ; save for later - flash address of 'basse'
+ add.d _edata, $r5
+ sub.d basse, $r5 ; r5 = flash address of '_edata'
;; Copy text+data to DRAM
- move.d basse, r1 ; destination
- move.d _edata, r2 ; end destination
-1: move.w [r0+], r3
- move.w r3, [r1+]
- cmp.d r2, r1
+ move.d basse, $r1 ; destination
+ move.d _edata, $r2 ; end destination
+1: move.w [$r0+], $r3
+ move.w $r3, [$r1+]
+ cmp.d $r2, $r1
bcs 1b
nop
- move.d r5, [_input_data] ; for the decompressor
+ move.d $r5, [input_data] ; for the decompressor
;; Clear the decompressors BSS (between _edata and _end)
- moveq 0, r0
- move.d _edata, r1
- move.d _end, r2
-1: move.w r0, [r1+]
- cmp.d r2, r1
+ moveq 0, $r0
+ move.d _edata, $r1
+ move.d _end, $r2
+1: move.w $r0, [$r1+]
+ cmp.d $r2, $r1
bcs 1b
nop
;; Save command line magic and address.
- move.d _cmd_line_magic, $r12
+ move.d cmd_line_magic, $r12
move.d $r10, [$r12]
- move.d _cmd_line_addr, $r12
+ move.d cmd_line_addr, $r12
move.d $r11, [$r12]
;; Do the decompression and save compressed size in _inptr
- jsr _decompress_kernel
+ jsr decompress_kernel
;; Put start address of root partition in r9 so the kernel can use it
;; when mounting from flash
- move.d [_input_data], r9 ; flash address of compressed kernel
- add.d [_inptr], r9 ; size of compressed kernel
+ move.d [input_data], $r9 ; flash address of compressed kernel
+ add.d [inptr], $r9 ; size of compressed kernel
;; Restore command line magic and address.
- move.d _cmd_line_magic, $r10
+ move.d cmd_line_magic, $r10
move.d [$r10], $r10
- move.d _cmd_line_addr, $r11
+ move.d cmd_line_addr, $r11
move.d [$r11], $r11
;; Enter the decompressed kernel
- move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized
+ move.d RAM_INIT_MAGIC, $r8 ; Tell kernel that DRAM is initialized
jump 0x40004000 ; kernel is linked to this address
.data
-_input_data:
+input_data:
.dword 0 ; used by the decompressor
-_cmd_line_magic:
+cmd_line_magic:
.dword 0
-_cmd_line_addr:
+cmd_line_addr:
.dword 0
#include "../../lib/hw_settings.S"
--- a/arch/cris/arch-v10/boot/compressed/misc.c
+++ b/arch/cris/arch-v10/boot/compressed/misc.c
@@ -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,12 +99,12 @@ static void error(char *m);
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 */
-extern int end;
-static long free_mem_ptr = (long)&end;
+extern int _end;
+static long free_mem_ptr = (long)&_end;
#include "../../../../../lib/inflate.c"
@@ -139,7 +139,7 @@ static void gzip_release(void **ptr)
/* 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 @@ flush_window()
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 @@ decompress_kernel()
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");
}
--- a/arch/cris/arch-v10/mm/init.c
+++ b/arch/cris/arch-v10/mm/init.c
@@ -184,6 +184,9 @@ paging_init(void)
free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
}
+void free_initrd_mem(unsigned long start, unsigned long end)
+{
+}
/* Initialize remaps of some I/O-ports. It is important that this
* is called before any driver is initialized.

View File

@ -1,11 +0,0 @@
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -1707,7 +1707,7 @@ e100_set_network_leds(int active)
static void
e100_netpoll(struct net_device* netdev)
{
- e100rxtx_interrupt(NETWORK_DMA_TX_IRQ_NBR, netdev, NULL);
+ e100rxtx_interrupt(NETWORK_DMA_TX_IRQ_NBR, netdev);
}
#endif

View File

@ -1,11 +0,0 @@
--- a/include/asm-cris/Kbuild
+++ b/include/asm-cris/Kbuild
@@ -1,7 +1,6 @@
include include/asm-generic/Kbuild.asm
-header-$(CONFIG_ETRAX_ARCH_V10) += arch-v10/
-header-$(CONFIG_ETRAX_ARCH_V32) += arch-v32/
+header-y += arch-v10/ arch-v32/
header-y += ethernet.h
header-y += rtc.h

View File

@ -1,13 +0,0 @@
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -297,8 +297,8 @@ struct mtd_info *cfi_cmdset_0002(struct
return NULL;
}
- if (extp->MajorVersion != '1' ||
- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
+ if (extp->MajorVersion < '0' || extp->MajorVersion > '3' ||
+ (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
if (cfi->mfr == MANUFACTURER_SAMSUNG &&
(extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
printk(KERN_NOTICE " Newer Samsung flash detected, "

View File

@ -1,88 +0,0 @@
--- a/arch/cris/arch-v10/lib/hw_settings.S
+++ b/arch/cris/arch-v10/lib/hw_settings.S
@@ -60,3 +60,5 @@
.dword R_PORT_PB_SET
.dword PB_SET_VALUE
.dword 0 ; No more register values
+ .ascii "ACME_PART_MAGIC"
+ .dword 0xdeadc0de
--- a/arch/cris/arch-v10/drivers/axisflashmap.c
+++ b/arch/cris/arch-v10/drivers/axisflashmap.c
@@ -113,7 +113,7 @@ static struct map_info map_cse1 = {
/* If no partition-table was found, we use this default-set. */
#define MAX_PARTITIONS 7
-#define NUM_DEFAULT_PARTITIONS 3
+#define NUM_DEFAULT_PARTITIONS 2
/*
* Default flash size is 2MB. CONFIG_ETRAX_PTABLE_SECTOR is most likely the
@@ -122,19 +122,14 @@ static struct map_info map_cse1 = {
*/
static struct mtd_partition axis_default_partitions[NUM_DEFAULT_PARTITIONS] = {
{
- .name = "boot firmware",
- .size = CONFIG_ETRAX_PTABLE_SECTOR,
- .offset = 0
- },
- {
.name = "kernel",
- .size = 0x200000 - (6 * CONFIG_ETRAX_PTABLE_SECTOR),
- .offset = CONFIG_ETRAX_PTABLE_SECTOR
+ .size = 0x00,
+ .offset = 0
},
{
- .name = "filesystem",
- .size = 5 * CONFIG_ETRAX_PTABLE_SECTOR,
- .offset = 0x200000 - (5 * CONFIG_ETRAX_PTABLE_SECTOR)
+ .name = "rootfs",
+ .size = 0x200000 ,
+ .offset = 0x200000
}
};
@@ -281,6 +276,11 @@ static int __init init_axis_flash(void)
struct partitiontable_entry *ptable;
int use_default_ptable = 1; /* Until proven otherwise. */
const char pmsg[] = " /dev/flash%d at 0x%08x, size 0x%08x\n";
+ unsigned int kernel_part_size = 0;
+ unsigned char *flash_mem = (unsigned char*)(FLASH_CACHED_ADDR);
+ unsigned int flash_scan_count = 0;
+ const char *part_magic = "ACME_PART_MAGIC";
+ unsigned int magic_len = strlen(part_magic);
if (!(mymtd = flash_probe())) {
/* There's no reason to use this module if no flash chip can
@@ -292,6 +292,31 @@ static int __init init_axis_flash(void)
mymtd->name, mymtd->size);
axisflash_mtd = mymtd;
}
+ /* scan flash to findout where out partition starts */
+
+ printk(KERN_INFO "Scanning flash for end of kernel magic\n");
+ for(flash_scan_count = 0; flash_scan_count < 100000; flash_scan_count++){
+ if(strncmp(&flash_mem[flash_scan_count], part_magic, magic_len - 1) == 0)
+ {
+ kernel_part_size = flash_mem[flash_scan_count + magic_len ];
+ kernel_part_size <<= 8;
+ kernel_part_size += flash_mem[flash_scan_count + magic_len + 2];
+ kernel_part_size <<= 8;
+ kernel_part_size += flash_mem[flash_scan_count + magic_len + 1];
+ kernel_part_size <<= 8;
+ kernel_part_size += flash_mem[flash_scan_count + magic_len + 3];
+ printk(KERN_INFO "Kernel ends at 0x%.08X\n", kernel_part_size);
+ flash_scan_count = 1100000;
+ }
+ }
+
+
+ if(kernel_part_size){
+ kernel_part_size = (kernel_part_size & 0xffff0000);
+ axis_default_partitions[0].size = kernel_part_size;
+ axis_default_partitions[1].size = mymtd->size - axis_default_partitions[0].size;
+ axis_default_partitions[1].offset = axis_default_partitions[0].size;
+ }
if (mymtd) {
mymtd->owner = THIS_MODULE;

View File

@ -1,43 +0,0 @@
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -27,6 +27,7 @@ static char *serial_version = "$Revision
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/bitops.h>
+#include <linux/device.h>
#include <asm/io.h>
#include <asm/irq.h>
@@ -4384,6 +4385,7 @@ static const struct tty_operations rs_op
.tiocmset = rs_tiocmset
};
+static struct class *rs_class;
static int __init
rs_init(void)
{
@@ -4518,6 +4520,24 @@ rs_init(void)
#endif
#endif /* CONFIG_SVINTO_SIM */
+ rs_class = class_create(THIS_MODULE, "rs_tty");
+#ifdef CONFIG_ETRAX_SERIAL_PORT0
+ class_device_create(rs_class, NULL,
+ MKDEV(TTY_MAJOR, 64), NULL, "ttyS0");
+#endif
+#ifdef CONFIG_ETRAX_SERIAL_PORT1
+ class_device_create(rs_class, NULL,
+ MKDEV(TTY_MAJOR, 65), NULL, "ttyS1");
+#endif
+#ifdef CONFIG_ETRAX_SERIAL_PORT2
+ class_device_create(rs_class, NULL,
+ MKDEV(TTY_MAJOR, 66), NULL, "ttyS2");
+#endif
+#ifdef CONFIG_ETRAX_SERIAL_PORT3
+ class_device_create(rs_class, NULL,
+ MKDEV(TTY_MAJOR, 67), NULL, "ttyS3");
+#endif
+
return 0;
}

View File

@ -1,33 +0,0 @@
diff -Naur linux-2.6.26/drivers/usb/host/Makefile os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/host/Makefile
--- linux-2.6.26/drivers/usb/host/Makefile 2008-07-13 23:51:29.000000000 +0200
+++ os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/host/Makefile 2008-08-21 10:39:44.000000000 +0200
@@ -16,6 +16,7 @@
obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o
obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o
obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o
+obj-$(CONFIG_ETRAX_ARCH_V10) += hc-crisv10.o
obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o
obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
obj-$(CONFIG_USB_ISP1760_HCD) += isp1760.o
diff -Naur linux-2.6.26/drivers/usb/Kconfig os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/Kconfig
--- linux-2.6.26/drivers/usb/Kconfig 2008-07-13 23:51:29.000000000 +0200
+++ os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/Kconfig 2008-06-10 11:18:30.000000000 +0200
@@ -21,6 +21,7 @@
default y if USB_ARCH_HAS_EHCI
default y if PCMCIA && !M32R # sl811_cs
default y if ARM # SL-811
+ default y if ETRAXFS
default y if SUPERH # r8a66597-hcd
default PCI
diff -Naur linux-2.6.26/drivers/usb/Makefile os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/Makefile
--- linux-2.6.26/drivers/usb/Makefile 2008-07-13 23:51:29.000000000 +0200
+++ os/linux-2.6-tag--devboard-R2_20-5/drivers/usb/Makefile 2008-10-01 10:56:43.000000000 +0200
@@ -16,6 +16,7 @@
obj-$(CONFIG_USB_SL811_HCD) += host/
obj-$(CONFIG_USB_U132_HCD) += host/
obj-$(CONFIG_USB_R8A66597_HCD) += host/
+obj-$(CONFIG_ETRAX_USB_HOST) += host/
obj-$(CONFIG_USB_C67X00_HCD) += c67x00/

View File

@ -1,16 +0,0 @@
Index: linux-2.6.25.20/arch/cris/Kconfig
===================================================================
--- linux-2.6.25.20.orig/arch/cris/Kconfig 2008-11-10 19:50:34.000000000 +0100
+++ linux-2.6.25.20/arch/cris/Kconfig 2009-01-30 13:03:46.000000000 +0100
@@ -660,6 +660,10 @@
source "drivers/ide/Kconfig"
+source "drivers/scsi/Kconfig"
+
+source "drivers/media/Kconfig"
+
source "drivers/net/Kconfig"
source "drivers/i2c/Kconfig"

View File

@ -1,45 +0,0 @@
Index: linux-2.6.25.20/arch/cris/arch-v10/drivers/Kconfig
===================================================================
--- linux-2.6.25.20.orig/arch/cris/arch-v10/drivers/Kconfig 2009-02-09 09:30:40.000000000 +0100
+++ linux-2.6.25.20/arch/cris/arch-v10/drivers/Kconfig 2009-02-09 21:23:12.000000000 +0100
@@ -450,11 +450,18 @@
i2c_arg = I2C_READARG(STA013_READ_ADDR, reg);
val = ioctl(fd, _IO(ETRAXI2C_IOCTYPE, I2C_READREG), i2c_arg);
+config ETRAX_I2C_GVC
+ bool "I2C GVC support"
+ depends on ETRAX_ARCH_V10 && !ETRAX_I2C
+ select ETRAX_I2C_USES_PB_NOT_PB_I2C
+ help
+ Enables an I2C driver with Geert Vancompernolle improvement.
+
# this is true for most products since PB-I2C seems to be somewhat
# flawed..
config ETRAX_I2C_USES_PB_NOT_PB_I2C
bool "I2C uses PB not PB-I2C"
- depends on ETRAX_I2C
+ depends on ETRAX_I2C || ETRAX_I2C_GVC
help
Select whether to use the special I2C mode in the PB I/O register or
not. This option needs to be selected in order to use some drivers
@@ -478,7 +485,7 @@
config ETRAX_I2C_EEPROM
bool "I2C EEPROM (non-volatile RAM) support"
- depends on ETRAX_I2C
+ depends on ETRAX_I2C || ETRAX_I2C_GVC
help
Enables I2C EEPROM (non-volatile RAM) on PB0 and PB1 using the I2C
driver. Select size option: Probed, 2k, 8k, 16k.
Index: linux-2.6.25.20/arch/cris/arch-v10/drivers/Makefile
===================================================================
--- linux-2.6.25.20.orig/arch/cris/arch-v10/drivers/Makefile 2009-02-09 09:30:41.000000000 +0100
+++ linux-2.6.25.20/arch/cris/arch-v10/drivers/Makefile 2009-02-09 09:35:39.000000000 +0100
@@ -4,6 +4,7 @@
obj-$(CONFIG_ETRAX_AXISFLASHMAP) += axisflashmap.o
obj-$(CONFIG_ETRAX_I2C) += i2c.o
+obj-$(CONFIG_ETRAX_I2C_GVC) += i2c_gvc.o
obj-$(CONFIG_ETRAX_I2C_EEPROM) += eeprom.o
obj-$(CONFIG_ETRAX_GPIO) += gpio.o
obj-$(CONFIG_ETRAX_DS1302) += ds1302.o

View File

@ -73,38 +73,7 @@ define Host/Prepare/lzma
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/ $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
endef endef
# XXX: the following are needed to build a cris toolchain define Host/Prepare/post/cris
ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,2.6.28)),1)
define Host/Prepare/pre/cris
ln -sf $(HOST_BUILD_DIR)/include/asm-cris/arch-v10 $(HOST_BUILD_DIR)/include/asm-cris/arch
ln -sf $(HOST_BUILD_DIR)/include/asm-cris/arch-v10 $(HOST_BUILD_DIR)/arch/cris/arch
endef
define Host/Prepare/post/cris
$(CP) \
$(HOST_BUILD_DIR)/include/linux/user.h \
$(HOST_BUILD_DIR)/include/linux/autoconf.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/linux/
$(CP) \
$(HOST_BUILD_DIR)/include/asm-cris/elf.h \
$(HOST_BUILD_DIR)/include/asm-cris/page.h \
$(HOST_BUILD_DIR)/include/asm-cris/user.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
$(CP) \
$(HOST_BUILD_DIR)/include/asm-generic/memory_model.h \
$(HOST_BUILD_DIR)/include/asm-generic/page.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm-generic/
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch
$(CP) \
$(HOST_BUILD_DIR)/include/asm-cris/arch/elf.h \
$(HOST_BUILD_DIR)/include/asm-cris/arch/page.h \
$(HOST_BUILD_DIR)/include/asm-cris/arch/ptrace.h \
$(HOST_BUILD_DIR)/include/asm-cris/arch/user.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch/
endef
else
define Host/Prepare/post/cris
$(CP) \ $(CP) \
$(HOST_BUILD_DIR)/include/linux/user.h \ $(HOST_BUILD_DIR)/include/linux/user.h \
$(HOST_BUILD_DIR)/include/linux/autoconf.h \ $(HOST_BUILD_DIR)/include/linux/autoconf.h \
@ -112,8 +81,7 @@ else
ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch-v10/arch \ ln -snf $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch-v10/arch \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/arch
$(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/user.h $(SED) '/#include <asm\/page\.h>/d' $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/user.h
endef endef
endif
define Host/Prepare/post/ubicom32 define Host/Prepare/post/ubicom32
$(CP) \ $(CP) \