diff -urN linux-2.6.18/arch/blackfin/Kconfig linux-2.6.18.patch1/arch/blackfin/Kconfig --- linux-2.6.18/arch/blackfin/Kconfig 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/Kconfig 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,840 @@ +config BF531 + bool "BF531" + help + BF531 Processor Support. help text should be indented 2 spaces more than the "help" keyword. +config BF532 + bool "BF532" + help + BF532 Processor Support. ditto +config BF533 + bool "BF533" + help + BF533 Processor Support. ditto +config BF534 + bool "BF534" + help + BF534 Processor Support. ditto +config BF535 + bool "BF535 (not supported)" + help + Not Supported - BF535 Processor Support. ditto +config BF536 + bool "BF536" + help + BF536 Processor Support. ditto +config BF537 + bool "BF537" + help + BF537 Processor Support. ditto +config BF561 + bool "BF561" + help + Not Supported Yet - Work in progress - BF561 Processor Support. ditto +endchoice + +choice + prompt "System type" + default BFIN533_STAMP + help + Do NOT change the board here, please use the top level configuration to ensure all line is too long. + all the other settings are correct end sentence with "." +config BFIN533_EZKIT + bool "BF533-EZKIT" + depends on (BF533 || BF532 || BF531) + help + BF533-EZKIT-LITE board Support. help text should be indented 2 spaces more than the "help" keyword. +config BFIN533_STAMP + bool "BF533-STAMP" + depends on (BF533 || BF532 || BF531) + help + BF533-STAMP board Support. help text should be indented 2 spaces more than the "help" keyword. +config BFIN561_EZKIT + bool "BF561-EZKIT" + depends on (BF561) + help + BF561-EZKIT-LITE board Support. help text should be indented 2 spaces more than the "help" keyword. +config GENERIC_BOARD + bool "Custom" + depends on (BF537 || BF536 || BF534 || BF561 || BF535 || BF533 || BF532 || BF531) + help + GENERIC or Custom board Support. ditto. +endchoice + +config BFIN_ALIVE_LED + bool "Enable Board Alive" + depends on ( BFIN533_STAMP || BFIN533_BLUETECHNIX_CM ) + default n + help + Blinks the LED you select when the kernel is running. Helps detect a hung kernel. line is too long. +config BFIN_ALIVE_LED_NUM + int "LED" + depends on BFIN_ALIVE_LED + range 1 3 if BFIN533_STAMP + range 1 2 if BFIN533_BLUETECHNIX_CM + default "3" if BFIN533_STAMP + default "1" if BFIN533_BLUETECHNIX_CM + help + Select the LED (marked on the board) for you to blink. + +config BFIN_IDLE_LED + bool 'Enable System Load/Idle LED' + depends on ( BFIN533_STAMP || BFIN533_BLUETECHNIX_CM ) No space after ( or before ). + default n + help + Blinks the LED you select when to determine kernel load. Hm, a little confusing. Maybe: Blinks the LED you select to show kernel busy/idle status. +config BFIN_IDLE_LED_NUM + int "LED" + depends on BFIN_IDLE_LED + range 1 3 if BFIN533_STAMP + range 1 2 if BFIN533_BLUETECHNIX_CM + default "2" if BFIN533_STAMP + default "2" if BFIN533_BLUETECHNIX_CM + help + Select the LED (marked on the board) for you to blink. + +config BFIN_ALIVE_LED_PIN + hex + default 0x04 if (BFIN533_STAMP && ( BFIN_ALIVE_LED_NUM = 1 )) + default 0x08 if (BFIN533_STAMP && ( BFIN_ALIVE_LED_NUM = 2 )) + default 0x10 if (BFIN533_STAMP && ( BFIN_ALIVE_LED_NUM = 3 )) + default 0x80 if (BFIN533_BLUETECHNIX_CM && ( BFIN_ALIVE_LED_NUM = 1 )) + default 0x40 if (BFIN533_BLUETECHNIX_CM && ( BFIN_IDLE_LED_NUM = 2 )) No space after ( or before ). +config BFIN_IDLE_LED_PORT + hex + default 0xFFC00700 if (BFIN533_STAMP) + default 0xFFC00700 if (BFIN533_BLUETECHNIX_CM) + +# Peripheral Flag Direction Register +config BFIN_IDLE_LED_DPORT + hex + default 0xFFC00730 if (BFIN533_STAMP) + default 0xFFC00730 if (BFIN533_BLUETECHNIX_CM) + +menu'EBIU_AMBCTL Global Control' space after "menu" +config C_AMCKEN + bool "Enable CLKOUT" + default y + +config C_CDPRIO + bool "DMA has priority over core for ext. accesses" + default n + +config C_B0PEN + depends on BF561 + bool "Bank 0 16 bit packing enable" + default y + +config C_B1PEN + depends on BF561 + bool "Bank 1 16 bit packing enable" + default y + +config C_B2PEN + depends on BF561 + bool "Bank 3 16 bit packing enable" Bank 2 or 3 ? + default y + +config C_B3PEN + depends on BF561 + bool "Bank 3 16 bit packing enable" + default n + +choice + prompt"Enable Asynchonous Memory Banks" + default C_AMBEN_ALL + +config C_AMBEN + bool "Disable All Banks" + +config C_AMBEN_B0 + bool "Enable Bank 0" + +config C_AMBEN_B0_B1 + bool "Enable Bank 0 & 1" + +config C_AMBEN_B0_B1_B2 + bool "Enable Bank 0 & 1 & 2" + +config C_AMBEN_ALL + bool "Enable All Banks" +endchoice +endmenu + +menu'EBIU_AMBCTL Control' add space after "menu". +config BANK_0 + hex "Bank 0" + default 0x7BB0 + +config BANK_1 + hex "Bank 1" + default 0x7BB0 + +config BANK_2 + hex "Bank 2" + default 0x7BB0 + +config BANK_3 + hex "Bank 3" + default 0x99B3 +endmenu + +endmenu + +############################################################################# + +config HOTPLUG + bool "Support for hot-pluggable device" + ---help--- + Say Y here if you want to plug devices into your computer while + the system is running, and be able to use them quickly. In many + cases, the devices can likewise be unplugged at any time too. + + One well known example of this is PCMCIA- or PC-cards, credit-card + size devices such as network cards, modems or hard drives which are + plugged into slots found on all modern laptop computers. Another + example, used on modern desktops as well as laptops, is USB. + + Enable HOTPLUG and KMOD, and build a modular kernel. Get agent + software (at ) and install it. + Then your kernel will automatically call out to a user mode "policy + agent" (/sbin/hotplug) to load modules and set up software needed + to use devices as you hotplug them. Just a comment + question: some environments no longer use hotplug. Do embedded platforms mostly still use it? +source "drivers/pcmcia/Kconfig" + +source "drivers/pci/hotplug/Kconfig" + +endmenu + +source "drivers/cpufreq/Kconfig" + +config CPU_FREQ + bool + default n + help + If you want to enable this option, you should select DPMC driver from Character Devices line is too long & needs to be indented 2 more spaces. +endmenu + +endif + +menu "Kernel hacking" + +source "lib/Kconfig.debug" + +config DUAL_CORE_TEST_MODULE + tristate "Dual Core Test Module" + depends on (BF561) + default n + help + Say Y here to build-in dual core test module for dual core test. why tristate? +config BOOTPARAM + bool 'Compiled-in Kernel Boot Parameter' + +config NO_ACCESS_CHECK + bool "Don't check the user pointer address" + help + Usually the pointer transfer from user space is checked to see if its + address is in the kernel space. This option disable that check to + improve the performance. ugh. Are embedded apps so well-tested that you can always trust them? +endmenu + +source "security/Kconfig" + +source "crypto/Kconfig" + +source "lib/Kconfig" diff -urN linux-2.6.18/arch/blackfin/Kconfig.ide linux-2.6.18.patch1/arch/blackfin/Kconfig.ide --- linux-2.6.18/arch/blackfin/Kconfig.ide 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/Kconfig.ide 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,88 @@ +# uClinux Blackfin Target Board Selection Menu (IDE) + +if (BFIN) +menu "IDE Extra configuration" + +config BFIN_IDE_IRQ + int "IDE IRQ no" looks like "no", so spell out "number" + depends on IDE + default "34" if BFIN537_STAMP + default "26" if BFIN533_STAMP + help + IDE use IRQ no IRQ_PROG_INTA + +config BFIN_IDE_IRQ_PFX + int "IDE IRQ PFx no" looks like "no", so spell out "number" + depends on IDE + default 55 + help + IDE IRQ use PFx + diff -urN linux-2.6.18/arch/blackfin/kernel/Makefile linux-2.6.18.patch1/arch/blackfin/kernel/Makefile --- linux-2.6.18/arch/blackfin/kernel/Makefile 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/kernel/Makefile 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,11 @@ +# +# arch/blackfin/kernel/Makefile +# + +extra-y := init_task.o vmlinux.lds + +obj-y := entry.o process.o bfin_ksyms.o ptrace.o setup.o signal.o sys_bfin.o time.o traps.o irqchip.o dma-mapping.o Split long lines using '\' for continuation. +obj-$(CONFIG_MODULES) += module.o +obj-$(CONFIG_BFIN_DMA_5XX) += bfin_dma_5xx.o +obj-$(CONFIG_DUAL_CORE_TEST_MODULE) += dualcore_test.o diff -urN linux-2.6.18/arch/blackfin/mach-bf533/Kconfig linux-2.6.18.patch1/arch/blackfin/mach-bf533/Kconfig --- linux-2.6.18/arch/blackfin/mach-bf533/Kconfig 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/mach-bf533/Kconfig 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,103 @@ +if (BF533 || BF532 || BF531) + + help + ------------------------- GENERAL HELP ------------------------- + Enter the priority numbers between 7-13 ONLY. Others are Reserved. + This applies to all the above.It is not recommended to assign the Space after "above.". + highest priority no 7 to UART or any other device. + +endmenu diff -urN linux-2.6.18/arch/blackfin/mach-bf537/Kconfig linux-2.6.18.patch1/arch/blackfin/mach-bf537/Kconfig --- linux-2.6.18/arch/blackfin/mach-bf537/Kconfig 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/mach-bf537/Kconfig 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,147 @@ +if (BF537 || BF534 || BF536) + +menu "BF537 Specific Configuration" + +config BF537_PORT_H + bool 'Select BF537/6/4 default GPIO PFx PORTH' + depends on (BF537 || BF536 || BF534) + help + Quick Hack for BF537/6/4 default GPIO PFx PORTH + Use only when Blackfin EMAC support issn't required isn't + +endchoice + +comment 'Interrupt Priority Assignment' +menu 'Priority' + +config IRQ_PLL_WAKEUP + int "IRQ_PLL_WAKEUP" + default 7 fix indentation + help + ------------------------- GENERAL HELP ------------------------- + Enter the priority numbers between 7-13 ONLY. Others are Reserved. + This applies to all the above.It is not recommended to assign the space after "above." + highest priority no 7 to UART or any other device. + +endmenu + +endmenu diff -urN linux-2.6.18/arch/blackfin/mach-bf561/Kconfig linux-2.6.18.patch1/arch/blackfin/mach-bf561/Kconfig --- linux-2.6.18/arch/blackfin/mach-bf561/Kconfig 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/mach-bf561/Kconfig 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,224 @@ +if BF561 + +menu "BF561 Specific Configuration" + +comment 'Core B Support' + +menu 'Core B Support' + +menu 'Priority' + + help + ------------------------- GENERAL HELP ------------------------- + + Enter the priority numbers between 7-13 ONLY. Others are Reserved. + This applies to all the above.It is not recommended to assign the space after "above." + highest priority no 7 to UART or any other device. + +endmenu diff -urN linux-2.6.18/arch/blackfin/oprofile/Kconfig linux-2.6.18.patch1/arch/blackfin/oprofile/Kconfig --- linux-2.6.18/arch/blackfin/oprofile/Kconfig 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/arch/blackfin/oprofile/Kconfig 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,29 @@ +menu "Profiling support" +depends on EXPERIMENTAL + +config PROFILING +bool "Profiling support (EXPERIMENTAL)" Indent bool one tab-stop. Indent "help" one tab-stop and help text one tab + 2 spaces. +help + Say Y here to enable the extended profiling support mechanisms used + by profilers such as OProfile. + + +config OPROFILE +tristate "OProfile system profiling (EXPERIMENTAL)" +depends on PROFILING Indent tristate and depends one tab-stop. +help as above for "help" + OProfile is a profiling system capable of profiling the + whole system, include the kernel, kernel modules, libraries, + and applications. + + If unsure, say N. + +config HARDWARE_PM +tristate "Hardware Performance Monitor Profiling" +depends on PROFILING Fix indents (or lack of). +help Ditto. + take use of hardware performance monitor to profiling the kernel and application. + + If unsure, say N. + +endmenu diff -urN linux-2.6.18/include/asm-blackfin/atomic.h linux-2.6.18.patch1/include/asm-blackfin/atomic.h --- linux-2.6.18/include/asm-blackfin/atomic.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/atomic.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,176 @@ +#ifndef __ARCH_BLACKFIN_ATOMIC__ +#define __ARCH_BLACKFIN_ATOMIC__ + +/* /** converts this to kernel-doc... + * atomic_inc_and_test - increment and test + * @v: pointer of type atomic_t + * + * Atomically increments @v by 1 + * and returns true if the result is zero, or false for all + * other cases. + */ +#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) + +#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0) +#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) + +#include + +#endif /* __ARCH_BLACKFIN_ATOMIC __ */ diff -urN linux-2.6.18/include/asm-blackfin/bf53x_timers.h linux-2.6.18.patch1/include/asm-blackfin/bf53x_timers.h --- linux-2.6.18/include/asm-blackfin/bf53x_timers.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/bf53x_timers.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,137 @@ + +typedef struct { + short config; + short empty1; + int counter; + int period; + int width; +} GPTIMER_timer_regs; Just use struct gptimer_regs e.g., not a typedef. +/* +** starting address 0xFFC0 0600 +** BF533 enable at address 0xFFC0 0640 +** BF537 enable at address 0xFFC0 0680 +*/ +typedef struct { Just use a struct, not a typedef. + GPTIMER_timer_regs a_timer[MAX_BLACKFIN_GPTIMERS]; + short enable; + short empty2; + short disable; + short empty3; +#ifdef CONFIG_BF537 + int status; +#else + short status; + short empty4; +#endif +} GPTIMER_registers; + +/******************************************************************************* +* GP_TIMER API's +*******************************************************************************/ + diff -urN linux-2.6.18/include/asm-blackfin/bfin-global.h linux-2.6.18.patch1/include/asm-blackfin/bfin-global.h --- linux-2.6.18/include/asm-blackfin/bfin-global.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/bfin-global.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,126 @@ +#define L1_INST_SRAM 0x00000001 +#define L1_DATA_A_SRAM 0x00000002 +#define L1_DATA_B_SRAM 0x00000004 +#define L1_DATA_SRAM 0x00000006 +extern void *sram_alloc_with_lsl(size_t, unsigned long); +extern int sram_free_with_lsl(const void *); We prefer to see data (variable, argument) names in function prototypes... +extern void led_on(int); +extern void led_off(int); +extern void led_toggle(int); +extern void led_disp_num(int); +extern void led_toggle_num(int); + +extern char *bfin_board_name __attribute__ ((weak)); +extern unsigned long wall_jiffies; +extern unsigned long memory_end; +extern unsigned long memory_mtd_end; +extern unsigned long memory_mtd_start; +extern unsigned long mtd_size; +extern unsigned long ipdt_table[]; +extern unsigned long dpdt_table[]; +extern unsigned long icplb_table[]; +extern unsigned long dcplb_table[]; + +extern unsigned long ipdt_swapcount_table[]; +extern unsigned long dpdt_swapcount_table[]; + +extern unsigned long table_start, table_end; + +extern struct file_operations dpmc_fops; +extern char _start; +extern unsigned long _ramstart, _ramend, _rambase; +extern unsigned long memory_start, memory_end; +extern unsigned long memory_mtd_end; +extern char _stext_l1[], _etext_l1[], _sdata_l1[], _edata_l1[], _sbss_l1[], + _ebss_l1[], _l1_lma_start[]; + +#endif + +#endif /* _BLACKFIN_H_ */ diff -urN linux-2.6.18/include/asm-blackfin/bfin_spi_channel.h linux-2.6.18.patch1/include/asm-blackfin/bfin_spi_channel.h --- linux-2.6.18/include/asm-blackfin/bfin_spi_channel.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/bfin_spi_channel.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,180 @@ +* SYNOPSIS: +* +* DESCRIPTION: It's driver of SPI in ADSP25535(ADI's DSP). It can +* only be used in unix or linux. +* CAUTION: User should use 'ioctl' to change it's its + configuration just after openning device. opening +typedef struct Spi_Device_t { Structs don't need to also be typedef-ed, so please change the struct to something like spi_device and drop the typedef. (+ Apply to any other similarly-named structs and typedefs.) + char *dev_name; + + unsigned short flag; + unsigned short bdrate; + + unsigned short enable; + unsigned short master; + unsigned short out_opendrain; + unsigned short polar; + unsigned short phase; + unsigned short byteorder; /* 0: MSB first; 1: LSB first; */ + unsigned short size; /* 0: 8 bits; 1: 16 bits */ + unsigned short emiso; + unsigned short send_zero; + unsigned short more_data; + unsigned short slave_sel; + unsigned short ti_mod; + + unsigned short dma; /* use dma mode or not */ + unsigned short dma_config; /* only valid if dma enabled */ + + irqreturn_t(*irq_handler) (int irq, void *dev_id, + struct pt_regs * regs); + void *priv_data; +} spi_device_t; + + +void spi_send_data(unsigned short data); +unsigned short spi_receive_data(void); +void spi_enable(spi_device_t * spi_dev); no space between * and , so make it "*spi_dev". Repeat below. +void spi_disable(spi_device_t * spi_dev); +int spi_dma_read(spi_device_t * spi_dev, void *buffer, unsigned int count); +int spi_dma_write(spi_device_t * spi_dev, void *buffer, unsigned int count); +void spi_clear_irqstat(spi_device_t * spi_dev); +void spi_set_ctl(spi_device_t * spi_dev); +void spi_get_stat(unsigned short *data); +void spi_get_ctl(unsigned short *data); +int spi_channel_request(spi_device_t * spi_dev); +int spi_channel_release(spi_device_t * spi_dev); + +#endif /* _SPI_CHANNEL_H_ */ diff -urN linux-2.6.18/include/asm-blackfin/bfin_sport.h linux-2.6.18.patch1/include/asm-blackfin/bfin_sport.h --- linux-2.6.18/include/asm-blackfin/bfin_sport.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/bfin_sport.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,176 @@ + +/* Function driver which use sport must initialize the structure */ s/use/uses/ +struct sport_config { + /*TDM (multichannels), I2S or other mode */ + unsigned int mode:3; + + /* if TDM mode is selected, channels must be set */ + int channels; /* Must be in 8 units */ + unsigned int frame_delay:4; /* Delay between frame sync pulse and first bit */ + + /* I2S mode */ + unsigned int right_first:1; /* Right stereo channel first */ + + /* In mormal mode, the following item need to be set */ + unsigned int lsb_first:1; /* order of transmit or receive data */ + unsigned int fsync:1; /* Frame sync required */ + unsigned int data_indep:1; /* data independent frame sync generated */ + unsigned int act_low:1; /* Active low TFS */ + unsigned int late_fsync:1; /* Late frame sync */ + unsigned int tckfe:1; + unsigned int sec_en:1; /* Secondary side enabled */ + + /* Choose clock source */ + unsigned int int_clk:1; /* Internal or external clock */ + + /* If external clock is used, the following fields are ignored */ + int serial_clk; + int fsync_clk; + + unsigned int data_format:2; /*Normal, u-law or a-law */ + + int word_len; /* How length of the word in bits, 3-32 bits */ + int dma_enabled; +}; + +struct sport_register { What are all of the volatiles for? Use of volatile usually indicates bad locking or bad memory barriers, etc., somewhere. + volatile unsigned short tcr1; + unsigned short reserved0; + volatile unsigned short tcr2; + unsigned short reserved1; + unsigned short tclkdiv; + unsigned short reserved2; + unsigned short tfsdiv; + unsigned short reserved3; + volatile unsigned long tx; + unsigned long reserved_l0; + volatile unsigned long rx; + unsigned long reserved_l1; + volatile unsigned short rcr1; + unsigned short reserved4; + volatile unsigned short rcr2; + unsigned short reserved5; + unsigned short rclkdiv; + unsigned short reserved6; + unsigned short rfsdiv; + unsigned short reserved7; + volatile unsigned short stat; + unsigned short reserved8; + unsigned short chnl; + unsigned short reserved9; + unsigned short mcmc1; + unsigned short reserved10; + unsigned short mcmc2; + unsigned short reserved11; + unsigned long mtcs0; + unsigned long mtcs1; + unsigned long mtcs2; + unsigned long mtcs3; + unsigned long mrcs0; + unsigned long mrcs1; + unsigned long mrcs2; + unsigned long mrcs3; +}; + +#define SPORT_IOC_MAGIC 'P' +#define SPORT_IOC_CONFIG _IOWR('P', 0x01, struct sport_config) + +/* Test purpose */ +#define ENABLE_AD73311 _IOWR('P', 0x02, int) + +struct sport_dev { + struct cdev cdev; /* Char device structure */ + + int sport_num; + + int dma_rx_chan; + int dma_tx_chan; + + int rx_irq; + unsigned char *rx_buf; /* Buffer store the received data */ + int rx_len; /* How many bytes will be received */ + int rx_received; /* How many bytes has been received */ + + int tx_irq; + const unsigned char *tx_buf; + int tx_len; + int tx_sent; + + int sport_err_irq; + + struct semaphore sem; /* mutual exclusion semaphore */ Use a mutex. + wait_queue_head_t waitq; + int wait_con; + struct sport_register *regs; + struct sport_config config; +}; + diff -urN linux-2.6.18/include/asm-blackfin/cacheflush.h linux-2.6.18.patch1/include/asm-blackfin/cacheflush.h --- linux-2.6.18/include/asm-blackfin/cacheflush.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/cacheflush.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,103 @@ + +extern void flush_instruction_cache(void); Please use arg identifiers in function prototypes. It helps make sense of them. +extern void blackfin_icache_dcache_flush_range(unsigned int, unsigned int); +extern void blackfin_icache_flush_range(unsigned int, unsigned int); +extern void blackfin_dcache_flush_range(unsigned int, unsigned int); +extern void blackfin_dcache_invalidate_range(unsigned int, unsigned int); +extern void blackfin_dflush_page(void *); +extern void flush_data_cache(void); + +static inline void flush_icache_range(unsigned start, unsigned end) +{ +#if defined( CONFIG_BLKFIN_DCACHE ) && defined( CONFIG_BLKFIN_CACHE ) + +#if defined( CONFIG_BLKFIN_WT ) + blackfin_icache_flush_range((start), (end)); +#else + blackfin_icache_dcache_flush_range((start), (end)); +#endif + +#else + +#if defined( CONFIG_BLKFIN_CACHE ) + blackfin_icache_flush_range((start), (end)); +#endif +#if defined( CONFIG_BLKFIN_DCACHE ) + blackfin_dcache_flush_range((start), (end)); +#endif + +#endif +} + +#if defined( CONFIG_BLKFIN_DCACHE ) Drop the spaces inside the parentheses. +#define invalidate_dcache_range(start,end) blackfin_dcache_invalidate_range((start), (end)) +#else +#define invalidate_dcache_range(start,end) do { } while (0) +#endif +#if defined( CONFIG_BLKFIN_DCACHE ) && defined( CONFIG_BLKFIN_WB ) Ditto. +# define flush_dcache_range(start,end) blackfin_dcache_flush_range((start), (end)) +# define flush_dcache_page(page) blackfin_dflush_page(page_address(page)) +#else +# define flush_dcache_range(start,end) do { } while (0) +# define flush_dcache_page(page) do { } while (0) +#endif + +static inline void flush_cache_all(void) +{ +#ifdef CONFIG_BLKFIN_CACHE + flush_instruction_cache(); +#endif +#ifdef CONFIG_BLKFIN_DCACHE + flush_data_cache(); +#endif +} + +#endif /* _BLACKFIN_CACHEFLUSH_H */ diff -urN linux-2.6.18/include/asm-blackfin/dma.h linux-2.6.18.patch1/include/asm-blackfin/dma.h --- linux-2.6.18/include/asm-blackfin/dma.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/dma.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,212 @@ + +#ifdef BFIN_DMA_DEBUG +#define DMA_DBG(fmt, args...) \ +do { printk("Blackfin DMA driver: "fmt, ##args);} while (0) +#else +#define DMA_DBG(fmt, args...) +#endif + +#ifdef BFIN_DMA_NDEBUG +#define assert(expr) do {} while(0) +#else +#define assert(expr) \ + if (!(expr)) { \ + printk("Assertion failed! %s, %s, %s, line=%d \n", \ + #expr, __FILE__,__FUNCTION__,__LINE__); \ + } +#endif + +typedef struct _dmasglarge_t { Not typedef. Just struct dmasg_large (e.g.). + unsigned long next_desc_addr; + unsigned long start_addr; + unsigned short cfg; + unsigned short x_count; + short x_modify; + unsigned short y_count; + short y_modify; +} dmasg_t; +#pragma pack() + +typedef struct { Just struct dma_register (or dma_registers). + unsigned long next_desc_ptr; /* DMA Next Descriptor Pointer register */ + unsigned long start_addr; /* DMA Start address register */ + + unsigned short cfg; /* DMA Configuration register */ + unsigned short dummy1; /* DMA Configuration register */ + + unsigned long reserved; + + unsigned short x_count; /* DMA x_count register */ + unsigned short dummy2; + + short x_modify; /* DMA x_modify register */ + unsigned short dummy3; + + unsigned short y_count; /* DMA y_count register */ + unsigned short dummy4; + + short y_modify; /* DMA y_modify register */ + unsigned short dummy5; + + unsigned long curr_desc_ptr; /* DMA Current Descriptor Pointer + register */ + unsigned short curr_addr_ptr_lo; /* DMA Current Address Pointer + register */ + unsigned short curr_addr_ptr_hi; /* DMA Current Address Pointer + register */ + unsigned short irq_status; /* DMA irq status register */ + unsigned short dummy6; + + unsigned short peripheral_map; /* DMA peripheral map register */ + unsigned short dummy7; + + unsigned short curr_x_count; /* DMA Current x-count register */ + unsigned short dummy8; + + unsigned long reserved2; + + unsigned short curr_y_count; /* DMA Current y-count register */ + unsigned short dummy9; + + unsigned long reserved3; + +} dma_register_t; + +typedef struct { struct dma_channel { + struct semaphore dmalock; + char *device_id; + dma_chan_status_t chan_status; + dma_register_t *regs; + dmasg_t *sg; /* large mode descriptor */ + unsigned int ctrl_num; /* controller number */ + dma_interrupt_t irq_callback; + void *data; + unsigned int dma_enable_flag; + unsigned int loopback_flag; +} dma_channel_t; + +//set large DMA mode descriptor +void set_dma_sg(unsigned int channel, dmasg_t * sg, int nr_sg); No space between * and sg. +//check if current channel is in use +int dma_channel_active(unsigned int channel); + +//common functions must be called in any mode Don't use C99-style // comments in Linux kernel. +void free_dma(unsigned int channel); //free resources +int dma_channel_active(unsigned int channel); //check if a channel is in use +void disable_dma(unsigned int channel); //disable +void enable_dma(unsigned int channel); //enable +int request_dma(unsigned int channel, char *device_id); +int set_dma_callback(unsigned int channel, dma_interrupt_t callback, + void *data); +void dma_disable_irq(unsigned int channel); +void dma_enable_irq(unsigned int channel); +void clear_dma_irqstat(unsigned int channel); +void *dma_memcpy(void *dest, const void *src, size_t count); +void *safe_dma_memcpy(void *dest, const void *src, size_t count); + +#endif diff -urN linux-2.6.18/include/asm-blackfin/dpmc.h linux-2.6.18.patch1/include/asm-blackfin/dpmc.h --- linux-2.6.18/include/asm-blackfin/dpmc.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/dpmc.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,66 @@ + Are the ioctls documented somewhere? Hint: They should be. See Documentation/ABI/README and Documentation/SubmitChecklist. +#define IOCTL_FULL_ON_MODE _IO('s', 0xA0) +#define IOCTL_ACTIVE_MODE _IO('s', 0xA1) +#define IOCTL_SLEEP_MODE _IO('s', 0xA2) +#define IOCTL_DEEP_SLEEP_MODE _IO('s', 0xA3) +#define IOCTL_HIBERNATE_MODE _IO('s', 0xA4) +#define IOCTL_CHANGE_FREQUENCY _IOW('s', 0xA5, unsigned long) +#define IOCTL_CHANGE_VOLTAGE _IOW('s', 0xA6, unsigned long) +#define IOCTL_SET_CCLK _IOW('s', 0xA7, unsigned long) +#define IOCTL_SET_SCLK _IOW('s', 0xA8, unsigned long) +#define IOCTL_GET_PLLSTATUS _IOW('s', 0xA9, unsigned long) +#define IOCTL_GET_CORECLOCK _IOW('s', 0xAA, unsigned long) +#define IOCTL_GET_SYSTEMCLOCK _IOW('s', 0xAB, unsigned long) +#define IOCTL_GET_VCO _IOW('s', 0xAC, unsigned long) +#define IOCTL_DISABLE_WDOG_TIMER _IO('s', 0xAD) +#define IOCTL_UNMASK_WDOG_WAKEUP_EVENT _IO('s',0xAE) +#define IOCTL_PROGRAM_WDOG_TIMER _IOW('s',0xAF,unsigned long) +#define IOCTL_CLEAR_WDOG_WAKEUP_EVENT _IO('s',0xB0) +#define IOCTL_SLEEP_DEEPER_MODE _IO('s',0xB1) + +unsigned long change_system_clock(unsigned long clock); +unsigned long change_core_clock(unsigned long clock); +unsigned long get_pll_status(void); +void change_baud(int baud); +void fullon_mode(void); +void active_mode(void); +void sleep_mode(u32 sic_iwr); +void deep_sleep(u32 sic_iwr); +void hibernate_mode(u32 sic_iwr); +void sleep_deeper(u32 sic_iwr); +void program_wdog_timer(unsigned long); Needs arg name. +void unmask_wdog_wakeup_evt(void); +void clear_wdog_wakeup_evt(void); +void disable_wdog_timer(void); + +extern unsigned long get_cclk(void); +extern unsigned long get_sclk(void); + +#endif /*_BLACKFIN_DPMC_H_*/ diff -urN linux-2.6.18/include/asm-blackfin/elf.h linux-2.6.18.patch1/include/asm-blackfin/elf.h --- linux-2.6.18/include/asm-blackfin/elf.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/elf.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,127 @@ +#ifdef __KERNEL__ +#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) Use the spacebar some. E.g.: +#define SET_PERSONALITY(ex, ibcs2) \ + set_personality((ibcs2) ? PER_SVR4 : PER_LINUX) +#endif + +#endif diff -urN linux-2.6.18/include/asm-blackfin/fcntl.h linux-2.6.18.patch1/include/asm-blackfin/fcntl.h --- linux-2.6.18/include/asm-blackfin/fcntl.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/fcntl.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,87 @@ + +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files s/blocks/block/ + located on an ext2 file system */ diff -urN linux-2.6.18/include/asm-blackfin/flat.h linux-2.6.18.patch1/include/asm-blackfin/flat.h --- linux-2.6.18/include/asm-blackfin/flat.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/flat.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,128 @@ + default: + printk("BINFMT_FLAT: Unknown relocation type %x\n", type); KERN_ level ? + return 0; + } +} + + put_unaligned(addr, usptr); +#ifdef DEBUG_BFIN_RELOC + printk(" new value %x at %p", get_unaligned(usptr), usptr); KERN_DEBUG +#endif + break; + + case FLAT_BFIN_RELOC_TYPE_16H_BIT: + put_unaligned(addr >> 16, usptr); +#ifdef DEBUG_BFIN_RELOC + printk(" new value %x", get_unaligned(usptr)); KERN_DEBUG +#endif + break; + + case FLAT_BFIN_RELOC_TYPE_32_BIT: + put_unaligned(addr, ptr); +#ifdef DEBUG_BFIN_RELOC + printk(" new ptr =%x", get_unaligned(ptr)); KERN_DEBUG +#endif + break; + } +} + +#endif /* __BLACKFIN_FLAT_H__ */ diff -urN linux-2.6.18/include/asm-blackfin/ioctls.h linux-2.6.18.patch1/include/asm-blackfin/ioctls.h --- linux-2.6.18/include/asm-blackfin/ioctls.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/ioctls.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,82 @@ Are these ioctls documented somewhere? +/* 0x54 is just a magic number to make these relatively unique ('T') */ + +#define TCGETS 0x5401 +#define TCSETS 0x5402 +#define TCSETSW 0x5403 +#define TCSETSF 0x5404 +#define TCGETA 0x5405 +#define TCSETA 0x5406 +#define TCSETAW 0x5407 +#define TCSETAF 0x5408 +#define TCSBRK 0x5409 +#define TCXONC 0x540A +#define TCFLSH 0x540B +#define TIOCEXCL 0x540C +#define TIOCNXCL 0x540D +#define TIOCSCTTY 0x540E +#define TIOCGPGRP 0x540F +#define TIOCSPGRP 0x5410 +#define TIOCOUTQ 0x5411 +#define TIOCSTI 0x5412 +#define TIOCGWINSZ 0x5413 +#define TIOCSWINSZ 0x5414 +#define TIOCMGET 0x5415 +#define TIOCMBIS 0x5416 +#define TIOCMBIC 0x5417 +#define TIOCMSET 0x5418 +#define TIOCGSOFTCAR 0x5419 +#define TIOCSSOFTCAR 0x541A +#define FIONREAD 0x541B +#define TIOCINQ FIONREAD +#define TIOCLINUX 0x541C +#define TIOCCONS 0x541D +#define TIOCGSERIAL 0x541E +#define TIOCSSERIAL 0x541F +#define TIOCPKT 0x5420 +#define FIONBIO 0x5421 +#define TIOCNOTTY 0x5422 +#define TIOCSETD 0x5423 +#define TIOCGETD 0x5424 +#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ +#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ +#define TIOCSBRK 0x5427 /* BSD compatibility */ +#define TIOCCBRK 0x5428 /* BSD compatibility */ +#define TIOCGSID 0x5429 /* Return the session ID of FD */ +#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ +#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ + +#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ +#define FIOCLEX 0x5451 +#define FIOASYNC 0x5452 +#define TIOCSERCONFIG 0x5453 +#define TIOCSERGWILD 0x5454 +#define TIOCSERSWILD 0x5455 +#define TIOCGLCKTRMIOS 0x5456 +#define TIOCSLCKTRMIOS 0x5457 +#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ +#define TIOCSERGETLSR 0x5459 /* Get line status register */ +#define TIOCSERGETMULTI 0x545A /* Get multiport config */ +#define TIOCSERSETMULTI 0x545B /* Set multiport config */ + +#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ +#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ + +#define FIOQSIZE 0x545E + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif /* __ARCH_BFIN_IOCTLS_H__ */ diff -urN linux-2.6.18/include/asm-blackfin/irq.h linux-2.6.18.patch1/include/asm-blackfin/irq.h --- linux-2.6.18/include/asm-blackfin/irq.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/irq.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,85 @@ +extern void sys_free_irq(unsigned int, void *); Prototype needs identifier names of args. +extern void ack_bad_irq(unsigned int irq); diff -urN linux-2.6.18/include/asm-blackfin/mach-bf533/anomaly.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/anomaly.h --- linux-2.6.18/include/asm-blackfin/mach-bf533/anomaly.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/anomaly.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,172 @@ +/* Issues that are commone to 0.5, 0.4, and 0.3 silicon */ common diff -urN linux-2.6.18/include/asm-blackfin/mach-bf533/bf533.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/bf533.h --- linux-2.6.18/include/asm-blackfin/mach-bf533/bf533.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/bf533.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,288 @@ +#ifndef _BLKFin_H_ +#define _BLKFin_H_ unCommon maCro name +#if(CONFIG_VCO_MULT > 64) space after "if" +#error "VCO Multiplier is more than 64. Please select a different value" +#endif + +#if (CONFIG_CCLK_DIV != 8) +#error "CCLK DIV can be 1,2,4 or 8 only.Please select a proper value" space after "only." +#endif +#endif +#endif +#endif + +#if (CONFIG_SCLK_HZ > 133000000) +#error "Sclk value selected is more than maximum.Please select a proper value for SCLK multiplier" space after "maximum." +#endif + +#if (CONFIG_SCLK_HZ < 27000000) +#error "Sclk value selected is less than minimum.Please select a proper value for SCLK multiplier" space after "minimum." diff -urN linux-2.6.18/include/asm-blackfin/mach-bf533/defBF532.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/defBF532.h --- linux-2.6.18/include/asm-blackfin/mach-bf533/defBF532.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/defBF532.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,1202 @@ General comment: We try to keep source code lines to <= 80 columns so that they fit in an xterm nicely. +#define DMA0_NEXT_DESC_PTR 0xFFC00C00 /* DMA Channel 0 Next Descriptor Pointer Register */ +#define DMA0_START_ADDR 0xFFC00C04 /* DMA Channel 0 Start Address Register */ diff -urN linux-2.6.18/include/asm-blackfin/mach-bf533/mem_init.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/mem_init.h --- linux-2.6.18/include/asm-blackfin/mach-bf533/mem_init.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf533/mem_init.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,314 @@ +#if ( CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_GENERIC_BOARD) no spaces inside the parens (above and below) +#if ( CONFIG_SCLK_HZ > 119402985 ) ... +#if ( CONFIG_SCLK_HZ > 104477612 ) && ( CONFIG_SCLK_HZ <= 119402985 ) +#if ( CONFIG_SCLK_HZ > 89552239 ) && ( CONFIG_SCLK_HZ <= 104477612 ) +#if ( CONFIG_SCLK_HZ > 74626866 ) && ( CONFIG_SCLK_HZ <= 89552239 ) +#if ( CONFIG_SCLK_HZ > 66666667 ) && ( CONFIG_SCLK_HZ <= 74626866 ) +#if ( CONFIG_SCLK_HZ > 59701493 ) && ( CONFIG_SCLK_HZ <= 66666667 ) +#if ( CONFIG_SCLK_HZ > 44776119 ) && ( CONFIG_SCLK_HZ <= 59701493 ) +#if ( CONFIG_SCLK_HZ > 29850746 ) && ( CONFIG_SCLK_HZ <= 44776119 ) +#if ( CONFIG_SCLK_HZ <= 29850746 ) + +#if ( CONFIG_MEM_SIZE == 128 ) +#if ( CONFIG_MEM_SIZE == 64 ) +#if ( CONFIG_MEM_SIZE == 32 ) +#if ( CONFIG_MEM_SIZE == 16 ) +#if ( CONFIG_MEM_ADD_WIDTH == 11 ) +#if ( CONFIG_MEM_ADD_WIDTH == 10 ) +#if ( CONFIG_MEM_ADD_WIDTH == 9 ) +#if ( CONFIG_MEM_ADD_WIDTH == 8 ) + +#define mem_SDRRC ((( CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) + +/* Enable SCLK Out */ +#define mem_SDGCTL ( SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS ) + +#define flash_EBIU_AMBCTL_WAT ( ( CONFIG_FLASH_SPEED_BWAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_RAT ( ( CONFIG_FLASH_SPEED_BRAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_HT ( ( CONFIG_FLASH_SPEED_BHT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) +#define flash_EBIU_AMBCTL_ST ( ( CONFIG_FLASH_SPEED_BST * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_TT ( ( CONFIG_FLASH_SPEED_BTT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 + +#if (flash_EBIU_AMBCTL_TT > 3 ) drop the space before ) +#if (flash_EBIU_AMBCTL_TT == 3 ) +#if (flash_EBIU_AMBCTL_TT == 2 ) +#if (flash_EBIU_AMBCTL_TT < 2 ) +#if (flash_EBIU_AMBCTL_ST > 3 ) +#if (flash_EBIU_AMBCTL_ST == 3 ) +#if (flash_EBIU_AMBCTL_ST == 2 ) +#if (flash_EBIU_AMBCTL_ST < 2 ) +#if (flash_EBIU_AMBCTL_HT > 2 ) +#if (flash_EBIU_AMBCTL_HT == 2 ) +#if (flash_EBIU_AMBCTL_HT == 1 ) diff -urN linux-2.6.18/include/asm-blackfin/mach-bf535/bf535.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/bf535.h --- linux-2.6.18/include/asm-blackfin/mach-bf535/bf535.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/bf535.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,1285 @@ +/* + * Typedefs + */ +typedef unsigned long UINT32; +typedef unsigned short UINT16; +typedef unsigned char UCHAR; Just use C99 types (typedefs :). +#define PCI_CFG_MAXL_ADDR 0xeeffff40 /* PCI config maximum latency cycles register 32 bit */ Lots of lines-too-long here. + /* These are total sixtenn */ sixteen (or 16) +#define DCPLB_ADDR_ADDR 0xffe00100 /* read/write register 32 bit */ +#define DCPLB_ADDR WORD_REF(DCPLB_ADDR_ADDR) + + /* These are total sixtenn */ sixteen (or 16) +#define CODE_FAULT_STATUS_ADDR 0xffe01008 /* read only register 32 bit */ +#define CODE_FAULT_STATUS WORD_REF(CODE_FAULT_STATUS_ADDR) +#define CODE_FAULT_ADDR_ADDR 0xffe0100c /* read only register 32 bit */ +#define CODE_FAULT_ADDR WORD_REF(CODE_FAULT_ADDR_ADDR) + + /* These are total sixtenn */ sixteen (or 16) +#define ICPLB_ADDR_ADDR 0xffe01100 /* read/write register 32 bit */ +#define ICPLB_ADDR WORD_REF(ICPLB_ADDR_ADDR) + + /* These are total sixtenn */ sixteen (or 16) +#define ICPLB_DATA_ADDR 0xffe01200 /* read/write register 32 bit */ +#define ICPLB_DATA WORD_REF(ICPLB_DATA_ADDR) diff -urN linux-2.6.18/include/asm-blackfin/mach-bf535/cdefBF535.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/cdefBF535.h --- linux-2.6.18/include/asm-blackfin/mach-bf535/cdefBF535.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/cdefBF535.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,121 @@ +// include core specific register pointer definitions Don't use C99-style // comments in Linux kernel. (multiple) diff -urN linux-2.6.18/include/asm-blackfin/mach-bf535/cdefblackfin.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/cdefblackfin.h --- linux-2.6.18/include/asm-blackfin/mach-bf535/cdefblackfin.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/cdefblackfin.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,69 @@ +// Cache & SRAM Memory Don't use C99-style // comments in Linux kernel. (multiple) diff -urN linux-2.6.18/include/asm-blackfin/mach-bf535/defBF535.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/defBF535.h --- linux-2.6.18/include/asm-blackfin/mach-bf535/defBF535.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/defBF535.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,1154 @@ +// Core MMRs Don't use C99-style // comments in Linux kernel. (multiple) +#define FLS1_P 0x00000001 // Enables (=1) SPI_FLOUT1 as flag output for SPI Slave-select lots of lines-too-long here. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf535/defblackfin.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/defblackfin.h --- linux-2.6.18/include/asm-blackfin/mach-bf535/defblackfin.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf535/defblackfin.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,444 @@ +#define MK_BMSK_( x ) (1< 64) space after "if" +#error "VCO Multiplier is more than 64. Please select a different value" +#endif + +#if (CONFIG_CCLK_DIV != 1) +#if (CONFIG_CCLK_DIV != 2) +#if (CONFIG_CCLK_DIV != 4) +#if (CONFIG_CCLK_DIV != 8) +#error "CCLK DIV can be 1,2,4 or 8 only.Please select a proper value" space after "only." +#endif +#endif +#endif +#endif + +#if(CONFIG_VCO_HZ > MAX_VC) space after "if" +#error "VCO selected is more than maximum value. Please change the VCO multipler" +#endif + +#if (CONFIG_SCLK_HZ > 133000000) +#error "Sclk value selected is more than maximum.Please select a proper value for SCLK multiplier" space after "maximum." +#endif + +#if (CONFIG_SCLK_HZ < 27000000) +#error "Sclk value selected is less than minimum.Please select a proper value for SCLK multiplier" space after "minimum." +#endif + +#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ) +#if(CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ) +#if(CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ) space after "if" (2 times) +#error "Please select sclk less than cclk" +#endif +#endif +#endif + +#ifndef CPU +#define CPU "UNKOWN" "UNKNOWN" +#endif + diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/cdefBF534.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/cdefBF534.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/cdefBF534.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/cdefBF534.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,1805 @@ + +/* Include all Core registers and bit definitions */ lots of lines-too-long here. +#include "defBF534.h" + +/* Include core specific register pointer definitions */ diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/cdefBF537.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/cdefBF537.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/cdefBF537.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/cdefBF537.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,209 @@ General comment: All of this file history is for the SCM to take care of. It shouldn't be in each source file. +/* + * File: include/asm-blackfin/mach-bf537/cdefBF537.h + * Based on: + * Author: + * + * Created: + * Description: + * System MMR Register Map + * Rev: + * + * Modified: + * + * Bugs: Enter bugs at http://blackfin.uclinux.org/ + */ + diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/defBF534.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/defBF534.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/defBF534.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/defBF534.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,2520 @@ +#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register */ lots of lines-too-long here. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/defBF537.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/defBF537.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/defBF537.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/defBF537.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,404 @@ lines too long (here and above/below): +** Disclaimer: All macros are intended to make C and Assembly code more readable. +** Use these macros carefully, as any that do left shifts for field +** depositing will result in the lower order bits being destroyed. Any +** macro that shifts left to properly position the bit-field should be +** used as part of an OR to initialize a register and NOT as a dynamic +** modifier UNLESS the lower order bits are saved and ORed back in when +** the macro is used. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/dma.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/dma.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/dma.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/dma.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,55 @@ +#define CH_MEM_STREAM0_DEST 12 // TX +#define CH_MEM_STREAM0_SRC 13 // RX +#define CH_MEM_STREAM1_DEST 14 // TX +#define CH_MEM_STREAM1_SRC 15 // RX Use /* style comments. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/mem_init.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/mem_init.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/mem_init.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/mem_init.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,328 @@ +#if ( CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_MT48LC16M8A2TG_75 || CONFIG_MEM_GENERIC_BOARD || CONFIG_MEM_MT48LC32M8A2_75) no space after ( +#if ( CONFIG_SCLK_HZ > 119402985 ) ditto and no space before ) +#define SDRAM_tRP TRP_2 +#define SDRAM_tRP_num 2 +#define SDRAM_tRAS TRAS_7 +#define SDRAM_tRAS_num 7 +#define SDRAM_tRCD TRCD_2 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 104477612 ) && ( CONFIG_SCLK_HZ <= 119402985 ) ditto and no space before ) +#define SDRAM_tRP TRP_2 +#define SDRAM_tRP_num 2 +#define SDRAM_tRAS TRAS_6 +#define SDRAM_tRAS_num 6 +#define SDRAM_tRCD TRCD_2 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 89552239 ) && ( CONFIG_SCLK_HZ <= 104477612 ) ditto +#define SDRAM_tRP TRP_2 +#define SDRAM_tRP_num 2 +#define SDRAM_tRAS TRAS_5 +#define SDRAM_tRAS_num 5 +#define SDRAM_tRCD TRCD_2 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 74626866 ) && ( CONFIG_SCLK_HZ <= 89552239 ) ditto +#define SDRAM_tRP TRP_2 +#define SDRAM_tRP_num 2 +#define SDRAM_tRAS TRAS_4 +#define SDRAM_tRAS_num 4 +#define SDRAM_tRCD TRCD_2 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 66666667 ) && ( CONFIG_SCLK_HZ <= 74626866 ) ditto +#define SDRAM_tRP TRP_2 +#define SDRAM_tRP_num 2 +#define SDRAM_tRAS TRAS_3 +#define SDRAM_tRAS_num 3 +#define SDRAM_tRCD TRCD_2 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 59701493 ) && ( CONFIG_SCLK_HZ <= 66666667 ) ditto +#define SDRAM_tRP TRP_1 +#define SDRAM_tRP_num 1 +#define SDRAM_tRAS TRAS_4 +#define SDRAM_tRAS_num 3 +#define SDRAM_tRCD TRCD_1 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 44776119 ) && ( CONFIG_SCLK_HZ <= 59701493 ) ditto +#define SDRAM_tRP TRP_1 +#define SDRAM_tRP_num 1 +#define SDRAM_tRAS TRAS_3 +#define SDRAM_tRAS_num 3 +#define SDRAM_tRCD TRCD_1 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ > 29850746 ) && ( CONFIG_SCLK_HZ <= 44776119 ) ditto +#define SDRAM_tRP TRP_1 +#define SDRAM_tRP_num 1 +#define SDRAM_tRAS TRAS_2 +#define SDRAM_tRAS_num 2 +#define SDRAM_tRCD TRCD_1 +#define SDRAM_tWR TWR_2 +#endif +#if ( CONFIG_SCLK_HZ <= 29850746 ) ditto +#define SDRAM_tRP TRP_1 +#define SDRAM_tRP_num 1 +#define SDRAM_tRAS TRAS_1 +#define SDRAM_tRAS_num 1 +#define SDRAM_tRCD TRCD_1 +#define SDRAM_tWR TWR_2 +#endif +#endif + +#if ( CONFIG_MEM_SIZE == 128 ) ditto +#define SDRAM_SIZE EBSZ_128 +#endif +#if ( CONFIG_MEM_SIZE == 64 ) ditto +#define SDRAM_SIZE EBSZ_64 +#endif +#if ( CONFIG_MEM_SIZE == 32 ) ditto +#define SDRAM_SIZE EBSZ_32 +#endif +#if ( CONFIG_MEM_SIZE == 16 ) ditto +#define SDRAM_SIZE EBSZ_16 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 11 ) ditto +#define SDRAM_WIDTH EBCAW_11 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 10 ) ditto +#define SDRAM_WIDTH EBCAW_10 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 9 ) ditto +#define SDRAM_WIDTH EBCAW_9 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 8 ) ditto +#define SDRAM_WIDTH EBCAW_8 +#endif + +#define mem_SDBCTL SDRAM_WIDTH | SDRAM_SIZE | EBE Parens around the expression on the right. +/* Enable SCLK Out */ +#define mem_SDGCTL ( SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS ) no space after ( or before ) +/***************************************Currently Not Being Used *********************************/ lines too long here. +#define flash_EBIU_AMBCTL_WAT ( ( CONFIG_FLASH_SPEED_BWAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_RAT ( ( CONFIG_FLASH_SPEED_BRAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_HT ( ( CONFIG_FLASH_SPEED_BHT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) +#define flash_EBIU_AMBCTL_ST ( ( CONFIG_FLASH_SPEED_BST * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_TT ( ( CONFIG_FLASH_SPEED_BTT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 + +#if (flash_EBIU_AMBCTL_TT > 3 ) no space before ) [and more below] +#define flash_EBIU_AMBCTL0_TT B0TT_4 +#endif +#if (flash_EBIU_AMBCTL_TT == 3 ) +#define flash_EBIU_AMBCTL0_TT B0TT_3 +#endif +#if (flash_EBIU_AMBCTL_TT == 2 ) +#define flash_EBIU_AMBCTL0_TT B0TT_2 +#endif +#if (flash_EBIU_AMBCTL_TT < 2 ) +#define flash_EBIU_AMBCTL0_TT B0TT_1 +#endif + +#if (flash_EBIU_AMBCTL_ST > 3 ) +#define flash_EBIU_AMBCTL0_ST B0ST_4 +#endif +#if (flash_EBIU_AMBCTL_ST == 3 ) +#define flash_EBIU_AMBCTL0_ST B0ST_3 +#endif +#if (flash_EBIU_AMBCTL_ST == 2 ) +#define flash_EBIU_AMBCTL0_ST B0ST_2 +#endif +#if (flash_EBIU_AMBCTL_ST < 2 ) +#define flash_EBIU_AMBCTL0_ST B0ST_1 +#endif + +#if (flash_EBIU_AMBCTL_HT > 2 ) +#define flash_EBIU_AMBCTL0_HT B0HT_3 +#endif +#if (flash_EBIU_AMBCTL_HT == 2 ) +#define flash_EBIU_AMBCTL0_HT B0HT_2 +#endif +#if (flash_EBIU_AMBCTL_HT == 1 ) +#define flash_EBIU_AMBCTL0_HT B0HT_1 +#endif + +#define flash_EBIU_AMBCTL0 flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN Parens around the expression on the right. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf537/mem_map.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/mem_map.h --- linux-2.6.18/include/asm-blackfin/mach-bf537/mem_map.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf537/mem_map.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,143 @@ +#define COREMMR_BASE 0xFFE00000 // Core MMRs +#define SYSMMR_BASE 0xFFC00000 // System MMRs No // style comments. Use /* ... */ instead. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/anomaly.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/anomaly.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/anomaly.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/anomaly.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,182 @@ +/* Issues that are commone to 0.5 and 0.3 silicon */ common +#if (defined(CONFIG_BF_REV_0_3)) Drop extra (outer) parens. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/bf561.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/bf561.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/bf561.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/bf561.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,378 @@ +#ifndef __ADSPLPBLACKFIN__ +#ifndef _BLKFin_H_ +#define _BLKFin_H_ Just use _BLKFIN_H_ +#define OFFSET_( x ) ((x) & 0x0000FFFF) /* define macro for offset */ No spaces inside first sets of parens. Drop the obvious comment. +/* Miscellaneous Values */ or useless +#define ZERO 0x0 +#if (CONFIG_CCLK_DIV != 1) +#if (CONFIG_CCLK_DIV != 2) +#if (CONFIG_CCLK_DIV != 4) +#if (CONFIG_CCLK_DIV != 8) +#error "CCLK DIV can be 1,2,4 or 8 only.Please select a proper value" space after "only." +#if(CONFIG_VCO_HZ > MAX_VC) space after "if" +#if (CONFIG_SCLK_HZ > 133000000) +#error "Sclk value selected is more than maximum.Please select a proper value for SCLK multiplier" space after "maximum." +#endif + +#if (CONFIG_SCLK_HZ < 27000000) +#error "Sclk value selected is less than minimum.Please select a proper value for SCLK multiplier" space after "minimum." +#endif + +#if (CONFIG_SCLK_HZ >= CONFIG_CCLK_HZ) +#if(CONFIG_SCLK_HZ != CONFIG_CLKIN_HZ) +#if(CONFIG_CCLK_HZ != CONFIG_CLKIN_HZ) space after "if" (2x) +#error "Please select sclk less than cclk" +#endif +#endif +#endif diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/defBF561.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/defBF561.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/defBF561.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/defBF561.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,1713 @@ lines too long here: (mostly deleted) +#define PLL_CTL 0xFFC00000 /* PLL Control register (16-bit) */ +#define PLL_DIV 0xFFC00004 /* PLL Divide Register (16-bit) */ +#define VR_CTL 0xFFC00008 /* Voltage Regulator Control Register (16-bit) */ +#define PLL_STAT 0xFFC0000C /* PLL Status register (16-bit) */ +#define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */ diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/dma.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/dma.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/dma.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/dma.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,36 @@ +#define CH_MEM_STREAM0_DEST 24 // TX +#define CH_MEM_STREAM0_SRC 25 // RX +#define CH_MEM_STREAM1_DEST 26 // TX +#define CH_MEM_STREAM1_SRC 27 // RX Don't use // style comments. diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/irq.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/irq.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/irq.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/irq.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,451 @@ oops, lines too long here. and below here [deleted]. +#define IRQ_DMA2_2 (IVG_BASE + 25) /* DMA2 2 (SPORT1 RX) */ +#define IRQ_SPORT1_RX IRQ_DMA2_2 /* DMA2 2 (SPORT1 RX) */ +#define IRQ_DMA2_3 (IVG_BASE + 26) /* DMA2 3 (SPORT2 TX) */ +#define IRQ_SPORT1_TX IRQ_DMA2_3 /* DMA2 3 (SPORT2 TX) */ +#define IRQ_DMA2_4 (IVG_BASE + 27) /* DMA2 4 (SPI) */ +#define IRQ_SPI IRQ_DMA2_4 /* DMA2 4 (SPI) */ +#define IRQ_DMA2_5 (IVG_BASE + 28) /* DMA2 5 (UART RX) */ +#define IRQ_UART_RX IRQ_DMA2_5 /* DMA2 5 (UART RX) */ +#define IRQ_DMA2_6 (IVG_BASE + 29) /* DMA2 6 (UART TX) */ +#define IRQ_UART_TX IRQ_DMA2_6 /* DMA2 6 (UART TX) */ +#define IRQ_DMA2_7 (IVG_BASE + 30) /* DMA2 7 Interrupt */ +#define IRQ_DMA2_8 (IVG_BASE + 31) /* DMA2 8 Interrupt */ +#define IRQ_DMA2_9 (IVG_BASE + 32) /* DMA2 9 Interrupt */ +#define IRQ_DMA2_10 (IVG_BASE + 33) /* DMA2 10 Interrupt */ +#define IRQ_DMA2_11 (IVG_BASE + 34) /* DMA2 11 Interrupt */ diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/mem_init.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/mem_init.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/mem_init.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/mem_init.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,283 @@ +#if ( CONFIG_MEM_MT48LC16M16A2TG_75 || CONFIG_MEM_MT48LC64M4A2FB_7E || CONFIG_MEM_GENERIC_BOARD) +#if ( CONFIG_SCLK_HZ > 119402985 ) argh. no spaces after ( or before ). +#if ( CONFIG_SCLK_HZ > 104477612 ) && ( CONFIG_SCLK_HZ <= 119402985 ) ditto +#if ( CONFIG_SCLK_HZ > 89552239 ) && ( CONFIG_SCLK_HZ <= 104477612 ) ditto +#if ( CONFIG_SCLK_HZ > 74626866 ) && ( CONFIG_SCLK_HZ <= 89552239 ) ditto +#if ( CONFIG_SCLK_HZ > 66666667 ) && ( CONFIG_SCLK_HZ <= 74626866 ) ditto +#if ( CONFIG_SCLK_HZ > 59701493 ) && ( CONFIG_SCLK_HZ <= 66666667 ) ditto +#if ( CONFIG_SCLK_HZ > 44776119 ) && ( CONFIG_SCLK_HZ <= 59701493 ) ditto +#if ( CONFIG_SCLK_HZ > 29850746 ) && ( CONFIG_SCLK_HZ <= 44776119 ) ditto +#if ( CONFIG_SCLK_HZ <= 29850746 ) ditto +#if ( CONFIG_MEM_SIZE == 128 ) ditto +#define SDRAM_SIZE EB0_SZ_128 +#endif +#if ( CONFIG_MEM_SIZE == 64 ) ditto +#define SDRAM_SIZE EB0_SZ_64 +#endif +#if ( CONFIG_MEM_SIZE == 32 ) ditto +#define SDRAM_SIZE EB0_SZ_32 +#endif +#if ( CONFIG_MEM_SIZE == 16 ) ditto +#define SDRAM_SIZE EB0_SZ_16 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 11 ) ditto +#define SDRAM_WIDTH EB0_CAW_11 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 10 ) ditto +#define SDRAM_WIDTH EB0_CAW_10 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 9 ) ditto +#define SDRAM_WIDTH EB0_CAW_9 +#endif +#if ( CONFIG_MEM_ADD_WIDTH == 8 ) ditto +#define SDRAM_WIDTH EB0_CAW_8 +#endif + +#define mem_SDBCTL SDRAM_WIDTH | SDRAM_SIZE | EB0_E Parens around the expression (right side). +/* Enable SCLK Out */ +#define mem_SDGCTL ( SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS ) no spaces after ( or before ). +/***************************************Currently Not Being Used *********************************/ lines too long. +#define flash_EBIU_AMBCTL_WAT ( ( CONFIG_FLASH_SPEED_BWAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_RAT ( ( CONFIG_FLASH_SPEED_BRAT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_HT ( ( CONFIG_FLASH_SPEED_BHT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) +#define flash_EBIU_AMBCTL_ST ( ( CONFIG_FLASH_SPEED_BST * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 +#define flash_EBIU_AMBCTL_TT ( ( CONFIG_FLASH_SPEED_BTT * 4 ) / ( 4000000000 / CONFIG_SCLK_HZ ) ) + 1 + +#if (flash_EBIU_AMBCTL_TT > 3 ) no space before ) [more below] +#define flash_EBIU_AMBCTL0_TT B0TT_4 +#endif +#if (flash_EBIU_AMBCTL_TT == 3 ) +#define flash_EBIU_AMBCTL0_TT B0TT_3 +#endif +#if (flash_EBIU_AMBCTL_TT == 2 ) +#define flash_EBIU_AMBCTL0_TT B0TT_2 +#endif +#if (flash_EBIU_AMBCTL_TT < 2 ) +#define flash_EBIU_AMBCTL0_TT B0TT_1 +#endif + +#if (flash_EBIU_AMBCTL_ST > 3 ) +#define flash_EBIU_AMBCTL0_ST B0ST_4 +#endif +#if (flash_EBIU_AMBCTL_ST == 3 ) +#define flash_EBIU_AMBCTL0_ST B0ST_3 +#endif +#if (flash_EBIU_AMBCTL_ST == 2 ) +#define flash_EBIU_AMBCTL0_ST B0ST_2 +#endif +#if (flash_EBIU_AMBCTL_ST < 2 ) +#define flash_EBIU_AMBCTL0_ST B0ST_1 +#endif + +#if (flash_EBIU_AMBCTL_HT > 2 ) +#define flash_EBIU_AMBCTL0_HT B0HT_3 +#endif +#if (flash_EBIU_AMBCTL_HT == 2 ) +#define flash_EBIU_AMBCTL0_HT B0HT_2 +#endif +#if (flash_EBIU_AMBCTL_HT == 1 ) +#define flash_EBIU_AMBCTL0_HT B0HT_1 +#endif + +#define flash_EBIU_AMBCTL0 flash_EBIU_AMBCTL0_WAT | flash_EBIU_AMBCTL0_RAT | flash_EBIU_AMBCTL0_HT | flash_EBIU_AMBCTL0_ST | flash_EBIU_AMBCTL0_TT | CONFIG_FLASH_SPEED_RDYEN Parens around expression (right side). diff -urN linux-2.6.18/include/asm-blackfin/mach-bf561/mem_map.h linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/mem_map.h --- linux-2.6.18/include/asm-blackfin/mach-bf561/mem_map.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-bf561/mem_map.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,61 @@ +#define COREMMR_BASE 0xFFE00000 // Core MMRs +#define SYSMMR_BASE 0xFFC00000 // System MMRs Don't use // comments. [and more below here] diff -urN linux-2.6.18/include/asm-blackfin/mach-common/cdef_LPBlackfin.h linux-2.6.18.patch1/include/asm-blackfin/mach-common/cdef_LPBlackfin.h --- linux-2.6.18/include/asm-blackfin/mach-common/cdef_LPBlackfin.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-common/cdef_LPBlackfin.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,474 @@ +#define ITEST_INDEX 0xFFE01304 // Instruction Test Index Register no // style comments diff -urN linux-2.6.18/include/asm-blackfin/mach-common/def_LPBlackfin.h linux-2.6.18.patch1/include/asm-blackfin/mach-common/def_LPBlackfin.h --- linux-2.6.18/include/asm-blackfin/mach-common/def_LPBlackfin.h 1970-01-01 08:00:00.000000000 +0800 +++ linux-2.6.18.patch1/include/asm-blackfin/mach-common/def_LPBlackfin.h 2006-09-21 09:29:49.000000000 +0800 @@ -0,0 +1,706 @@ +#define MK_BMSK_( x ) (1<, , , + , and + in the kernel source). + + This option will also make obsoleted drivers available. These are + drivers that have been replaced by something else, and/or are + scheduled to be removed in a future kernel release. + + Unless you intend to help test and develop a feature or driver that + falls into this category, or you have a situation that requires + using these features, you should probably say N here, which will + cause the configurator to present you with fewer choices. If + you say Y here, you will be offered the choice of using features or + drivers that are currently considered to be in the alpha-test phase. + +config BROKEN + bool + +config BROKEN_ON_SMP + bool + depends on BROKEN || !SMP + default y + +config LOCK_KERNEL + bool + depends on SMP || PREEMPT + default y + +config INIT_ENV_ARG_LIMIT + int + default 32 if !UML + default 128 if UML + help + Maximum of each of the number of arguments and environment + variables passed to init from the kernel command line. + +endmenu + +menu "General setup" + +config LOCALVERSION + string "Local version - append to kernel release" + help + Append an extra string to the end of your kernel version. + This will show up when you type uname, for example. + The string you set here will be appended after the contents of + any files with a filename matching localversion* in your + object and source tree, in that order. Your total string can + be a maximum of 64 characters. + +config LOCALVERSION_AUTO + bool "Automatically append version information to the version string" + default y + help + This will try to automatically determine if the current tree is a + release tree by looking for git tags that + belong to the current top of tree revision. + + A string of the format -gxxxxxxxx will be added to the localversion + if a git based tree is found. The string generated by this will be + appended after any matching localversion* files, and after the value + set in CONFIG_LOCALVERSION + + Note: This requires Perl, and a git repository, but not necessarily + the git or cogito tools to be installed. + +config SWAP + bool "Support for paging of anonymous memory (swap)" + depends on MMU + default y + help + This option allows you to choose whether you want to have support + for so called swap devices or swap files in your kernel that are + used to provide more virtual memory than the actual RAM present + in your computer. If unsure say Y. + +config SYSVIPC + bool "System V IPC" + ---help--- + Inter Process Communication is a suite of library functions and + system calls which let processes (running programs) synchronize and + exchange information. It is generally considered to be a good thing, + and some programs won't run unless you say Y here. In particular, if + you want to run the DOS emulator dosemu under Linux (read the + DOSEMU-HOWTO, available from ), + you'll need to say Y here. + + You can find documentation about IPC with "info ipc" and also in + section 6.4 of the Linux Programmer's Guide, available from + . + +config POSIX_MQUEUE + bool "POSIX Message Queues" + depends on NET && EXPERIMENTAL + ---help--- + POSIX variant of message queues is a part of IPC. In POSIX message + queues every message has a priority which decides about succession + of receiving it by a process. If you want to compile and run + programs written e.g. for Solaris with use of its POSIX message + queues (functions mq_*) say Y here. To use this feature you will + also need mqueue library, available from + + + POSIX message queues are visible as a filesystem called 'mqueue' + and can be mounted somewhere if you want to do filesystem + operations on message queues. + + If unsure, say Y. + +config BSD_PROCESS_ACCT + bool "BSD Process Accounting" + help + If you say Y here, a user level program will be able to instruct the + kernel (via a special system call) to write process accounting + information to a file: whenever a process exits, information about + that process will be appended to the file by the kernel. The + information includes things such as creation time, owning user, + command name, memory usage, controlling terminal etc. (the complete + list is in the struct acct in ). It is + up to the user level program to do useful things with this + information. This is generally a good idea, so say Y. + +config BSD_PROCESS_ACCT_V3 + bool "BSD Process Accounting version 3 file format" + depends on BSD_PROCESS_ACCT + default n + help + If you say Y here, the process accounting information is written + in a new file format that also logs the process IDs of each + process and it's parent. Note that this file format is incompatible + with previous v0/v1/v2 file formats, so you will need updated tools + for processing it. A preliminary version of these tools is available + at . + +config TASKSTATS + bool "Export task/process statistics through netlink (EXPERIMENTAL)" + depends on NET + default n + help + Export selected statistics for tasks/processes through the + generic netlink interface. Unlike BSD process accounting, the + statistics are available during the lifetime of tasks/processes as + responses to commands. Like BSD accounting, they are sent to user + space on task exit. + + Say N if unsure. + +config TASK_DELAY_ACCT + bool "Enable per-task delay accounting (EXPERIMENTAL)" + depends on TASKSTATS + help + Collect information on time spent by a task waiting for system + resources like cpu, synchronous block I/O completion and swapping + in pages. Such statistics can help in setting a task's priorities + relative to other tasks for cpu, io, rss limits etc. + + Say N if unsure. + +config AUDIT + bool "Auditing support" + depends on NET + help + Enable auditing infrastructure that can be used with another + kernel subsystem, such as SELinux (which requires this for + logging of avc messages output). Does not do system-call + auditing without CONFIG_AUDITSYSCALL. + +config AUDITSYSCALL + bool "Enable system-call auditing support" + depends on AUDIT && (X86 || PPC || PPC64 || S390 || IA64 || UML || SPARC64) + default y if SECURITY_SELINUX + help + Enable low-overhead system-call auditing infrastructure that + can be used independently or with another kernel subsystem, + such as SELinux. To use audit's filesystem watch feature, please + ensure that INOTIFY is configured. + +config IKCONFIG + bool "Kernel .config support" + ---help--- + This option enables the complete Linux kernel ".config" file + contents to be saved in the kernel. It provides documentation + of which kernel options are used in a running kernel or in an + on-disk kernel. This information can be extracted from the kernel + image file with the script scripts/extract-ikconfig and used as + input to rebuild the current kernel or to build another kernel. + It can also be extracted from a running kernel by reading + /proc/config.gz if enabled (below). + +config IKCONFIG_PROC + bool "Enable access to .config through /proc/config.gz" + depends on IKCONFIG && PROC_FS + ---help--- + This option enables access to the kernel configuration file + through /proc/config.gz. + +config CPUSETS + bool "Cpuset support" + depends on SMP + help + This option will let you create and manage CPUSETs which + allow dynamically partitioning a system into sets of CPUs and + Memory Nodes and assigning tasks to run only within those sets. + This is primarily useful on large SMP or NUMA systems. + + Say N if unsure. + +config RELAY + bool "Kernel->user space relay support (formerly relayfs)" + help + This option enables support for relay interface support in + certain file systems (such as debugfs). + It is designed to provide an efficient mechanism for tools and + facilities to relay large amounts of data from kernel space to + user space. + + If unsure, say N. + +source "usr/Kconfig" + +config CC_OPTIMIZE_FOR_SIZE + bool "Optimize for size (Look out for broken compilers!)" + default y + depends on ARM || H8300 || EXPERIMENTAL + help + Enabling this option will pass "-Os" instead of "-O2" to gcc + resulting in a smaller kernel. + + WARNING: some versions of gcc may generate incorrect code with this + option. If problems are observed, a gcc upgrade may be needed. + + If unsure, say N. + +menuconfig EMBEDDED + bool "Configure standard kernel features (for small systems)" + help + This option allows certain base kernel options and settings + to be disabled or tweaked. This is for specialized + environments which can tolerate a "non-standard" kernel. + Only use this if you really know what you are doing. + +config UID16 + bool "Enable 16-bit UID system calls" if EMBEDDED + depends on ARM || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION) + default y + help + This enables the legacy 16-bit UID syscall wrappers. + +config SYSCTL + bool "Sysctl support" if EMBEDDED + default y + ---help--- + The sysctl interface provides a means of dynamically changing + certain kernel parameters and variables on the fly without requiring + a recompile of the kernel or reboot of the system. The primary + interface consists of a system call, but if you say Y to "/proc + file system support", a tree of modifiable sysctl entries will be + generated beneath the /proc/sys directory. They are explained in the + files in . Note that enabling this + option will enlarge the kernel by at least 8 KB. + + As it is generally a good thing, you should say Y here unless + building a kernel for install/rescue disks or your system is very + limited in memory. + +config KALLSYMS + bool "Load all symbols for debugging/kksymoops" if EMBEDDED + default y + help + Say Y here to let the kernel print out symbolic crash information and + symbolic stack backtraces. This increases the size of the kernel + somewhat, as all symbols have to be loaded into the kernel image. + +config KALLSYMS_ALL + bool "Include all symbols in kallsyms" + depends on DEBUG_KERNEL && KALLSYMS + help + Normally kallsyms only contains the symbols of functions, for nicer + OOPS messages. Some debuggers can use kallsyms for other + symbols too: say Y here to include all symbols, if you need them + and you don't care about adding 300k to the size of your kernel. + + Say N. + +config KALLSYMS_EXTRA_PASS + bool "Do an extra kallsyms pass" + depends on KALLSYMS + help + If kallsyms is not working correctly, the build will fail with + inconsistent kallsyms data. If that occurs, log a bug report and + turn on KALLSYMS_EXTRA_PASS which should result in a stable build. + Always say N here unless you find a bug in kallsyms, which must be + reported. KALLSYMS_EXTRA_PASS is only a temporary workaround while + you wait for kallsyms to be fixed. + + +config HOTPLUG + bool "Support for hot-pluggable devices" if EMBEDDED + default y + help + This option is provided for the case where no hotplug or uevent + capabilities is wanted by the kernel. You should only consider + disabling this option for embedded systems that do not use modules, a + dynamic /dev tree, or dynamic device discovery. Just say Y. + +config PRINTK + default y + bool "Enable support for printk" if EMBEDDED + help + This option enables normal printk support. Removing it + eliminates most of the message strings from the kernel image + and makes the kernel more or less silent. As this makes it + very difficult to diagnose system problems, saying N here is + strongly discouraged. + +config BUG + bool "BUG() support" if EMBEDDED + default y + help + Disabling this option eliminates support for BUG and WARN, reducing + the size of your kernel image and potentially quietly ignoring + numerous fatal conditions. You should only consider disabling this + option for embedded systems with no facilities for reporting errors. + Just say Y. + +config ELF_CORE + default y + bool "Enable ELF core dumps" if EMBEDDED + help + Enable support for generating core dumps. Disabling saves about 4k. + +config BASE_FULL + default y + bool "Enable full-sized data structures for core" if EMBEDDED + help + Disabling this option reduces the size of miscellaneous core + kernel data structures. This saves memory on small machines, + but may reduce performance. + +config FUTEX + bool "Enable futex support" if EMBEDDED + default y + select RT_MUTEXES + help + Disabling this option will cause the kernel to be built without + support for "fast userspace mutexes". The resulting kernel may not + run glibc-based applications correctly. + +config EPOLL + bool "Enable eventpoll support" if EMBEDDED + default y + help + Disabling this option will cause the kernel to be built without + support for epoll family of system calls. + +config SHMEM + bool "Use full shmem filesystem" if EMBEDDED + default y + depends on MMU + help + The shmem is an internal filesystem used to manage shared memory. + It is backed by swap and manages resource limits. It is also exported + to userspace as tmpfs if TMPFS is enabled. Disabling this + option replaces shmem and tmpfs with the much simpler ramfs code, + which may be appropriate on small systems without swap. + +config SLAB + default y + bool "Use full SLAB allocator" if EMBEDDED + help + Disabling this replaces the advanced SLAB allocator and + kmalloc support with the drastically simpler SLOB allocator. + SLOB is more space efficient but does not scale well and is + more susceptible to fragmentation. + +config VM_EVENT_COUNTERS + default y + bool "Enable VM event counters for /proc/vmstat" if EMBEDDED + help + VM event counters are only needed to for event counts to be + shown. They have no function for the kernel itself. This + option allows the disabling of the VM event counters. + /proc/vmstat will only show page counts. + +endmenu # General setup + +config RT_MUTEXES + boolean + select PLIST + +config TINY_SHMEM + default !SHMEM + bool + +config BASE_SMALL + int + default 0 if BASE_FULL + default 1 if !BASE_FULL + +config SLOB + default !SLAB + bool + +menu "Loadable module support" + +config MODULES + bool "Enable loadable module support" + help + Kernel modules are small pieces of compiled code which can + be inserted in the running kernel, rather than being + permanently built into the kernel. You use the "modprobe" + tool to add (and sometimes remove) them. If you say Y here, + many parts of the kernel can be built as modules (by + answering M instead of Y where indicated): this is most + useful for infrequently used options which are not required + for booting. For more information, see the man pages for + modprobe, lsmod, modinfo, insmod and rmmod. + + If you say Y here, you will need to run "make + modules_install" to put the modules under /lib/modules/ + where modprobe can find them (you may need to be root to do + this). + + If unsure, say Y. + +config MODULE_UNLOAD + bool "Module unloading" + depends on MODULES + help + Without this option you will not be able to unload any + modules (note that some modules may not be unloadable + anyway), which makes your kernel slightly smaller and + simpler. If unsure, say Y. + +config MODULE_FORCE_UNLOAD + bool "Forced module unloading" + depends on MODULE_UNLOAD && EXPERIMENTAL + help + This option allows you to force a module to unload, even if the + kernel believes it is unsafe: the kernel will remove the module + without waiting for anyone to stop using it (using the -f option to + rmmod). This is mainly for kernel developers and desperate users. + If unsure, say N. + +config MODVERSIONS + bool "Module versioning support" + depends on MODULES + help + Usually, you have to use modules compiled with your kernel. + Saying Y here makes it sometimes possible to use modules + compiled for different kernels, by adding enough information + to the modules to (hopefully) spot any changes which would + make them incompatible with the kernel you are running. If + unsure, say N. + +config MODULE_SRCVERSION_ALL + bool "Source checksum for all modules" + depends on MODULES + help + Modules which contain a MODULE_VERSION get an extra "srcversion" + field inserted into their modinfo section, which contains a + sum of the source files which made it. This helps maintainers + see exactly which source was used to build a module (since + others sometimes change the module source without updating + the version). With this option, such a "srcversion" field + will be created for all modules. If unsure, say N. + +config KMOD + bool "Automatic kernel module loading" + depends on MODULES + help + Normally when you have selected some parts of the kernel to + be created as kernel modules, you must load them (using the + "modprobe" command) before you can use them. If you say Y + here, some parts of the kernel will be able to load modules + automatically: when a part of the kernel needs a module, it + runs modprobe with the appropriate arguments, thereby + loading the module if it is available. If unsure, say Y. + +config STOP_MACHINE + bool + default y + depends on (SMP && MODULE_UNLOAD) || HOTPLUG_CPU + help + Need stop_machine() primitive. +endmenu + +menu "Block layer" +source "block/Kconfig" +endmenu